There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
feat: migrate to database v3 (#3528)
Alex Yang32c08e49c52f
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex de3d480e10..c36de203da 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -305,7 +305,11 @@ jobs:runs-on: ubuntu-latestenvironment: developmentneeds: build-core-+ strategy:+ matrix:+ spec:+ - { package: 0.7.0-canary.18 }+ - { package: 0.8.0-canary.7 }steps:- uses: actions/checkout@v3- name: Setup Node.js@@ -322,22 +326,18 @@ jobs:- name: Unziprun: yarn unzip- working-directory: ./tests/affine-legacy/0.7.0-canary.18+ working-directory: ./tests/affine-legacy/${{ matrix.spec.package }}- - name: Run legacy playwright tests+ - name: Run playwright testsrun: yarn e2e --forbid-only- working-directory: ./tests/affine-legacy/0.7.0-canary.18-- - name: Run vitest- run: yarn test- working-directory: ./tests/affine-legacy/0.7.0-canary.18+ working-directory: ./tests/affine-legacy/${{ matrix.spec.package }}- name: Upload test resultsif: ${{ failure() }}uses: actions/upload-artifact@v3with:- name: test-results-e2e-migration- path: ./tests/affine-legacy/0.7.0-canary.18/test-results+ name: test-results-e2e-migration-${{ matrix.spec.package }}+ path: ./tests/affine-legacy/${{ matrix.spec.package }}/test-resultsif-no-files-found: ignoredesktop-test:diff --git a/apps/core/package.json b/apps/core/package.jsonindex 04a6f4dda6..38a7bfda67 100644--- a/apps/core/package.json+++ b/apps/core/package.json@@ -18,13 +18,13 @@"@affine/jotai": "workspace:*","@affine/templates": "workspace:*","@affine/workspace": "workspace:*",- "@blocksuite/block-std": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/blocks": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/editor": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/global": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly","@blocksuite/icons": "^2.1.29",- "@blocksuite/lit": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly","@dnd-kit/core": "^6.0.8","@dnd-kit/sortable": "^7.0.2","@emotion/cache": "^11.11.0",diff --git a/apps/core/src/bootstrap/before-app.ts b/apps/core/src/bootstrap/before-app.tsindex c2ce057184..b8c8b70d14 100644--- a/apps/core/src/bootstrap/before-app.ts+++ b/apps/core/src/bootstrap/before-app.ts@@ -1,4 +1,7 @@-import { migrateToSubdoc } from '@affine/env/blocksuite';+import {+ migrateDatabaseBlockTo3,+ migrateToSubdoc,+} from '@affine/env/blocksuite';import { setupGlobal } from '@affine/env/global';import type {LocalIndexedDBDownloadProvider,@@ -64,6 +67,7 @@ if (value) {return;}const newWorkspace = upgradeV1ToV2(workspace);+ await migrateDatabaseBlockTo3(newWorkspace.blockSuiteWorkspace.doc);const newId = await adapter.CRUD.create(newWorkspace.blockSuiteWorkspace@@ -75,13 +79,41 @@ if (value) {newMetadata[index] = {...oldMeta,id: newId,- version: WorkspaceVersion.SubDoc,+ version: WorkspaceVersion.DatabaseV3,};await migrateLocalBlobStorage(workspace.id, newId);+ console.log('migrate to v2');};// create a new workspace and push it to metadatapromises.push(upgrade());+ } else if (oldMeta.version < WorkspaceVersion.DatabaseV3) {+ const adapter = WorkspaceAdapters[oldMeta.flavour];+ assertExists(adapter);+ promises.push(+ (async () => {+ const workspace = await adapter.CRUD.get(oldMeta.id);+ if (workspace) {+ const provider = createIndexedDBDownloadProvider(+ workspace.id,+ workspace.blockSuiteWorkspace.doc,+ {+ awareness:+ workspace.blockSuiteWorkspace.awarenessStore.awareness,+ }+ ) as LocalIndexedDBDownloadProvider;+ provider.sync();+ await provider.whenReady;+ await migrateDatabaseBlockTo3(workspace.blockSuiteWorkspace.doc);+ }+ const index = newMetadata.findIndex(meta => meta.id === oldMeta.id);+ console.log('migrate to v3');+ newMetadata[index] = {+ ...oldMeta,+ version: WorkspaceVersion.DatabaseV3,+ };+ })()+ );}});@@ -110,12 +142,11 @@ const createFirst = (): RootWorkspaceMetadataV2[] => {return Plugins.flatMap(Plugin => {return Plugin.Events['app:init']?.().map(id =>- ({+ <RootWorkspaceMetadataV2>{id,flavour: Plugin.flavour,- // new workspace should all support sub-doc feature- version: WorkspaceVersion.SubDoc,- }) satisfies RootWorkspaceMetadataV2+ version: WorkspaceVersion.DatabaseV3,+ });}).filter((ids): ids is RootWorkspaceMetadataV2 => !!ids);};diff --git a/apps/core/src/hooks/use-transform-workspace.ts b/apps/core/src/hooks/use-transform-workspace.tsindex 6e5a6521db..81ae8dcc77 100644--- a/apps/core/src/hooks/use-transform-workspace.ts+++ b/apps/core/src/hooks/use-transform-workspace.ts@@ -25,12 +25,12 @@ export function useTransformWorkspace() {workspace.blockSuiteWorkspace);await WorkspaceAdapters[from].CRUD.delete(workspace as any);- await set(workspaces => {+ set(workspaces => {const idx = workspaces.findIndex(ws => ws.id === workspace.id);workspaces.splice(idx, 1, {id: newId,flavour: to,- version: WorkspaceVersion.SubDoc,+ version: WorkspaceVersion.DatabaseV3,});return [...workspaces];});diff --git a/apps/core/src/hooks/use-workspaces.ts b/apps/core/src/hooks/use-workspaces.tsindex 5025c94ff1..25c81356bb 100644--- a/apps/core/src/hooks/use-workspaces.ts+++ b/apps/core/src/hooks/use-workspaces.ts@@ -27,12 +27,12 @@ export function useAppHelper() {async (workspaceId: string): Promise<string> => {getOrCreateWorkspace(workspaceId, WorkspaceFlavour.LOCAL);saveWorkspaceToLocalStorage(workspaceId);- await set(workspaces => [+ set(workspaces => [...workspaces,{id: workspaceId,flavour: WorkspaceFlavour.LOCAL,- version: WorkspaceVersion.SubDoc,+ version: WorkspaceVersion.DatabaseV3,},]);logger.debug('imported local workspace', workspaceId);@@ -72,12 +72,12 @@ export function useAppHelper() {jumpOnce: true,});}- await set(workspaces => [+ set(workspaces => [...workspaces,{id,flavour: WorkspaceFlavour.LOCAL,- version: WorkspaceVersion.SubDoc,+ version: WorkspaceVersion.DatabaseV3,},]);logger.debug('created local workspace', id);diff --git a/apps/docs/package.json b/apps/docs/package.jsonindex 9557aac8c9..f1e2d5fc7a 100644--- a/apps/docs/package.json+++ b/apps/docs/package.json@@ -10,12 +10,12 @@},"dependencies": {"@affine/component": "workspace:*",- "@blocksuite/block-std": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/blocks": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/editor": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/global": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/lit": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly","express": "^4.18.2","jotai": "^2.2.2","react": "18.3.0-canary-1fdacbefd-20230630",diff --git a/apps/electron/package.json b/apps/electron/package.jsonindex 77abd00e10..260c6a30d1 100644--- a/apps/electron/package.json+++ b/apps/electron/package.json@@ -27,10 +27,10 @@"@affine/env": "workspace:*","@affine/maker-dmg": "workspace:*","@affine/native": "workspace:*",- "@blocksuite/blocks": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/editor": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/lit": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly","@electron-forge/cli": "^6.2.1","@electron-forge/core": "^6.2.1","@electron-forge/core-utils": "^6.2.1",diff --git a/apps/storybook/package.json b/apps/storybook/package.jsonindex dfa6b8901f..b5c9e4fc51 100644--- a/apps/storybook/package.json+++ b/apps/storybook/package.json@@ -30,13 +30,13 @@"wait-on": "^7.0.1"},"devDependencies": {- "@blocksuite/block-std": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/blocks": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/editor": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/global": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly","@blocksuite/icons": "^2.1.29",- "@blocksuite/lit": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly","react": "18.2.0","react-dom": "18.2.0"},diff --git a/packages/component/package.json b/packages/component/package.jsonindex 26db1b7407..c719f0a8f4 100644--- a/packages/component/package.json+++ b/packages/component/package.json@@ -52,12 +52,12 @@"rxjs": "^7.8.1"},"devDependencies": {- "@blocksuite/blocks": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/editor": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/global": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly","@blocksuite/icons": "^2.1.29",- "@blocksuite/lit": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly","@types/react": "^18.2.17","@types/react-datepicker": "^4.15.0","@types/react-dnd": "^3.0.2",diff --git a/packages/env/package.json b/packages/env/package.jsonindex 15d466f97c..8c8df4f1da 100644--- a/packages/env/package.json+++ b/packages/env/package.json@@ -6,7 +6,7 @@"module": "./src/index.ts","types": "./src/global.ts","devDependencies": {- "@blocksuite/global": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly","react": "18.2.0","react-dom": "18.2.0","zod": "^3.21.4"diff --git a/packages/env/src/blocksuite/subdoc-migration.ts b/packages/env/src/blocksuite/subdoc-migration.tsindex e9a82cbbb0..cf715a9c12 100644--- a/packages/env/src/blocksuite/subdoc-migration.ts+++ b/packages/env/src/blocksuite/subdoc-migration.ts@@ -239,3 +239,15 @@ export function migrateToSubdoc(doc: Y.Doc): Y.Doc {migrateBlocks(doc, output);return output;}++export async function migrateDatabaseBlockTo3(doc: Y.Doc) {+ const { migratePageBlock } = await import(+ '@blocksuite/store/workspace/migration/migrate-block'+ );+ migratePageBlock(doc, {+ 'affine:database': 2,+ });+ const meta = doc.getMap('meta') as Y.Map<unknown>;+ const versions = meta.get('blockVersions') as Y.Map<number>;+ versions.set('affine:database', 3);+}diff --git a/packages/env/src/workspace.ts b/packages/env/src/workspace.tsindex 8a725d70e3..a1b8478941 100644--- a/packages/env/src/workspace.ts+++ b/packages/env/src/workspace.ts@@ -11,6 +11,7 @@ import type { Collection } from './filter.js';export enum WorkspaceVersion {SubDoc = 2,+ DatabaseV3 = 3,}export enum WorkspaceSubPath {diff --git a/packages/hooks/package.json b/packages/hooks/package.jsonindex 3c65c509da..38fe018b49 100644--- a/packages/hooks/package.json+++ b/packages/hooks/package.json@@ -10,12 +10,12 @@"@toeverything/y-indexeddb": "workspace:*"},"devDependencies": {- "@blocksuite/block-std": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/blocks": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/editor": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/global": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/lit": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly"+ "@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly"},"peerDependencies": {"@blocksuite/block-std": "*",diff --git a/packages/jotai/package.json b/packages/jotai/package.jsonindex c8c3607488..675df8e31f 100644--- a/packages/jotai/package.json+++ b/packages/jotai/package.json@@ -6,12 +6,12 @@"jotai": "^2.2.2"},"devDependencies": {- "@blocksuite/block-std": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/blocks": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/editor": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/global": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/lit": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly","lottie-web": "^5.12.2"},"peerDependencies": {diff --git a/packages/plugin-infra/package.json b/packages/plugin-infra/package.jsonindex 3261ad99dd..644a32ee01 100644--- a/packages/plugin-infra/package.json+++ b/packages/plugin-infra/package.json@@ -36,15 +36,15 @@}},"dependencies": {- "@blocksuite/global": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly","jotai": "^2.2.2","zod": "^3.21.4"},"devDependencies": {- "@blocksuite/blocks": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/editor": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/lit": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/editor": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/lit": "0.0.0-20230802200139-381599c0-nightly","vite": "^4.4.7","vite-plugin-dts": "3.3.1"},diff --git a/packages/workspace/src/atom.ts b/packages/workspace/src/atom.tsindex 2b09500d0b..403a0d86ec 100644--- a/packages/workspace/src/atom.ts+++ b/packages/workspace/src/atom.ts@@ -139,7 +139,7 @@ const rootWorkspacesMetadataPromiseAtom = atom<...item.map(x => ({id: x.id,flavour: x.flavour,- version: WorkspaceVersion.SubDoc,+ version: WorkspaceVersion.DatabaseV3,})));} catch (e) {diff --git a/packages/y-indexeddb/package.json b/packages/y-indexeddb/package.jsonindex e672e5316e..751b8bd0a3 100644--- a/packages/y-indexeddb/package.json+++ b/packages/y-indexeddb/package.json@@ -37,8 +37,8 @@},"devDependencies": {"@affine/y-provider": "workspace:*",- "@blocksuite/blocks": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly","vite": "^4.4.7","vite-plugin-dts": "3.3.1","y-indexeddb": "^9.0.11"diff --git a/packages/y-provider/package.json b/packages/y-provider/package.jsonindex cae84dcd29..35bbe51dbf 100644--- a/packages/y-provider/package.json+++ b/packages/y-provider/package.json@@ -5,7 +5,7 @@"description": "Yjs provider utilities for AFFiNE","main": "./src/index.ts","devDependencies": {- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly"+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly"},"peerDependencies": {"yjs": "^13.5.51"diff --git a/tests/affine-legacy/0.7.0-canary.18/e2e/basic.spec.ts b/tests/affine-legacy/0.7.0-canary.18/e2e/basic.spec.tsindex 1e13ddd386..3da3e12cd8 100644--- a/tests/affine-legacy/0.7.0-canary.18/e2e/basic.spec.ts+++ b/tests/affine-legacy/0.7.0-canary.18/e2e/basic.spec.ts@@ -63,24 +63,6 @@ test('init page', async ({ page, context }) => {const locator = page.locator('v-line').nth(0);await locator.fill('hello');- const currentWorkspaceId: string = await page.evaluate(- () => (globalThis as any).currentWorkspace.id- );-- const downloadPromise = page.waitForEvent('download');- await page.evaluate(() => {- const workspace = (globalThis as any).currentWorkspace.blockSuiteWorkspace;- workspace.exportYDoc();- });-- const download = await downloadPromise;- const output = resolve(- __dirname,- '..',- 'fixtures',- currentWorkspaceId + '.ydoc'- );- await download.saveAs(output);await switchToNext();await page.waitForTimeout(1000);await page.goto('http://localhost:8081/');diff --git a/tests/affine-legacy/0.7.0-canary.18/fixtures/.gitkeep b/tests/affine-legacy/0.7.0-canary.18/fixtures/.gitkeepdeleted file mode 100644index e69de29bb2..0000000000diff --git a/tests/affine-legacy/0.7.0-canary.18/package.json b/tests/affine-legacy/0.7.0-canary.18/package.jsonindex 8e980d1eea..47c1e6b420 100644--- a/tests/affine-legacy/0.7.0-canary.18/package.json+++ b/tests/affine-legacy/0.7.0-canary.18/package.json@@ -10,16 +10,14 @@"devDependencies": {"@affine-test/fixtures": "workspace:*","@affine-test/kit": "workspace:*",- "@affine/env": "workspace:*",- "@blocksuite/block-std": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/blocks": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/global": "0.0.0-20230731152415-fdd3d9b0-nightly",- "@blocksuite/store": "0.0.0-20230731152415-fdd3d9b0-nightly",+ "@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly","@playwright/test": "^1.36.2","express": "^4.18.2","http-proxy-middleware": "^3.0.0-beta.1",- "serve": "^14.2.0",- "vitest": "^0.33.0"+ "serve": "^14.2.0"},"version": "0.8.0-canary.7"}diff --git a/tests/affine-legacy/0.7.0-canary.18/tests/basic.spec.ts b/tests/affine-legacy/0.7.0-canary.18/tests/basic.spec.tsdeleted file mode 100644index 2352984210..0000000000--- a/tests/affine-legacy/0.7.0-canary.18/tests/basic.spec.ts+++ /dev/null@@ -1,41 +0,0 @@-import { readdir, readFile } from 'node:fs/promises';-import { extname, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';--import { migrateToSubdoc } from '@affine/env/blocksuite';-import { Workspace } from '@blocksuite/store';-import { test } from 'vitest';--const __dirname = fileURLToPath(new URL('.', import.meta.url));--test('basic', async () => {- const oldDoc = new Workspace.Y.Doc();- const directory = resolve(__dirname, '..', 'fixtures');- const files = await readdir(directory);- for (const file of files) {- if (extname(file) !== '.ydoc') {- continue;- }- const filePath = resolve(directory, file);- const buffer = await readFile(filePath);- Workspace.Y.applyUpdate(oldDoc, buffer);- const newDoc = migrateToSubdoc(oldDoc);- const workspace = new Workspace({- id: 'test',- });- Workspace.Y.applyUpdate(- workspace.doc,- Workspace.Y.encodeStateAsUpdate(newDoc)- );- newDoc.subdocs.forEach(subdoc => {- workspace.doc.subdocs.forEach(workspaceSubDoc => {- if (subdoc.guid === workspaceSubDoc.guid) {- Workspace.Y.applyUpdate(- workspaceSubDoc,- Workspace.Y.encodeStateAsUpdate(subdoc)- );- }- });- });- }-});diff --git a/tests/affine-legacy/0.7.0-canary.18/tsconfig.json b/tests/affine-legacy/0.7.0-canary.18/tsconfig.jsonindex d539ee75c4..0b284713e8 100644--- a/tests/affine-legacy/0.7.0-canary.18/tsconfig.json+++ b/tests/affine-legacy/0.7.0-canary.18/tsconfig.json@@ -4,10 +4,5 @@"esModuleInterop": true,"outDir": "lib"},- "include": ["e2e"],- "references": [- {- "path": "./tsconfig.node.json"- }- ]+ "include": ["e2e"]}diff --git a/tests/affine-legacy/0.7.0-canary.18/tsconfig.node.json b/tests/affine-legacy/0.7.0-canary.18/tsconfig.node.jsondeleted file mode 100644index e111452b12..0000000000--- a/tests/affine-legacy/0.7.0-canary.18/tsconfig.node.json+++ /dev/null@@ -1,19 +0,0 @@-{- "extends": "../../../tsconfig.json",- "compilerOptions": {- "composite": true,- "target": "ESNext",- "module": "ESNext",- "resolveJsonModule": true,- "moduleResolution": "Node",- "allowSyntheticDefaultImports": true,- "noEmit": false,- "outDir": "lib"- },- "include": ["tests"],- "references": [- {- "path": "../../../packages/env"- }- ]-}diff --git a/tests/affine-legacy/0.7.0-canary.18/vitest.config.ts b/tests/affine-legacy/0.7.0-canary.18/vitest.config.tsdeleted file mode 100644index ebd854eed3..0000000000--- a/tests/affine-legacy/0.7.0-canary.18/vitest.config.ts+++ /dev/null@@ -1,7 +0,0 @@-import { defineConfig } from 'vitest/config';--export default defineConfig({- test: {- include: ['./tests/**/*.spec.ts'],- },-});diff --git a/tests/affine-legacy/0.8.0-canary.7/.gitignore b/tests/affine-legacy/0.8.0-canary.7/.gitignorenew file mode 100644index 0000000000..c953fbf54e--- /dev/null+++ b/tests/affine-legacy/0.8.0-canary.7/.gitignore@@ -0,0 +1,3 @@+static+fixtures/*.ydoc+test-resultsdiff --git a/tests/affine-legacy/0.8.0-canary.7/README.md b/tests/affine-legacy/0.8.0-canary.7/README.mdnew file mode 100644index 0000000000..1c660ffe68--- /dev/null+++ b/tests/affine-legacy/0.8.0-canary.7/README.md@@ -0,0 +1,7 @@+# AFFiNE Legacy 0.8.0-canary.7++> This package is static output of AFFiNE 0.8.0-canary.7+>+> **This package is for debug only**.+>+> DO NOT MODIFY `affine-core.zip`diff --git a/tests/affine-legacy/0.8.0-canary.7/affine-core.zip b/tests/affine-legacy/0.8.0-canary.7/affine-core.zipnew file mode 100644index 0000000000..98dc5a8b08Binary files /dev/null and b/tests/affine-legacy/0.8.0-canary.7/affine-core.zip differdiff --git a/tests/affine-legacy/0.8.0-canary.7/e2e/basic.spec.ts b/tests/affine-legacy/0.8.0-canary.7/e2e/basic.spec.tsnew file mode 100644index 0000000000..e8a936d444--- /dev/null+++ b/tests/affine-legacy/0.8.0-canary.7/e2e/basic.spec.ts@@ -0,0 +1,83 @@+import { resolve } from 'node:path';++import { expect, test } from '@playwright/test';+import express from 'express';+import { createProxyMiddleware } from 'http-proxy-middleware';++let app: express.Express;+let server: ReturnType<express.Express['listen']>;++process.env.DEBUG = 'http-proxy-middleware*';++async function switchToNext() {+ // close previous express server+ await new Promise<void>((resolve, reject) => {+ server.close(err => {+ if (err) {+ reject(err);+ }+ resolve();+ });+ });+ app = express();+ app.use(+ createProxyMiddleware({+ target: 'http://localhost:8080',+ pathFilter: ['**'],+ changeOrigin: true,+ })+ );+ return new Promise<void>(resolve => {+ server = app.listen(8081, () => {+ console.log('proxy to next.js server');+ resolve();+ });+ });+}++test.beforeEach(() => {+ app = express();+ app.use(express.static(resolve(__dirname, '..', 'static')));+ server = app.listen(8081);+});++test.afterEach(() => {+ server.close();+});++test('database migration', async ({ page, context }) => {+ {+ // make sure 8080 is ready+ const page = await context.newPage();+ await page.goto('http://localhost:8080/');+ await page.waitForSelector('v-line', {+ timeout: 10000,+ });+ await page.close();+ }+ await page.goto('http://localhost:8081/');+ await page.waitForSelector('v-line', {+ timeout: 10000,+ });+ await page.getByTestId('new-page-button').click();+ const title = page.locator('.affine-default-page-block-title');+ await title.type('hello');+ await page.keyboard.press('Enter', { delay: 50 });+ await page.keyboard.press('/', { delay: 50 });+ await page.keyboard.press('d');+ await page.keyboard.press('a');+ await page.keyboard.press('t');+ await page.keyboard.press('a');+ await page.keyboard.press('b');+ await page.keyboard.press('a', { delay: 50 });+ await page.keyboard.press('Enter', { delay: 50 });++ await switchToNext();+ await page.waitForTimeout(1000);+ await page.goto('http://localhost:8081/');+ await page.waitForSelector('v-line', {+ timeout: 10000,+ });+ expect(await page.locator('v-line').nth(0).textContent()).toBe('hello');+ expect(await page.locator('affine-database').isVisible()).toBe(true);+});diff --git a/tests/affine-legacy/0.8.0-canary.7/package.json b/tests/affine-legacy/0.8.0-canary.7/package.jsonnew file mode 100644index 0000000000..5f6dcbd9d0--- /dev/null+++ b/tests/affine-legacy/0.8.0-canary.7/package.json@@ -0,0 +1,22 @@+{+ "name": "@affine-legacy/0.8.0-canary.7",+ "description": "AFFiNE 0.8.0-canary.7 static output",+ "scripts": {+ "unzip": "unzip affine-core -d static",+ "start": "yarn exec serve -s static -l 8082",+ "e2e": "yarn playwright test"+ },+ "devDependencies": {+ "@affine-test/fixtures": "workspace:*",+ "@affine-test/kit": "workspace:*",+ "@blocksuite/block-std": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/blocks": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/global": "0.0.0-20230802200139-381599c0-nightly",+ "@blocksuite/store": "0.0.0-20230802200139-381599c0-nightly",+ "@playwright/test": "^1.36.2",+ "express": "^4.18.2",+ "http-proxy-middleware": "^3.0.0-beta.1",+ "serve": "^14.2.0"+ },+ "version": "0.8.0-canary.7"+}diff --git a/tests/affine-legacy/0.8.0-canary.7/playwright.config.ts b/tests/affine-legacy/0.8.0-canary.7/playwright.config.tsnew file mode 100644index 0000000000..3178c8d316--- /dev/null+++ b/tests/affine-legacy/0.8.0-canary.7/playwright.config.ts@@ -0,0 +1,45 @@+import type {+ PlaywrightTestConfig,+ PlaywrightWorkerOptions,+} from '@playwright/test';++const config: PlaywrightTestConfig = {+ testDir: './e2e',+ fullyParallel: true,+ timeout: process.env.CI ? 50_000 : 30_000,+ use: {+ baseURL: 'http://localhost:8081/',+ browserName:+ (process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??+ 'chromium',+ permissions: ['clipboard-read', 'clipboard-write'],+ viewport: { width: 1440, height: 800 },+ actionTimeout: 5 * 1000,+ locale: 'en-US',+ trace: 'on-first-retry',+ video: 'on-first-retry',+ },+ forbidOnly: !!process.env.CI,+ workers: 4,+ retries: 1,+ reporter: process.env.CI ? 'github' : 'list',+ webServer: [+ // Intentionally not building the web, reminds you to run it by yourself.+ {+ command: 'yarn -T run start:web-static',+ port: 8080,+ timeout: 120 * 1000,+ reuseExistingServer: !process.env.CI,+ env: {+ COVERAGE: process.env.COVERAGE || 'false',+ },+ },+ ],+};++if (process.env.CI) {+ config.retries = 3;+ config.workers = '50%';+}++export default config;diff --git a/tests/affine-legacy/0.8.0-canary.7/tsconfig.json b/tests/affine-legacy/0.8.0-canary.7/tsconfig.jsonnew file mode 100644index 0000000000..0b284713e8--- /dev/null+++ b/tests/affine-legacy/0.8.0-canary.7/tsconfig.json@@ -0,0 +1,8 @@+{+ "extends": "../../../tsconfig.json",+ "compilerOptions": {+ "esModuleInterop": true,+ "outDir": "lib"+ },+ "include": ["e2e"]+}diff --git a/yarn.lock b/yarn.lockindex d86835dbc9..1b4ae05bf3 100644--- a/yarn.lock+++ b/yarn.lock@@ -25,16 +25,31 @@ __metadata:dependencies:"@affine-test/fixtures": "workspace:*""@affine-test/kit": "workspace:*"- "@affine/env": "workspace:*"- "@blocksuite/block-std": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly+ "@playwright/test": ^1.36.2+ express: ^4.18.2+ http-proxy-middleware: ^3.0.0-beta.1+ serve: ^14.2.0+ languageName: unknown+ linkType: soft++"@affine-legacy/0.8.0-canary.7@workspace:tests/affine-legacy/0.8.0-canary.7":+ version: 0.0.0-use.local+ resolution: "@affine-legacy/0.8.0-canary.7@workspace:tests/affine-legacy/0.8.0-canary.7"+ dependencies:+ "@affine-test/fixtures": "workspace:*"+ "@affine-test/kit": "workspace:*"+ "@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly"@playwright/test": ^1.36.2express: ^4.18.2http-proxy-middleware: ^3.0.0-beta.1serve: ^14.2.0- vitest: ^0.33.0languageName: unknownlinkType: soft@@ -111,12 +126,12 @@ __metadata:"@affine/i18n": "workspace:*""@affine/jotai": "workspace:*""@affine/workspace": "workspace:*"- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/editor": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly"@blocksuite/icons": ^2.1.29- "@blocksuite/lit": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly"@dnd-kit/core": ^6.0.8"@dnd-kit/sortable": ^7.0.2"@emotion/cache": ^11.11.0@@ -201,13 +216,13 @@ __metadata:"@affine/jotai": "workspace:*""@affine/templates": "workspace:*""@affine/workspace": "workspace:*"- "@blocksuite/block-std": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/editor": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly"@blocksuite/icons": ^2.1.29- "@blocksuite/lit": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly"@dnd-kit/core": ^6.0.8"@dnd-kit/sortable": ^7.0.2"@emotion/cache": ^11.11.0@@ -276,12 +291,12 @@ __metadata:resolution: "@affine/docs@workspace:apps/docs"dependencies:"@affine/component": "workspace:*"- "@blocksuite/block-std": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/editor": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/lit": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly"@types/react": ^18.2.17"@types/react-dom": ^18.2.7"@vanilla-extract/css": ^1.12.0@@ -306,10 +321,10 @@ __metadata:"@affine/env": "workspace:*""@affine/maker-dmg": "workspace:*""@affine/native": "workspace:*"- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/editor": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/lit": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly"@electron-forge/cli": ^6.2.1"@electron-forge/core": ^6.2.1"@electron-forge/core-utils": ^6.2.1@@ -353,7 +368,7 @@ __metadata:version: 0.0.0-use.localresolution: "@affine/env@workspace:packages/env"dependencies:- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightlylit: ^2.7.6react: 18.2.0react-dom: 18.2.0@@ -425,12 +440,12 @@ __metadata:version: 0.0.0-use.localresolution: "@affine/jotai@workspace:packages/jotai"dependencies:- "@blocksuite/block-std": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/editor": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/lit": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightlyjotai: ^2.2.2lottie-web: ^5.12.2peerDependencies:@@ -615,13 +630,13 @@ __metadata:dependencies:"@affine/component": "workspace:*""@affine/i18n": "workspace:*"- "@blocksuite/block-std": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/editor": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly"@blocksuite/icons": ^2.1.29- "@blocksuite/lit": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly"@storybook/addon-actions": ^7.1.1"@storybook/addon-essentials": ^7.1.1"@storybook/addon-interactions": ^7.1.1@@ -699,7 +714,7 @@ __metadata:version: 0.0.0-use.localresolution: "@affine/y-provider@workspace:packages/y-provider"dependencies:- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightlypeerDependencies:yjs: ^13.5.51languageName: unknown@@ -3316,25 +3331,25 @@ __metadata:languageName: nodelinkType: hard-"@blocksuite/block-std@npm:0.0.0-20230731152415-fdd3d9b0-nightly":- version: 0.0.0-20230731152415-fdd3d9b0-nightly- resolution: "@blocksuite/block-std@npm:0.0.0-20230731152415-fdd3d9b0-nightly"+"@blocksuite/block-std@npm:0.0.0-20230802200139-381599c0-nightly":+ version: 0.0.0-20230802200139-381599c0-nightly+ resolution: "@blocksuite/block-std@npm:0.0.0-20230802200139-381599c0-nightly"dependencies:- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightlyw3c-keyname: ^2.2.8peerDependencies:- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly- checksum: 6b63840678f0acbef816e27c669875cd252a15f57946086429e3053f830538839ebffd82ed9590fc51556acb4574945d0ba9a07113a733cc4c2870a63b3aaa7f+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly+ checksum: 3e5eee5b46d81bd337910cb881fbfa1e4bd1d17e346f215122688b17c70645e7e3d7ffba5eebe3b13aa26ae28c8ddd7eb721df758ec433cbd8481d9eb12e80c7languageName: nodelinkType: hard-"@blocksuite/blocks@npm:0.0.0-20230731152415-fdd3d9b0-nightly":- version: 0.0.0-20230731152415-fdd3d9b0-nightly- resolution: "@blocksuite/blocks@npm:0.0.0-20230731152415-fdd3d9b0-nightly"+"@blocksuite/blocks@npm:0.0.0-20230802200139-381599c0-nightly":+ version: 0.0.0-20230802200139-381599c0-nightly+ resolution: "@blocksuite/blocks@npm:0.0.0-20230802200139-381599c0-nightly"dependencies:- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/phasor": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/virgo": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/phasor": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/virgo": 0.0.0-20230802200139-381599c0-nightly"@floating-ui/dom": ^1.5.1buffer: ^6.0.3date-fns: ^2.30.0@@ -3349,34 +3364,34 @@ __metadata:turndown: ^7.1.2zod: ^3.21.4peerDependencies:- "@blocksuite/block-std": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/lit": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightlyyjs: ^13- checksum: 2afc822f08cefe871bdd31877bc2544bc133caf86612f8416b6c759e939b9260e41e65fc33b5c44b4c71a64d2dec26a46da9f98d7713e37428019e1419e8d8d2+ checksum: 5a7e092a73abb7d30ce4111eb04b8c9cd6c191bee417cd95831dda0fea43e8e4508399c6ebba2805600017c3f62ddddf58a162747045ec0363d5664a69b0c738languageName: nodelinkType: hard-"@blocksuite/editor@npm:0.0.0-20230731152415-fdd3d9b0-nightly":- version: 0.0.0-20230731152415-fdd3d9b0-nightly- resolution: "@blocksuite/editor@npm:0.0.0-20230731152415-fdd3d9b0-nightly"+"@blocksuite/editor@npm:0.0.0-20230802200139-381599c0-nightly":+ version: 0.0.0-20230802200139-381599c0-nightly+ resolution: "@blocksuite/editor@npm:0.0.0-20230802200139-381599c0-nightly"dependencies:- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly- "@toeverything/theme": 0.7.7+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightlylit: ^2.7.6marked: ^4.3.0turndown: ^7.1.2peerDependencies:- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/lit": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly- checksum: 935f3c074ee965cdbe26b68d1e52e99b27fae3da2b89600d369be849c6dd41fac6cfcc882d60d715fa505c66dac48bac8470ecc69652dbd42ddb063c9322a22f+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly+ "@toeverything/theme": ^0.7.9+ checksum: 625fcb6c7ca84fdd071d21a101ce74a6d6d6abf2aa4a0c4e03b69ede8ca7d2aa6190d51c7dd7d38812047020177ca69f9c63ee073388440852f209bd0d499760languageName: nodelinkType: hard-"@blocksuite/global@npm:0.0.0-20230731152415-fdd3d9b0-nightly":- version: 0.0.0-20230731152415-fdd3d9b0-nightly- resolution: "@blocksuite/global@npm:0.0.0-20230731152415-fdd3d9b0-nightly"+"@blocksuite/global@npm:0.0.0-20230802200139-381599c0-nightly":+ version: 0.0.0-20230802200139-381599c0-nightly+ resolution: "@blocksuite/global@npm:0.0.0-20230802200139-381599c0-nightly"dependencies:ansi-colors: ^4.1.3zod: ^3.21.4@@ -3385,7 +3400,7 @@ __metadata:peerDependenciesMeta:lit:optional: true- checksum: 62e9fef3c7d971962d0cc105b61e48a3fef396dc3dbbf24f4e514a0b407f9748502436590ebe87047443d016dc5c49f36e77e1d8a92113b1d80a5211184c06ed+ checksum: b3d5cbcd47d9abad01f6342a9e487dd1e379b4b04138d422609615159004c944b3b32842ed487057739445ed054685f33b076543fd2a890b81aeef43538e4695languageName: nodelinkType: hard@@ -3399,38 +3414,38 @@ __metadata:languageName: nodelinkType: hard-"@blocksuite/lit@npm:0.0.0-20230731152415-fdd3d9b0-nightly":- version: 0.0.0-20230731152415-fdd3d9b0-nightly- resolution: "@blocksuite/lit@npm:0.0.0-20230731152415-fdd3d9b0-nightly"+"@blocksuite/lit@npm:0.0.0-20230802200139-381599c0-nightly":+ version: 0.0.0-20230802200139-381599c0-nightly+ resolution: "@blocksuite/lit@npm:0.0.0-20230802200139-381599c0-nightly"dependencies:- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightlylit: ^2.7.6peerDependencies:- "@blocksuite/block-std": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly- checksum: 22ea11275fa819fd736b1885a983311d9e784e47a2f4530a164102c884e1951ebf349a16e7371b978b5c2a347246d5bc755fe2a49d1bc0547b021c0f5c19673f+ "@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly+ checksum: 37527900693208bf7456d1d528b5c3cc742a12afd385023bbd3e8a941140eda539cc18598f3af37a69d82be8217c9c47be3e65cb56ed2c13d38b55b992cc44e5languageName: nodelinkType: hard-"@blocksuite/phasor@npm:0.0.0-20230731152415-fdd3d9b0-nightly":- version: 0.0.0-20230731152415-fdd3d9b0-nightly- resolution: "@blocksuite/phasor@npm:0.0.0-20230731152415-fdd3d9b0-nightly"+"@blocksuite/phasor@npm:0.0.0-20230802200139-381599c0-nightly":+ version: 0.0.0-20230802200139-381599c0-nightly+ resolution: "@blocksuite/phasor@npm:0.0.0-20230802200139-381599c0-nightly"dependencies:- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightlyfractional-indexing: ^3.2.0peerDependencies:nanoid: ^4yjs: ^13- checksum: 0628bf1ac714e434dddf7b741d56cb07288788d778640c6ff94c1de11eda556140b50d3c972a9da52c9eb1ed158f1cbeaeece3739b72d4dde0d985599b2f2d78+ checksum: a8bc7f163181f2310c5dbf92684fec99a34056913549525888034b0396f69d4ddc7ff68199f4099f39bb46edb354b70385aa1d9c5f2ab9a837eff44c831def8clanguageName: nodelinkType: hard-"@blocksuite/store@npm:0.0.0-20230731152415-fdd3d9b0-nightly":- version: 0.0.0-20230731152415-fdd3d9b0-nightly- resolution: "@blocksuite/store@npm:0.0.0-20230731152415-fdd3d9b0-nightly"+"@blocksuite/store@npm:0.0.0-20230802200139-381599c0-nightly":+ version: 0.0.0-20230802200139-381599c0-nightly+ resolution: "@blocksuite/store@npm:0.0.0-20230802200139-381599c0-nightly"dependencies:- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/virgo": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/virgo": 0.0.0-20230802200139-381599c0-nightly"@types/flexsearch": ^0.7.3buffer: ^6.0.3flexsearch: 0.7.21@@ -3445,20 +3460,20 @@ __metadata:peerDependencies:async-call-rpc: ^6yjs: ^13- checksum: ee9cf10ef0d84af5f6545f1a6f9ee0eb16e950922803cfaa511c195dd28154919d136d056ffc0b645d00b3a9faa4ec387214c2f0ebe7ffcc1f619929df476e2a+ checksum: a413d433b540646cc7fc70ae4a775e99177f86935c90082f7f9f2a45ced95873818056a75675e9dd0c4903682b127a44bfe87cd6adb8950181643aead018c44clanguageName: nodelinkType: hard-"@blocksuite/virgo@npm:0.0.0-20230731152415-fdd3d9b0-nightly":- version: 0.0.0-20230731152415-fdd3d9b0-nightly- resolution: "@blocksuite/virgo@npm:0.0.0-20230731152415-fdd3d9b0-nightly"+"@blocksuite/virgo@npm:0.0.0-20230802200139-381599c0-nightly":+ version: 0.0.0-20230802200139-381599c0-nightly+ resolution: "@blocksuite/virgo@npm:0.0.0-20230802200139-381599c0-nightly"dependencies:- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightlyzod: ^3.21.4peerDependencies:lit: ^2.7yjs: ^13- checksum: 336843fb8150520d070f6b3eeacc50dc140dcac1c8f31b4bb1a89cfdb2208f6d3989662f5e055b122c6e59b072c49ee43449ec522bc6557409a94ea4cfc830eb+ checksum: 3962c2e4d44fa8086bf2796dee4af9d69fc01301f9f6dc9897405877e074932128aaa455158ae1ddefbeb435fe47eea6acb76f8034a7bf88acddb4d66c0dff34languageName: nodelinkType: hard@@ -11341,12 +11356,12 @@ __metadata:resolution: "@toeverything/hooks@workspace:packages/hooks"dependencies:"@affine/env": "workspace:*"- "@blocksuite/block-std": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/editor": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/lit": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/block-std": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly"@toeverything/y-indexeddb": "workspace:*"peerDependencies:"@blocksuite/block-std": "*"@@ -11381,11 +11396,11 @@ __metadata:version: 0.0.0-use.localresolution: "@toeverything/plugin-infra@workspace:packages/plugin-infra"dependencies:- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/editor": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/lit": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/editor": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/lit": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightlyjotai: ^2.2.2vite: ^4.4.7vite-plugin-dts: 3.3.1@@ -11399,13 +11414,6 @@ __metadata:languageName: unknownlinkType: soft-"@toeverything/theme@npm:0.7.7":- version: 0.7.7- resolution: "@toeverything/theme@npm:0.7.7"- checksum: 5a449eb440c49c712069203d85acc73613a000324807ce2e42c3b441b74b74e54ba76292144b60e3900d54bf41a13f98923174fee527c20303ad6c68e26e6176- languageName: node- linkType: hard-"@toeverything/theme@npm:^0.7.9":version: 0.7.9resolution: "@toeverything/theme@npm:0.7.9"@@ -11418,8 +11426,8 @@ __metadata:resolution: "@toeverything/y-indexeddb@workspace:packages/y-indexeddb"dependencies:"@affine/y-provider": "workspace:*"- "@blocksuite/blocks": 0.0.0-20230731152415-fdd3d9b0-nightly- "@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly+ "@blocksuite/blocks": 0.0.0-20230802200139-381599c0-nightly+ "@blocksuite/store": 0.0.0-20230802200139-381599c0-nightlyidb: ^7.1.1vite: ^4.4.7vite-plugin-dts: 3.3.1