mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 03:33:06 +08:00
feat: bump blocksuite (#5845)
This commit is contained in:
@@ -17,9 +17,9 @@
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/global": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/store": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/blocks": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/global": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/store": "0.12.0-canary-202402200831-bc2769f",
|
||||
"foxact": "^0.2.20",
|
||||
"jotai": "^2.5.1",
|
||||
"jotai-effect": "^0.5.0",
|
||||
@@ -33,8 +33,8 @@
|
||||
"devDependencies": {
|
||||
"@affine-test/fixtures": "workspace:*",
|
||||
"@affine/templates": "workspace:*",
|
||||
"@blocksuite/lit": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/presets": "0.12.0-canary-202402091051-49c1eff",
|
||||
"@blocksuite/lit": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@blocksuite/presets": "0.12.0-canary-202402200831-bc2769f",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"async-call-rpc": "^6.3.1",
|
||||
"react": "^18.2.0",
|
||||
|
||||
@@ -13,8 +13,8 @@ import { Map as YMap } from 'yjs';
|
||||
import { getLatestVersions } from '../migration/blocksuite';
|
||||
import { replaceIdMiddleware } from './middleware';
|
||||
|
||||
export async function initEmptyPage(page: Page, title?: string) {
|
||||
await page.load(() => {
|
||||
export function initEmptyPage(page: Page, title?: string) {
|
||||
page.load(() => {
|
||||
const pageBlockId = page.addBlock('affine:page', {
|
||||
title: new page.Text(title ?? ''),
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ describe('Workspace System', () => {
|
||||
const page = workspace.blockSuiteWorkspace.createPage({
|
||||
id: 'page0',
|
||||
});
|
||||
await page.load();
|
||||
page.load();
|
||||
page.addBlock('affine:page', {
|
||||
title: new page.Text('test-page'),
|
||||
});
|
||||
|
||||
@@ -45,7 +45,7 @@ describe('SyncEngine', () => {
|
||||
const page = workspace.createPage({
|
||||
id: 'page0',
|
||||
});
|
||||
await page.load();
|
||||
page.load();
|
||||
const pageBlockId = page.addBlock('affine:page', {
|
||||
title: new page.Text(''),
|
||||
});
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('SyncPeer', () => {
|
||||
const page = workspace.createPage({
|
||||
id: 'page0',
|
||||
});
|
||||
await page.load();
|
||||
page.load();
|
||||
const pageBlockId = page.addBlock('affine:page', {
|
||||
title: new page.Text(''),
|
||||
});
|
||||
@@ -89,7 +89,7 @@ describe('SyncPeer', () => {
|
||||
id: 'page0',
|
||||
});
|
||||
expect(syncPeer.status.step).toBe(SyncPeerStep.LoadingSubDoc);
|
||||
await page.load();
|
||||
page.load();
|
||||
await syncPeer.waitForSynced();
|
||||
page.addBlock('affine:page', {
|
||||
title: new page.Text(''),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import { setupEditorFlags } from '@affine/env/global';
|
||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import { assertEquals } from '@blocksuite/global/utils';
|
||||
import type { Workspace as BlockSuiteWorkspace } from '@blocksuite/store';
|
||||
@@ -192,6 +193,8 @@ export class WorkspaceManager {
|
||||
// apply compatibility fix
|
||||
fixWorkspaceVersion(workspace.blockSuiteWorkspace.doc);
|
||||
|
||||
setupEditorFlags(workspace.blockSuiteWorkspace);
|
||||
|
||||
return workspace;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user