mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-30 13:20:45 +08:00
feat: migrate to database v3 (#3528)
This commit is contained in:
+10
-10
@@ -305,7 +305,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
environment: development
|
||||
needs: 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: Unzip
|
||||
run: 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 tests
|
||||
run: 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 results
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
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-results
|
||||
if-no-files-found: ignore
|
||||
|
||||
desktop-test:
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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 metadata
|
||||
promises.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);
|
||||
};
|
||||
|
||||
@@ -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];
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
|
||||
Vendored
+1
-1
@@ -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"
|
||||
|
||||
+12
@@ -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);
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -11,6 +11,7 @@ import type { Collection } from './filter.js';
|
||||
|
||||
export enum WorkspaceVersion {
|
||||
SubDoc = 2,
|
||||
DatabaseV3 = 3,
|
||||
}
|
||||
|
||||
export enum WorkspaceSubPath {
|
||||
|
||||
@@ -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": "*",
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -139,7 +139,7 @@ const rootWorkspacesMetadataPromiseAtom = atom<
|
||||
...item.map(x => ({
|
||||
id: x.id,
|
||||
flavour: x.flavour,
|
||||
version: WorkspaceVersion.SubDoc,
|
||||
version: WorkspaceVersion.DatabaseV3,
|
||||
}))
|
||||
);
|
||||
} catch (e) {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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/');
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -4,10 +4,5 @@
|
||||
"esModuleInterop": true,
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["e2e"],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.node.json"
|
||||
}
|
||||
]
|
||||
"include": ["e2e"]
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
include: ['./tests/**/*.spec.ts'],
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
static
|
||||
fixtures/*.ydoc
|
||||
test-results
|
||||
@@ -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`
|
||||
Binary file not shown.
@@ -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);
|
||||
});
|
||||
@@ -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"
|
||||
}
|
||||
@@ -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;
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
"outDir": "lib"
|
||||
},
|
||||
"include": ["e2e"]
|
||||
}
|
||||
@@ -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.2
|
||||
express: ^4.18.2
|
||||
http-proxy-middleware: ^3.0.0-beta.1
|
||||
serve: ^14.2.0
|
||||
vitest: ^0.33.0
|
||||
languageName: unknown
|
||||
linkType: 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.local
|
||||
resolution: "@affine/env@workspace:packages/env"
|
||||
dependencies:
|
||||
"@blocksuite/global": 0.0.0-20230731152415-fdd3d9b0-nightly
|
||||
"@blocksuite/global": 0.0.0-20230802200139-381599c0-nightly
|
||||
lit: ^2.7.6
|
||||
react: 18.2.0
|
||||
react-dom: 18.2.0
|
||||
@@ -425,12 +440,12 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@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-nightly
|
||||
jotai: ^2.2.2
|
||||
lottie-web: ^5.12.2
|
||||
peerDependencies:
|
||||
@@ -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.local
|
||||
resolution: "@affine/y-provider@workspace:packages/y-provider"
|
||||
dependencies:
|
||||
"@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
peerDependencies:
|
||||
yjs: ^13.5.51
|
||||
languageName: unknown
|
||||
@@ -3316,25 +3331,25 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: 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-nightly
|
||||
w3c-keyname: ^2.2.8
|
||||
peerDependencies:
|
||||
"@blocksuite/store": 0.0.0-20230731152415-fdd3d9b0-nightly
|
||||
checksum: 6b63840678f0acbef816e27c669875cd252a15f57946086429e3053f830538839ebffd82ed9590fc51556acb4574945d0ba9a07113a733cc4c2870a63b3aaa7f
|
||||
"@blocksuite/store": 0.0.0-20230802200139-381599c0-nightly
|
||||
checksum: 3e5eee5b46d81bd337910cb881fbfa1e4bd1d17e346f215122688b17c70645e7e3d7ffba5eebe3b13aa26ae28c8ddd7eb721df758ec433cbd8481d9eb12e80c7
|
||||
languageName: node
|
||||
linkType: 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.1
|
||||
buffer: ^6.0.3
|
||||
date-fns: ^2.30.0
|
||||
@@ -3349,34 +3364,34 @@ __metadata:
|
||||
turndown: ^7.1.2
|
||||
zod: ^3.21.4
|
||||
peerDependencies:
|
||||
"@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-nightly
|
||||
yjs: ^13
|
||||
checksum: 2afc822f08cefe871bdd31877bc2544bc133caf86612f8416b6c759e939b9260e41e65fc33b5c44b4c71a64d2dec26a46da9f98d7713e37428019e1419e8d8d2
|
||||
checksum: 5a7e092a73abb7d30ce4111eb04b8c9cd6c191bee417cd95831dda0fea43e8e4508399c6ebba2805600017c3f62ddddf58a162747045ec0363d5664a69b0c738
|
||||
languageName: node
|
||||
linkType: 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-nightly
|
||||
lit: ^2.7.6
|
||||
marked: ^4.3.0
|
||||
turndown: ^7.1.2
|
||||
peerDependencies:
|
||||
"@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: 625fcb6c7ca84fdd071d21a101ce74a6d6d6abf2aa4a0c4e03b69ede8ca7d2aa6190d51c7dd7d38812047020177ca69f9c63ee073388440852f209bd0d499760
|
||||
languageName: node
|
||||
linkType: 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.3
|
||||
zod: ^3.21.4
|
||||
@@ -3385,7 +3400,7 @@ __metadata:
|
||||
peerDependenciesMeta:
|
||||
lit:
|
||||
optional: true
|
||||
checksum: 62e9fef3c7d971962d0cc105b61e48a3fef396dc3dbbf24f4e514a0b407f9748502436590ebe87047443d016dc5c49f36e77e1d8a92113b1d80a5211184c06ed
|
||||
checksum: b3d5cbcd47d9abad01f6342a9e487dd1e379b4b04138d422609615159004c944b3b32842ed487057739445ed054685f33b076543fd2a890b81aeef43538e4695
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3399,38 +3414,38 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: 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-nightly
|
||||
lit: ^2.7.6
|
||||
peerDependencies:
|
||||
"@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: 37527900693208bf7456d1d528b5c3cc742a12afd385023bbd3e8a941140eda539cc18598f3af37a69d82be8217c9c47be3e65cb56ed2c13d38b55b992cc44e5
|
||||
languageName: node
|
||||
linkType: 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-nightly
|
||||
fractional-indexing: ^3.2.0
|
||||
peerDependencies:
|
||||
nanoid: ^4
|
||||
yjs: ^13
|
||||
checksum: 0628bf1ac714e434dddf7b741d56cb07288788d778640c6ff94c1de11eda556140b50d3c972a9da52c9eb1ed158f1cbeaeece3739b72d4dde0d985599b2f2d78
|
||||
checksum: a8bc7f163181f2310c5dbf92684fec99a34056913549525888034b0396f69d4ddc7ff68199f4099f39bb46edb354b70385aa1d9c5f2ab9a837eff44c831def8c
|
||||
languageName: node
|
||||
linkType: 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.3
|
||||
buffer: ^6.0.3
|
||||
flexsearch: 0.7.21
|
||||
@@ -3445,20 +3460,20 @@ __metadata:
|
||||
peerDependencies:
|
||||
async-call-rpc: ^6
|
||||
yjs: ^13
|
||||
checksum: ee9cf10ef0d84af5f6545f1a6f9ee0eb16e950922803cfaa511c195dd28154919d136d056ffc0b645d00b3a9faa4ec387214c2f0ebe7ffcc1f619929df476e2a
|
||||
checksum: a413d433b540646cc7fc70ae4a775e99177f86935c90082f7f9f2a45ced95873818056a75675e9dd0c4903682b127a44bfe87cd6adb8950181643aead018c44c
|
||||
languageName: node
|
||||
linkType: 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-nightly
|
||||
zod: ^3.21.4
|
||||
peerDependencies:
|
||||
lit: ^2.7
|
||||
yjs: ^13
|
||||
checksum: 336843fb8150520d070f6b3eeacc50dc140dcac1c8f31b4bb1a89cfdb2208f6d3989662f5e055b122c6e59b072c49ee43449ec522bc6557409a94ea4cfc830eb
|
||||
checksum: 3962c2e4d44fa8086bf2796dee4af9d69fc01301f9f6dc9897405877e074932128aaa455158ae1ddefbeb435fe47eea6acb76f8034a7bf88acddb4d66c0dff34
|
||||
languageName: node
|
||||
linkType: 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.local
|
||||
resolution: "@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-nightly
|
||||
jotai: ^2.2.2
|
||||
vite: ^4.4.7
|
||||
vite-plugin-dts: 3.3.1
|
||||
@@ -11399,13 +11414,6 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: 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.9
|
||||
resolution: "@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-nightly
|
||||
idb: ^7.1.1
|
||||
vite: ^4.4.7
|
||||
vite-plugin-dts: 3.3.1
|
||||
|
||||
Reference in New Issue
Block a user