diff --git a/package.json b/package.json index 0b5a3def0..0acfd6944 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ }, "devDependencies": { "@changesets/cli": "^2.26.0", + "@jest/globals": "^29.3.1", "@playwright/test": "^1.29.1", "@types/eslint": "^8.4.10", "@types/node": "^18.11.17", @@ -39,10 +40,11 @@ "fake-indexeddb": "4.0.1", "got": "^12.5.3", "husky": "^8.0.2", + "jest": "^29.3.1", "lint-staged": "^13.1.0", "prettier": "^2.7.1", - "typescript": "^4.9.3", - "vitest": "^0.26.3" + "ts-jest": "^29.0.3", + "typescript": "^4.9.3" }, "eslintConfig": { "root": true, diff --git a/packages/app/package.json b/packages/app/package.json index 3ba74e271..16fd889fd 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -10,10 +10,10 @@ }, "dependencies": { "@affine/datacenter": "workspace:*", - "@blocksuite/blocks": "=0.3.1-20230106060050-1aad55d", - "@blocksuite/editor": "=0.3.1-20230106060050-1aad55d", + "@blocksuite/blocks": "0.3.1-20230109032243-37ad3ba", + "@blocksuite/editor": "0.3.1-20230109032243-37ad3ba", "@blocksuite/icons": "^2.0.2", - "@blocksuite/store": "=0.3.1-20230106060050-1aad55d", + "@blocksuite/store": "0.3.1-20230109032243-37ad3ba", "@emotion/css": "^11.10.0", "@emotion/react": "^11.10.4", "@emotion/server": "^11.10.0", @@ -49,8 +49,8 @@ "eslint-config-next": "12.3.1", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.2.1", - "raw-loader": "^4.0.2", "next-pwa": "^5.6.0", + "raw-loader": "^4.0.2", "typescript": "4.8.3" }, "eslintConfig": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 58d8ab75a..55cf7d85c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -43,10 +43,10 @@ importers: packages/app: specifiers: '@affine/datacenter': workspace:* - '@blocksuite/blocks': '=0.3.1-20230106060050-1aad55d' - '@blocksuite/editor': '=0.3.1-20230106060050-1aad55d' + '@blocksuite/blocks': 0.3.1-20230109032243-37ad3ba + '@blocksuite/editor': 0.3.1-20230109032243-37ad3ba '@blocksuite/icons': ^2.0.2 - '@blocksuite/store': '=0.3.1-20230106060050-1aad55d' + '@blocksuite/store': 0.3.1-20230109032243-37ad3ba '@emotion/css': ^11.10.0 '@emotion/react': ^11.10.4 '@emotion/server': ^11.10.0 @@ -85,10 +85,10 @@ importers: yjs: ^13.5.44 dependencies: '@affine/datacenter': link:../data-center - '@blocksuite/blocks': 0.3.1-20230106060050-1aad55d_yjs@13.5.44 - '@blocksuite/editor': 0.3.1-20230106060050-1aad55d_yjs@13.5.44 + '@blocksuite/blocks': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44 + '@blocksuite/editor': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44 '@blocksuite/icons': 2.0.4_w5j4k42lgipnm43s3brx6h3c34 - '@blocksuite/store': 0.3.1-20230106060050-1aad55d_yjs@13.5.44 + '@blocksuite/store': 0.3.1-20230109032243-37ad3ba_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 @@ -1463,11 +1463,31 @@ packages: - yjs dev: false - /@blocksuite/editor/0.3.1-20230106060050-1aad55d_yjs@13.5.44: - resolution: {integrity: sha512-wSlAF9XVxIkHFJ1qCzn7oQ/gwXybFYMrzRl35UTJV509D+DuWZefRZWvpdIDCOUJ24uQscr1HxwsON11ltfWgA==} + /@blocksuite/blocks/0.3.1-20230109032243-37ad3ba_yjs@13.5.44: + resolution: {integrity: sha512-UTlbk0Is7TMRBbvUyM2nivbqM/TLwRj1qArMYbOmvDGUNYadWo68cTwv/Ej2WwiKn22q4/4JHryGsv3gTCRz1Q==} dependencies: - '@blocksuite/blocks': 0.3.1-20230106060050-1aad55d_yjs@13.5.44 - '@blocksuite/store': 0.3.1-20230106060050-1aad55d_yjs@13.5.44 + '@blocksuite/phasor': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44 + '@blocksuite/store': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44 + '@tldraw/intersect': 1.8.0 + autosize: 5.0.2 + highlight.js: 11.7.0 + hotkeys-js: 3.10.1 + lit: 2.5.0 + perfect-freehand: 1.2.0 + quill: 1.3.7 + quill-cursors: 4.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + - yjs + dev: false + + /@blocksuite/editor/0.3.1-20230109032243-37ad3ba_yjs@13.5.44: + resolution: {integrity: sha512-bYbMn4EL/od+xP4K3u2kJT08kJBpK6H7b4cbRb9No3SUwgNHvvVNxia/QH1AQXyKaZQj/DHFgVxrw9GKo2GIPA==} + dependencies: + '@blocksuite/blocks': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44 + '@blocksuite/store': 0.3.1-20230109032243-37ad3ba_yjs@13.5.44 lit: 2.5.0 marked: 4.2.5 turndown: 7.1.1 @@ -1488,6 +1508,14 @@ packages: react: 18.2.0 dev: false + /@blocksuite/phasor/0.3.1-20230109032243-37ad3ba_yjs@13.5.44: + resolution: {integrity: sha512-mL1gSQ3rzrjdQSbWPtgyMXpbbl266UUjw26d0aIjkOh+iMMI6rWtmKWDoiDkO7tejIjwSNQ4w5zJOjJRIj+mSA==} + peerDependencies: + yjs: ^13 + dependencies: + yjs: 13.5.44 + dev: false + /@blocksuite/phasor/0.3.1_yjs@13.5.44: resolution: {integrity: sha512-aJmAQn2qoF6HxFZWgq7xa/pWVyzg3MmD6dynIHAKdfN7rBdKk3PNA+lRX919QkD2e270N/zgHEGFFQI1Nj5xrA==} peerDependencies: @@ -1517,6 +1545,27 @@ packages: - utf-8-validate dev: false + /@blocksuite/store/0.3.1-20230109032243-37ad3ba_yjs@13.5.44: + resolution: {integrity: sha512-zOUz19jfhuhsUkx9BGEQPZWbPyD/AgX0LB7ShVRdd3YM73x25hD6tPLLz1HEV2b69XokC0P9oSru4aNomm4jkg==} + peerDependencies: + yjs: ^13 + dependencies: + '@types/flexsearch': 0.7.3 + '@types/quill': 1.3.10 + buffer: 6.0.3 + flexsearch: 0.7.21 + idb-keyval: 6.2.0 + ky: 0.33.1 + lib0: 0.2.58 + y-protocols: 1.0.5 + y-webrtc: 10.2.3 + yjs: 13.5.44 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + /@changesets/apply-release-plan/6.1.3: resolution: {integrity: sha512-ECDNeoc3nfeAe1jqJb5aFQX7CqzQhD2klXRez2JDb/aVpGUbX673HgKrnrgJRuQR/9f2TtLoYIzrGB9qwD77mg==} dependencies: @@ -6416,8 +6465,8 @@ packages: /lit-element/3.2.2: resolution: {integrity: sha512-6ZgxBR9KNroqKb6+htkyBwD90XGRiqKDHVrW/Eh0EZ+l+iC+u+v+w3/BA5NGi4nizAVHGYvQBHUDuSmLjPp7NQ==} dependencies: - '@lit/reactive-element': 1.4.1 - lit-html: 2.4.0 + '@lit/reactive-element': 1.5.0 + lit-html: 2.5.0 dev: false /lit-html/2.4.0: diff --git a/packages/app/src/libs/i18n/scripts/api.ts b/scripts/i18n/api.ts similarity index 100% rename from packages/app/src/libs/i18n/scripts/api.ts rename to scripts/i18n/api.ts diff --git a/packages/app/src/libs/i18n/scripts/download.ts b/scripts/i18n/download.ts similarity index 100% rename from packages/app/src/libs/i18n/scripts/download.ts rename to scripts/i18n/download.ts diff --git a/packages/app/src/libs/i18n/scripts/request.ts b/scripts/i18n/request.ts similarity index 100% rename from packages/app/src/libs/i18n/scripts/request.ts rename to scripts/i18n/request.ts diff --git a/packages/app/src/libs/i18n/scripts/sync.ts b/scripts/i18n/sync.ts similarity index 100% rename from packages/app/src/libs/i18n/scripts/sync.ts rename to scripts/i18n/sync.ts diff --git a/packages/app/src/libs/i18n/scripts/utils.ts b/scripts/i18n/utils.ts similarity index 100% rename from packages/app/src/libs/i18n/scripts/utils.ts rename to scripts/i18n/utils.ts