From a5f704de9bf352144b233d944b19d555286bc956 Mon Sep 17 00:00:00 2001 From: Nicolas Brichet Date: Fri, 19 Jul 2024 14:56:52 +0200 Subject: [PATCH] Remove @jupyter/collaboration dependencie from @jupyter/docprovider --- packages/collaboration-extension/src/collaboration.ts | 6 ++++-- packages/collaboration/package.json | 1 - packages/collaboration/src/tokens.ts | 9 --------- packages/docprovider-extension/package.json | 1 - packages/docprovider-extension/src/filebrowser.ts | 7 +++++-- packages/docprovider/src/tokens.ts | 9 ++++++++- yarn.lock | 2 -- 7 files changed, 17 insertions(+), 18 deletions(-) diff --git a/packages/collaboration-extension/src/collaboration.ts b/packages/collaboration-extension/src/collaboration.ts index 98b0f2a5..cb45671b 100644 --- a/packages/collaboration-extension/src/collaboration.ts +++ b/packages/collaboration-extension/src/collaboration.ts @@ -14,7 +14,10 @@ import { EditorExtensionRegistry, IEditorExtensionRegistry } from '@jupyterlab/codemirror'; -import { WebSocketAwarenessProvider } from '@jupyter/docprovider'; +import { + IGlobalAwareness, + WebSocketAwarenessProvider +} from '@jupyter/docprovider'; import { SidePanel, usersIcon } from '@jupyterlab/ui-components'; import { URLExt } from '@jupyterlab/coreutils'; import { ServerConnection } from '@jupyterlab/services'; @@ -27,7 +30,6 @@ import { IAwareness } from '@jupyter/ydoc'; import { CollaboratorsPanel, - IGlobalAwareness, IUserMenu, remoteUserCursors, RendererUserMenu, diff --git a/packages/collaboration/package.json b/packages/collaboration/package.json index 291ce03e..002d7f70 100644 --- a/packages/collaboration/package.json +++ b/packages/collaboration/package.json @@ -41,7 +41,6 @@ "dependencies": { "@codemirror/state": "^6.2.0", "@codemirror/view": "^6.7.0", - "@jupyter/docprovider": "^3.0.0-beta.0", "@jupyterlab/apputils": "^4.0.5", "@jupyterlab/coreutils": "^6.0.5", "@jupyterlab/docregistry": "^4.0.5", diff --git a/packages/collaboration/src/tokens.ts b/packages/collaboration/src/tokens.ts index deebf363..84a313f1 100644 --- a/packages/collaboration/src/tokens.ts +++ b/packages/collaboration/src/tokens.ts @@ -5,8 +5,6 @@ import type { Menu } from '@lumino/widgets'; import { Token } from '@lumino/coreutils'; import type { User } from '@jupyterlab/services'; -import { IAwareness } from '@jupyter/ydoc'; - /** * The user menu token. * @@ -17,13 +15,6 @@ export const IUserMenu = new Token( '@jupyter/collaboration:IUserMenu' ); -/** - * The global awareness token. - */ -export const IGlobalAwareness = new Token( - '@jupyter/collaboration:IGlobalAwareness' -); - /** * An interface describing the user menu. */ diff --git a/packages/docprovider-extension/package.json b/packages/docprovider-extension/package.json index 5d798804..95293091 100644 --- a/packages/docprovider-extension/package.json +++ b/packages/docprovider-extension/package.json @@ -53,7 +53,6 @@ "watch:labextension": "jupyter labextension watch ." }, "dependencies": { - "@jupyter/collaboration": "^3.0.0-beta.0", "@jupyter/docprovider": "^3.0.0-beta.0", "@jupyter/ydoc": "^2.0.0", "@jupyterlab/application": "^4.2.0", diff --git a/packages/docprovider-extension/src/filebrowser.ts b/packages/docprovider-extension/src/filebrowser.ts index ea25f2ee..4a786b72 100644 --- a/packages/docprovider-extension/src/filebrowser.ts +++ b/packages/docprovider-extension/src/filebrowser.ts @@ -26,8 +26,11 @@ import { CommandRegistry } from '@lumino/commands'; import { YFile, YNotebook } from '@jupyter/ydoc'; -import { IGlobalAwareness } from '@jupyter/collaboration'; -import { ICollaborativeDrive, YDrive } from '@jupyter/docprovider'; +import { + ICollaborativeDrive, + IGlobalAwareness, + YDrive +} from '@jupyter/docprovider'; import { Awareness } from 'y-protocols/awareness'; /** diff --git a/packages/docprovider/src/tokens.ts b/packages/docprovider/src/tokens.ts index 1fa5fd84..8ac32f4a 100644 --- a/packages/docprovider/src/tokens.ts +++ b/packages/docprovider/src/tokens.ts @@ -1,7 +1,7 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import { DocumentChange, YDocument } from '@jupyter/ydoc'; +import { DocumentChange, IAwareness, YDocument } from '@jupyter/ydoc'; import { Contents } from '@jupyterlab/services'; import { Token } from '@lumino/coreutils'; @@ -16,6 +16,13 @@ export const ICollaborativeDrive = new Token( '@jupyter/collaboration-extension:ICollaborativeDrive' ); +/** + * The global awareness token. + */ +export const IGlobalAwareness = new Token( + '@jupyter/collaboration:IGlobalAwareness' +); + /** * A document factory for registering shared models */ diff --git a/yarn.lock b/yarn.lock index de0018fd..375a536e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2116,7 +2116,6 @@ __metadata: dependencies: "@codemirror/state": ^6.2.0 "@codemirror/view": ^6.7.0 - "@jupyter/docprovider": ^3.0.0-beta.0 "@jupyterlab/apputils": ^4.0.5 "@jupyterlab/coreutils": ^6.0.5 "@jupyterlab/docregistry": ^4.0.5 @@ -2139,7 +2138,6 @@ __metadata: version: 0.0.0-use.local resolution: "@jupyter/docprovider-extension@workspace:packages/docprovider-extension" dependencies: - "@jupyter/collaboration": ^3.0.0-beta.0 "@jupyter/docprovider": ^3.0.0-beta.0 "@jupyter/ydoc": ^2.0.0 "@jupyterlab/application": ^4.2.0