Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.x] Support @jupyter/ydoc 2.x #316

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/collaboration-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"dependencies": {
"@jupyter/collaboration": "^2.1.4",
"@jupyter/docprovider": "^2.1.4",
"@jupyter/ydoc": "^1.1.0-a0",
"@jupyter/ydoc": "^1.1.0 || ^2.0.0",
"@jupyterlab/application": "^4.0.5",
"@jupyterlab/apputils": "^4.0.5",
"@jupyterlab/codemirror": "^4.0.5",
Expand Down
5 changes: 5 additions & 0 deletions packages/collaboration/src/collaboratorspanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
state.forEach((value: ICollaboratorAwareness, key: any) => {
if (
this._currentUser.isReady &&
value.user &&
value.user.username !== this._currentUser.identity!.username

Check warning on line 79 in packages/collaboration/src/collaboratorspanel.tsx

View workflow job for this annotation

GitHub Actions / Run pre-commit hook

Forbidden non-null assertion
) {
collaborators.push(value);
}
Expand Down Expand Up @@ -114,6 +115,10 @@
let separator = '';
let currentFileLocation = '';

if (!value.user) {
return <></>;
}

if (value.current) {
canOpenCurrent = true;
const path = value.current.split(':');
Expand Down
2 changes: 1 addition & 1 deletion packages/collaboration/src/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export interface ICollaboratorAwareness {
/**
* The User owning theses data.
*/
user: User.IIdentity;
user?: User.IIdentity;

/**
* The current file/context the user is working on.
Expand Down
2 changes: 1 addition & 1 deletion packages/docprovider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyter/ydoc": "^1.1.0-a0",
"@jupyter/ydoc": "^1.1.0 || ^2.0.0",
"@jupyterlab/coreutils": "^6.0.5",
"@jupyterlab/services": "^7.0.5",
"@lumino/coreutils": "^2.1.0",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 10 additions & 44 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1503,21 +1503,7 @@ __metadata:
languageName: node
linkType: hard

"@codemirror/language@npm:^6.0.0, @codemirror/language@npm:^6.3.0, @codemirror/language@npm:^6.4.0, @codemirror/language@npm:^6.6.0":
version: 6.6.0
resolution: "@codemirror/language@npm:6.6.0"
dependencies:
"@codemirror/state": ^6.0.0
"@codemirror/view": ^6.0.0
"@lezer/common": ^1.0.0
"@lezer/highlight": ^1.0.0
"@lezer/lr": ^1.0.0
style-mod: ^4.0.0
checksum: bb9411620e2f231653a3f0c4429e0d19a3843bff5dbc117df4649d7bf783ec4ad809c0add8bc0887a4ec3f48b4f8f941621168e47d76101d5383f0d670af1722
languageName: node
linkType: hard

"@codemirror/language@npm:^6.8.0":
"@codemirror/language@npm:^6.0.0, @codemirror/language@npm:^6.3.0, @codemirror/language@npm:^6.4.0, @codemirror/language@npm:^6.6.0, @codemirror/language@npm:^6.8.0":
version: 6.9.0
resolution: "@codemirror/language@npm:6.9.0"
dependencies:
Expand Down Expand Up @@ -2035,7 +2021,7 @@ __metadata:
dependencies:
"@jupyter/collaboration": ^2.1.4
"@jupyter/docprovider": ^2.1.4
"@jupyter/ydoc": ^1.1.0-a0
"@jupyter/ydoc": ^1.1.0 || ^2.0.0
"@jupyterlab/application": ^4.0.5
"@jupyterlab/apputils": ^4.0.5
"@jupyterlab/builder": ^4.0.5
Expand Down Expand Up @@ -2090,7 +2076,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@jupyter/docprovider@workspace:packages/docprovider"
dependencies:
"@jupyter/ydoc": ^1.1.0-a0
"@jupyter/ydoc": ^1.1.0 || ^2.0.0
"@jupyterlab/coreutils": ^6.0.5
"@jupyterlab/services": ^7.0.5
"@jupyterlab/testing": ^4.0.5
Expand Down Expand Up @@ -2144,17 +2130,17 @@ __metadata:
languageName: node
linkType: hard

"@jupyter/ydoc@npm:^1.1.0-a0":
version: 1.1.0-a0
resolution: "@jupyter/ydoc@npm:1.1.0-a0"
"@jupyter/ydoc@npm:^1.1.0 || ^2.0.0":
version: 2.1.3
resolution: "@jupyter/ydoc@npm:2.1.3"
dependencies:
"@jupyterlab/nbformat": ^3.0.0 || ^4.0.0-alpha.21 || ^4.0.0
"@lumino/coreutils": ^1.11.0 || ^2.0.0
"@lumino/disposable": ^1.10.0 || ^2.0.0
"@lumino/signaling": ^1.10.0 || ^2.0.0
y-protocols: ^1.0.5
yjs: ^13.5.40
checksum: 0099bacb2884a460867658e7f5a944e4d6eca7c4d3d68a6b31102be77d8fc9b6ba162af55c20f81c70f7fef4e9d9329eee4da32063c0caa0c6e3f10a488f95b5
checksum: 61b38e3f89accebc8060eb0aacc11bf812befb9b1cec085d1b0153be851037a3a26b5576d58e5bc65d8c0697ef9f1e535afa73af1b1deef0523d749ff4ac0ac9
languageName: node
linkType: hard

Expand Down Expand Up @@ -2544,16 +2530,7 @@ __metadata:
languageName: node
linkType: hard

"@jupyterlab/nbformat@npm:^3.0.0 || ^4.0.0-alpha.21 || ^4.0.0":
version: 4.0.0
resolution: "@jupyterlab/nbformat@npm:4.0.0"
dependencies:
"@lumino/coreutils": ^2.1.1
checksum: 152da6b9622c7683543ad2bd9525857a8a39b4b8a5474998e921232f108c366dd8625daeb14e2cc2aa8aac124b9a5d16f285310cd241c9769d51af80730dbd59
languageName: node
linkType: hard

"@jupyterlab/nbformat@npm:^4.0.5":
"@jupyterlab/nbformat@npm:^3.0.0 || ^4.0.0-alpha.21 || ^4.0.0, @jupyterlab/nbformat@npm:^4.0.5":
version: 4.0.5
resolution: "@jupyterlab/nbformat@npm:4.0.5"
dependencies:
Expand Down Expand Up @@ -3110,7 +3087,7 @@ __metadata:
languageName: node
linkType: hard

"@lumino/coreutils@npm:^1.11.0 || ^2.0.0, @lumino/coreutils@npm:^1.11.0 || ^2.1.2, @lumino/coreutils@npm:^2.1.0, @lumino/coreutils@npm:^2.1.1, @lumino/coreutils@npm:^2.1.2":
"@lumino/coreutils@npm:^1.11.0 || ^2.0.0, @lumino/coreutils@npm:^1.11.0 || ^2.1.2, @lumino/coreutils@npm:^2.1.0, @lumino/coreutils@npm:^2.1.2":
version: 2.1.2
resolution: "@lumino/coreutils@npm:2.1.2"
checksum: 7865317ac0676b448d108eb57ab5d8b2a17c101995c0f7a7106662d9fe6c859570104525f83ee3cda12ae2e326803372206d6f4c1f415a5b59e4158a7b81066f
Expand Down Expand Up @@ -4028,18 +4005,7 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:^18.0.26, @types/react@npm:^18.0.27":
version: 18.2.6
resolution: "@types/react@npm:18.2.6"
dependencies:
"@types/prop-types": "*"
"@types/scheduler": "*"
csstype: ^3.0.2
checksum: dea9d232d8df7ac357367a69dcb557711ab3d5501807ffa77cebeee73d49ee94d095f298e36853c63ed47cce097eee4c7eae2aaa8c02fac3f0171ec1b523a819
languageName: node
linkType: hard

"@types/react@npm:~18.0.26":
"@types/react@npm:^18.0.26, @types/react@npm:^18.0.27, @types/react@npm:~18.0.26":
version: 18.0.38
resolution: "@types/react@npm:18.0.38"
dependencies:
Expand Down
Loading