From 13de557d24c6afdb0689a3ec7da76d476de6530a Mon Sep 17 00:00:00 2001 From: x1a0t <405028157@qq.com> Date: Thu, 12 Jan 2023 14:59:44 +0800 Subject: [PATCH 1/2] chore: update BlockSuite version including introducing feature flag, adding upgrade npm script --- package.json | 3 +- packages/app/package.json | 6 +-- packages/data-center/package.json | 9 ++-- pnpm-lock.yaml | 68 ++++++++++++++----------------- update-dep.sh | 5 +++ 5 files changed, 45 insertions(+), 46 deletions(-) create mode 100755 update-dep.sh diff --git a/package.json b/package.json index b5b2f829d5..ff238c9c08 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "test:unit": "playwright test --config=playwright.config.unit.ts", "postinstall": "husky install", "notify": "node --experimental-modules scripts/notify.mjs", - "check:ci": "pnpm lint & pnpm test" + "check:ci": "pnpm lint & pnpm test", + "update:blocksuite": "chmod 755 update-dep.sh && sh update-dep.sh" }, "lint-staged": { "*": "prettier --write --ignore-unknown", diff --git a/packages/app/package.json b/packages/app/package.json index b68de96c0b..31fa964621 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -11,10 +11,10 @@ "dependencies": { "@affine/datacenter": "workspace:*", "@affine/i18n": "workspace:*", - "@blocksuite/blocks": "0.4.0-20230111164952-fea266a", - "@blocksuite/editor": "0.4.0-20230111164952-fea266a", + "@blocksuite/blocks": "0.4.0-20230111171650-bc63456", + "@blocksuite/editor": "0.4.0-20230111171650-bc63456", "@blocksuite/icons": "^2.0.2", - "@blocksuite/store": "0.4.0-20230111164952-fea266a", + "@blocksuite/store": "0.4.0-20230111171650-bc63456", "@emotion/css": "^11.10.0", "@emotion/react": "^11.10.4", "@emotion/server": "^11.10.0", diff --git a/packages/data-center/package.json b/packages/data-center/package.json index 597e9e46a7..f97871413a 100644 --- a/packages/data-center/package.json +++ b/packages/data-center/package.json @@ -26,8 +26,9 @@ "typescript": "^4.8.4" }, "dependencies": { - "@blocksuite/blocks": "0.4.0-20230111164952-fea266a", - "@blocksuite/store": "0.4.0-20230111164952-fea266a", + "@blocksuite/blocks": "0.4.0-20230111171650-bc63456", + "@blocksuite/editor": "0.4.0-20230111171650-bc63456", + "@blocksuite/store": "0.4.0-20230111171650-bc63456", "debug": "^4.3.4", "encoding": "^0.1.13", "firebase": "^9.15.0", @@ -36,8 +37,8 @@ "ky-universal": "^0.11.0", "lib0": "^0.2.58", "swr": "^2.0.0", - "yjs": "^13.5.44", - "y-protocols": "^1.0.5" + "y-protocols": "^1.0.5", + "yjs": "^13.5.44" }, "peerDependencies": { "@blocksuite/blocks": "0.3.1-*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f1d36703e2..a7f96d5abe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,10 +40,10 @@ importers: specifiers: '@affine/datacenter': workspace:* '@affine/i18n': workspace:* - '@blocksuite/blocks': 0.4.0-20230111164952-fea266a - '@blocksuite/editor': 0.4.0-20230111164952-fea266a + '@blocksuite/blocks': 0.4.0-20230111171650-bc63456 + '@blocksuite/editor': 0.4.0-20230111171650-bc63456 '@blocksuite/icons': ^2.0.2 - '@blocksuite/store': 0.4.0-20230111164952-fea266a + '@blocksuite/store': 0.4.0-20230111171650-bc63456 '@emotion/css': ^11.10.0 '@emotion/react': ^11.10.4 '@emotion/server': ^11.10.0 @@ -81,10 +81,10 @@ importers: dependencies: '@affine/datacenter': link:../data-center '@affine/i18n': link:../i18n - '@blocksuite/blocks': 0.4.0-20230111164952-fea266a_yjs@13.5.44 - '@blocksuite/editor': 0.4.0-20230111164952-fea266a_yjs@13.5.44 + '@blocksuite/blocks': 0.4.0-20230111171650-bc63456_yjs@13.5.44 + '@blocksuite/editor': 0.4.0-20230111171650-bc63456_yjs@13.5.44 '@blocksuite/icons': 2.0.4_w5j4k42lgipnm43s3brx6h3c34 - '@blocksuite/store': 0.4.0-20230111164952-fea266a_yjs@13.5.44 + '@blocksuite/store': 0.4.0-20230111171650-bc63456_yjs@13.5.44 '@emotion/css': 11.10.0 '@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34 '@emotion/server': 11.10.0_@emotion+css@11.10.0 @@ -123,8 +123,9 @@ importers: packages/data-center: specifiers: - '@blocksuite/blocks': 0.4.0-20230111164952-fea266a - '@blocksuite/store': 0.4.0-20230111164952-fea266a + '@blocksuite/blocks': 0.4.0-20230111171650-bc63456 + '@blocksuite/editor': 0.4.0-20230111171650-bc63456 + '@blocksuite/store': 0.4.0-20230111171650-bc63456 '@playwright/test': ^1.29.1 '@types/debug': ^4.1.7 debug: ^4.3.4 @@ -140,8 +141,9 @@ importers: y-protocols: ^1.0.5 yjs: ^13.5.44 dependencies: - '@blocksuite/blocks': 0.4.0-20230111164952-fea266a_yjs@13.5.44 - '@blocksuite/store': 0.4.0-20230111164952-fea266a_yjs@13.5.44 + '@blocksuite/blocks': 0.4.0-20230111171650-bc63456_yjs@13.5.44 + '@blocksuite/editor': 0.4.0-20230111171650-bc63456_yjs@13.5.44 + '@blocksuite/store': 0.4.0-20230111171650-bc63456_yjs@13.5.44 debug: 4.3.4 encoding: 0.1.13 firebase: 9.15.0_encoding@0.1.13 @@ -1455,12 +1457,12 @@ packages: to-fast-properties: 2.0.0 dev: true - /@blocksuite/blocks/0.4.0-20230111164952-fea266a_yjs@13.5.44: - resolution: {integrity: sha512-bphgTV5YkEfsqkvRJdbH8TevG6l9b9WHTliETJ4UksX4sxOsRDJk0v4XcluIDZXDv4TQ8fc45d5s5uaab48xQQ==} + /@blocksuite/blocks/0.4.0-20230111171650-bc63456_yjs@13.5.44: + resolution: {integrity: sha512-7fpb++pT9laoyLFWl4h09v7TUqZ/9udMrC1qxdX2XFgMPJjg3MJ9RG+Ud2s/zqZ1SkU1+0hMBvJP5ci9vV44gw==} dependencies: - '@blocksuite/global': 0.4.0-20230111164952-fea266a - '@blocksuite/phasor': 0.4.0-20230111164952-fea266a_yjs@13.5.44 - '@blocksuite/store': 0.4.0-20230111164952-fea266a_yjs@13.5.44 + '@blocksuite/global': 0.4.0-20230111171650-bc63456 + '@blocksuite/phasor': 0.4.0-20230111171650-bc63456_yjs@13.5.44 + '@blocksuite/store': 0.4.0-20230111171650-bc63456_yjs@13.5.44 '@tldraw/intersect': 1.8.0 autosize: 5.0.2 highlight.js: 11.7.0 @@ -1476,11 +1478,11 @@ packages: - yjs dev: false - /@blocksuite/editor/0.4.0-20230111164952-fea266a_yjs@13.5.44: - resolution: {integrity: sha512-pVHH9nu9FwQErrPI6dHfMUCVtPEaNuB4PhHmyrcrVIgTGaGKdAQZ7PrsEqvjeWnIoX2l6s4u9XCFgdAsxybSfQ==} + /@blocksuite/editor/0.4.0-20230111171650-bc63456_yjs@13.5.44: + resolution: {integrity: sha512-NbghDNWDGHXXfEqgnNhbw7zewGRyx9LUzOv1FmY2WVhzDu02MSrTWxMduChH1/tfLHRLe6jusmZKS9BNSUPynA==} dependencies: - '@blocksuite/blocks': 0.4.0-20230111164952-fea266a_yjs@13.5.44 - '@blocksuite/store': 0.4.0-20230111164952-fea266a_yjs@13.5.44 + '@blocksuite/blocks': 0.4.0-20230111171650-bc63456_yjs@13.5.44 + '@blocksuite/store': 0.4.0-20230111171650-bc63456_yjs@13.5.44 lit: 2.6.0 marked: 4.2.5 turndown: 7.1.1 @@ -1491,8 +1493,8 @@ packages: - yjs dev: false - /@blocksuite/global/0.4.0-20230111164952-fea266a: - resolution: {integrity: sha512-R2nXYIfyBaSMbLGF/aOUgRPFpWYs+bbK1/E9wChQGvC1D8UhQ6WRUt/khzM/GpdvnmIhmMyolJZ6LjEjGAo6Wg==} + /@blocksuite/global/0.4.0-20230111171650-bc63456: + resolution: {integrity: sha512-/Kqg73vPLzxiWp6UqRmRoKfYmH4Sij3mU52RJf9adyywZOdM5e9E1gvPP+Eruz/x2jJ1uzR5/ivFqp5t688/tg==} dev: false /@blocksuite/icons/2.0.4_w5j4k42lgipnm43s3brx6h3c34: @@ -1505,20 +1507,20 @@ packages: react: 18.2.0 dev: false - /@blocksuite/phasor/0.4.0-20230111164952-fea266a_yjs@13.5.44: - resolution: {integrity: sha512-AHxLIHi2s3fcfzbx8URVer3LGlZnVKvW+ttpRKIm8a3vkZqaXwb9+8gL8Ajh6YkOvf9Nb1Y5471978284BwCfw==} + /@blocksuite/phasor/0.4.0-20230111171650-bc63456_yjs@13.5.44: + resolution: {integrity: sha512-fzmrG8KVJXkm5YyvHpPG1RRFhXjzuOey8OIoDu+/z87n9HJc4SkOd9JKH6wEL37F7P5ZoEM9Yl9YHxQjUc4/CA==} peerDependencies: yjs: ^13 dependencies: yjs: 13.5.44 dev: false - /@blocksuite/store/0.4.0-20230111164952-fea266a_yjs@13.5.44: - resolution: {integrity: sha512-2iMDGtbrFK2AO8+j17Z1kpsVzpkFY91+IMD2lorqlGrK8zj2Ane8JypcARFXJJ6rG8yRbB+P8GDLTXXvj+ZgmQ==} + /@blocksuite/store/0.4.0-20230111171650-bc63456_yjs@13.5.44: + resolution: {integrity: sha512-f/PKFPadA0KZq/wSLxxlS29c4SDuMfzHN1/gdrxFEIY0gC8caK2jZnT4K62R9Nquik/mXL60h8fBVAkQ0KbHzg==} peerDependencies: yjs: ^13 dependencies: - '@blocksuite/global': 0.4.0-20230111164952-fea266a + '@blocksuite/global': 0.4.0-20230111171650-bc63456 '@types/flexsearch': 0.7.3 '@types/quill': 1.3.10 buffer: 6.0.3 @@ -2511,10 +2513,6 @@ packages: resolution: {integrity: sha512-qDv4851VFSaBWzpS02cXHclo40jsbAjRXnebNXpm0uVg32kCneZPo9RYVQtrTNICtZ+1wAYHu1ZtxWSWMbKrBw==} dev: false - /@lit/reactive-element/1.5.0: - resolution: {integrity: sha512-fQh9FDK0LPTwDk+0HhSZEtb8K0LTN1wXerwpGrWA+a8tWulYRDLI4vQDWp4GOIsewn0572KYV/oZ3+492D7osA==} - dev: false - /@lit/reactive-element/1.6.0: resolution: {integrity: sha512-33H04h4tx9NVEADti0haZTNxssCnqZlMlyjri5k9kwDWAe2W1iENroZt7VWwmsPhlWUD8sSoPXSHqd0DdL29Pw==} dependencies: @@ -6212,8 +6210,8 @@ packages: /lit-element/3.2.2: resolution: {integrity: sha512-6ZgxBR9KNroqKb6+htkyBwD90XGRiqKDHVrW/Eh0EZ+l+iC+u+v+w3/BA5NGi4nizAVHGYvQBHUDuSmLjPp7NQ==} dependencies: - '@lit/reactive-element': 1.5.0 - lit-html: 2.5.0 + '@lit/reactive-element': 1.6.0 + lit-html: 2.6.0 dev: false /lit-html/2.4.0: @@ -6222,12 +6220,6 @@ packages: '@types/trusted-types': 2.0.2 dev: false - /lit-html/2.5.0: - resolution: {integrity: sha512-bLHosg1XL3JRUcKdSVI0sLCs0y1wWrj2sqqAN3cZ7bDDPNgmDHH29RV48x6Wz3ZmkxIupaE+z7uXSZ/pXWAO1g==} - dependencies: - '@types/trusted-types': 2.0.2 - dev: false - /lit-html/2.6.0: resolution: {integrity: sha512-slNAAYfvC7LxeryDOnPFl5uTpxGYGJ6UR9SFmfY+gQ+sf30z1atDPXlgjcSTtwymNdlwDhfGjq+EemQRXp9z1g==} dependencies: diff --git a/update-dep.sh b/update-dep.sh new file mode 100755 index 0000000000..3c9e1cd39a --- /dev/null +++ b/update-dep.sh @@ -0,0 +1,5 @@ +#!/bin/bash +cd packages/app +pnpm i @blocksuite/store@nightly @blocksuite/blocks@nightly @blocksuite/editor@nightly +cd ../data-center +pnpm i @blocksuite/store@nightly @blocksuite/blocks@nightly @blocksuite/editor@nightly From a45040a95649fa56c9ecc6ddedcd868c7dc07037 Mon Sep 17 00:00:00 2001 From: x1a0t <405028157@qq.com> Date: Thu, 12 Jan 2023 16:13:26 +0800 Subject: [PATCH 2/2] fix: deleting bash script, using npm script to be cross platform compatible --- package.json | 2 +- update-dep.sh | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100755 update-dep.sh diff --git a/package.json b/package.json index ff238c9c08..43d76b7e12 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "postinstall": "husky install", "notify": "node --experimental-modules scripts/notify.mjs", "check:ci": "pnpm lint & pnpm test", - "update:blocksuite": "chmod 755 update-dep.sh && sh update-dep.sh" + "update:blocksuite": "pnpm i --filter @affine/app --filter @affine/datacenter @blocksuite/blocks@nightly @blocksuite/store@nightly @blocksuite/editor@nightly" }, "lint-staged": { "*": "prettier --write --ignore-unknown", diff --git a/update-dep.sh b/update-dep.sh deleted file mode 100755 index 3c9e1cd39a..0000000000 --- a/update-dep.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -cd packages/app -pnpm i @blocksuite/store@nightly @blocksuite/blocks@nightly @blocksuite/editor@nightly -cd ../data-center -pnpm i @blocksuite/store@nightly @blocksuite/blocks@nightly @blocksuite/editor@nightly