mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 13:29:02 +08:00
style: enable import-x/no-duplicates (#6279)
This commit is contained in:
@@ -23,7 +23,8 @@ import { nanoid } from 'nanoid';
|
||||
import type { Awareness } from 'y-protocols/awareness.js';
|
||||
import type { Doc as YDoc } from 'yjs';
|
||||
|
||||
import { createIdentifier, type ServiceCollection } from '../di';
|
||||
import type { ServiceCollection } from '../di';
|
||||
import { createIdentifier } from '../di';
|
||||
import { BlobEngine } from './engine/blob';
|
||||
import { globalBlockSuiteSchema } from './global-schema';
|
||||
import type { WorkspaceMetadata } from './metadata';
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import { nanoid } from 'nanoid';
|
||||
import { describe, expect, test, vitest } from 'vitest';
|
||||
import { Doc as YDoc, encodeStateAsUpdate } from 'yjs';
|
||||
import { diffUpdate, encodeStateVectorFromUpdate, mergeUpdates } from 'yjs';
|
||||
import {
|
||||
diffUpdate,
|
||||
Doc as YDoc,
|
||||
encodeStateAsUpdate,
|
||||
encodeStateVectorFromUpdate,
|
||||
mergeUpdates,
|
||||
} from 'yjs';
|
||||
|
||||
import { AsyncLock } from '../../../../utils';
|
||||
import { DocEngine } from '..';
|
||||
|
||||
@@ -9,7 +9,8 @@ import { MANUALLY_STOP } from '../../../utils';
|
||||
import { DocEngineLocalPart } from './local';
|
||||
import { DocEngineRemotePart } from './remote';
|
||||
import type { DocServer } from './server';
|
||||
import { type DocStorage, DocStorageInner } from './storage';
|
||||
import type { DocStorage } from './storage';
|
||||
import { DocStorageInner } from './storage';
|
||||
|
||||
const logger = new DebugLogger('doc-engine');
|
||||
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import {
|
||||
type ByteKV,
|
||||
type Memento,
|
||||
MemoryMemento,
|
||||
ReadonlyByteKV,
|
||||
wrapMemento,
|
||||
} from '../../../storage';
|
||||
import type { ByteKV, Memento } from '../../../storage';
|
||||
import { MemoryMemento, ReadonlyByteKV, wrapMemento } from '../../../storage';
|
||||
import { AsyncLock, mergeUpdates, throwIfAborted } from '../../../utils';
|
||||
import type { DocEventBus } from '.';
|
||||
import { DocEventBusInner, MemoryDocEventBus } from './event';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createIdentifier, type ServiceCollection } from '../di';
|
||||
import type { ServiceCollection } from '../di';
|
||||
import { createIdentifier } from '../di';
|
||||
|
||||
export interface WorkspaceFactory {
|
||||
name: string;
|
||||
|
||||
@@ -11,7 +11,8 @@ export * from './testing';
|
||||
export * from './upgrade';
|
||||
export * from './workspace';
|
||||
|
||||
import { type ServiceCollection, ServiceProvider } from '../di';
|
||||
import type { ServiceCollection } from '../di';
|
||||
import { ServiceProvider } from '../di';
|
||||
import { CleanupService } from '../lifecycle';
|
||||
import { GlobalCache, GlobalState, MemoryMemento } from '../storage';
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { GlobalCache } from '../../storage';
|
||||
import { type WorkspaceMetadata } from '../metadata';
|
||||
import type { WorkspaceMetadata } from '../metadata';
|
||||
|
||||
const CACHE_STORAGE_KEY = 'jotai-workspaces';
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ import type { GlobalCache } from '../../storage';
|
||||
import type { BlobStorage } from '../engine';
|
||||
import type { WorkspaceMetadata } from '../metadata';
|
||||
import { readWorkspaceListCache, writeWorkspaceListCache } from './cache';
|
||||
import { type WorkspaceInfo, WorkspaceInformation } from './information';
|
||||
import type { WorkspaceInfo } from './information';
|
||||
import { WorkspaceInformation } from './information';
|
||||
|
||||
export * from './information';
|
||||
|
||||
|
||||
@@ -4,12 +4,13 @@ import { differenceBy } from 'lodash-es';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { applyUpdate, encodeStateAsUpdate } from 'yjs';
|
||||
|
||||
import { type ServiceCollection } from '../di';
|
||||
import { GlobalState, type Memento } from '../storage';
|
||||
import type { ServiceCollection } from '../di';
|
||||
import type { Memento } from '../storage';
|
||||
import { GlobalState } from '../storage';
|
||||
import { WorkspaceMetadataContext } from './context';
|
||||
import type { BlobStorage } from './engine';
|
||||
import {
|
||||
AwarenessProvider,
|
||||
type BlobStorage,
|
||||
DocStorageImpl,
|
||||
LocalBlobStorage,
|
||||
MemoryDocStorage,
|
||||
@@ -17,9 +18,8 @@ import {
|
||||
import { MemoryStorage } from './engine/doc/storage';
|
||||
import type { WorkspaceFactory } from './factory';
|
||||
import { globalBlockSuiteSchema } from './global-schema';
|
||||
import type { WorkspaceListProvider } from './list';
|
||||
import { type WorkspaceInfo } from './list';
|
||||
import { type WorkspaceMetadata } from './metadata';
|
||||
import type { WorkspaceInfo, WorkspaceListProvider } from './list';
|
||||
import type { WorkspaceMetadata } from './metadata';
|
||||
import { WorkspaceScope } from './service-scope';
|
||||
|
||||
const LIST_STORE_KEY = 'testing-workspace-list';
|
||||
|
||||
@@ -4,12 +4,16 @@ import { Slot } from '@blocksuite/global/utils';
|
||||
import type { DocCollection } from '@blocksuite/store';
|
||||
import { applyUpdate, Doc as YDoc, encodeStateAsUpdate } from 'yjs';
|
||||
|
||||
import { checkWorkspaceCompatibility, MigrationPoint } from '../blocksuite';
|
||||
import { forceUpgradePages, upgradeV1ToV2 } from '../blocksuite';
|
||||
import { migrateGuidCompatibility } from '../blocksuite';
|
||||
import {
|
||||
checkWorkspaceCompatibility,
|
||||
forceUpgradePages,
|
||||
migrateGuidCompatibility,
|
||||
MigrationPoint,
|
||||
upgradeV1ToV2,
|
||||
} from '../blocksuite';
|
||||
import type { DocEngine } from './engine';
|
||||
import type { WorkspaceManager } from './manager';
|
||||
import { type WorkspaceMetadata } from './metadata';
|
||||
import type { WorkspaceMetadata } from './metadata';
|
||||
|
||||
export interface WorkspaceUpgradeStatus {
|
||||
needUpgrade: boolean;
|
||||
|
||||
@@ -4,11 +4,12 @@ import type { DocCollection } from '@blocksuite/store';
|
||||
|
||||
import type { ServiceProvider } from '../di';
|
||||
import { CleanupService } from '../lifecycle';
|
||||
import type { WorkspaceEngine } from './engine';
|
||||
import { type WorkspaceEngineStatus } from './engine';
|
||||
import { type WorkspaceMetadata } from './metadata';
|
||||
import type { WorkspaceUpgradeController } from './upgrade';
|
||||
import { type WorkspaceUpgradeStatus } from './upgrade';
|
||||
import type { WorkspaceEngine, WorkspaceEngineStatus } from './engine';
|
||||
import type { WorkspaceMetadata } from './metadata';
|
||||
import type {
|
||||
WorkspaceUpgradeController,
|
||||
WorkspaceUpgradeStatus,
|
||||
} from './upgrade';
|
||||
|
||||
export type { DocCollection } from '@blocksuite/store';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user