Skip to content

Commit c242921

Browse files
committed
Support Jupyter YDoc v4
Widen the @jupyter/ydoc (npm) and jupyter_ydoc (Python) dependency ranges to accept v4 alongside v3, so the extension works on JupyterLab 4.6+, which ships @jupyter/ydoc v4 as its shared singleton. - package.json: @jupyter/ydoc "^2.1.3 || ^3.0.0" -> "^3.0.0 || ^4.0.0" - package.json: pin @jupyter/ydoc to ^4.0.0 in resolutions so the dev/CI build dedupes to a single v4 copy (transitive @jupyterlab/* still declare ^3); ydoc is a webpack singleton at runtime so this is build-time only. - pyproject.toml: jupyter_ydoc ">=3.0.0,<4.0.0" -> ">=3.0.0,<5.0.0" Also removes the temporary 'jupyterlab<4.6' CI ceilings added to unblock main, restoring 'jupyterlab>=4.0.0,<5' now that JSD supports ydoc v4. Closes #262
1 parent 450d05e commit c242921

5 files changed

Lines changed: 12 additions & 15 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
2323

2424
- name: Install dependencies
25-
run: python -m pip install -U "jupyterlab>=4.0.0,<4.6"
25+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
2626

2727
- name: Lint the extension
2828
run: |
@@ -82,7 +82,7 @@ jobs:
8282
sudo rm -rf $(which node)
8383
sudo rm -rf $(which node)
8484
85-
pip install "jupyterlab>=4.0.0,<4.6" jupyter_server_documents*.whl
85+
pip install "jupyterlab>=4.0.0,<5" jupyter_server_documents*.whl
8686
8787
8888
jupyter server extension list
@@ -115,11 +115,7 @@ jobs:
115115
- name: Install the extension
116116
run: |
117117
set -eux
118-
# Pin jupyterlab <4.6: JupyterLab 4.6 bundles @jupyter/ydoc v4, but
119-
# JSD's frontend (and its jupyter-collaboration/docprovider deps) are
120-
# built against @jupyter/ydoc v3, so 4.6 breaks the extension (see
121-
# #265 / #262). Drop this ceiling once JSD is upgraded to ydoc v4.
122-
python -m pip install "jupyterlab>=4.0.0,<4.6" jupyter_server_documents*.whl
118+
python -m pip install "jupyterlab>=4.0.0,<5" jupyter_server_documents*.whl
123119
# Optional deps exercised by the chat + router E2E tests
124120
# (tests/chat-sync.spec.ts, tests/chat-router.spec.ts). jupyterlab-chat
125121
# provides the .chat factory + YChat; jupyter-ai-router provides the

.github/workflows/update-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
7373

7474
- name: Install dependencies
75-
run: python -m pip install -U "jupyterlab>=4.0.0,<4.6"
75+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
7676

7777
- name: Install extension
7878
run: |

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"@jupyter/chat": ">=0.6.0 <1",
6363
"@jupyter/collaborative-drive": "^4.4.0",
6464
"@jupyter/docprovider": "^4.4.0",
65-
"@jupyter/ydoc": "^2.1.3 || ^3.0.0",
65+
"@jupyter/ydoc": "^3.0.0 || ^4.0.0",
6666
"@jupyterlab/application": "^4.4.0",
6767
"@jupyterlab/apputils": "^4.4.0",
6868
"@jupyterlab/cells": "^4.4.0",
@@ -109,6 +109,7 @@
109109
"yjs": "^13.5.0"
110110
},
111111
"resolutions": {
112+
"@jupyter/ydoc": "^4.0.0",
112113
"webpack": "~5.106.0"
113114
},
114115
"sideEffects": [

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies = [
3131
"jupyter-docprovider>=2.4.0,<3",
3232
"jupyter_server>=2.4.0,<3",
3333
"jupyter_server_fileid>=0.9.0,<0.10.0",
34-
"jupyter_ydoc>=3.0.0,<4.0.0",
34+
"jupyter_ydoc>=3.0.0,<5.0.0",
3535
# require memory leak fix for:
3636
# https://github.com/y-crdt/pycrdt/issues/371
3737
"pycrdt>=0.12.49",

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2200,7 +2200,7 @@ __metadata:
22002200
"@jupyter/chat": ">=0.6.0 <1"
22012201
"@jupyter/collaborative-drive": ^4.4.0
22022202
"@jupyter/docprovider": ^4.4.0
2203-
"@jupyter/ydoc": ^2.1.3 || ^3.0.0
2203+
"@jupyter/ydoc": ^3.0.0 || ^4.0.0
22042204
"@jupyterlab/application": ^4.4.0
22052205
"@jupyterlab/apputils": ^4.4.0
22062206
"@jupyterlab/builder": ^4.0.0
@@ -2362,17 +2362,17 @@ __metadata:
23622362
languageName: node
23632363
linkType: hard
23642364

2365-
"@jupyter/ydoc@npm:^2.1.3 || ^3.0.0, @jupyter/ydoc@npm:^3.1.0":
2366-
version: 3.5.0
2367-
resolution: "@jupyter/ydoc@npm:3.5.0"
2365+
"@jupyter/ydoc@npm:^4.0.0":
2366+
version: 4.1.0
2367+
resolution: "@jupyter/ydoc@npm:4.1.0"
23682368
dependencies:
23692369
"@jupyterlab/nbformat": ^3.0.0 || ^4.0.0-alpha.21 || ^4.0.0
23702370
"@lumino/coreutils": ^1.11.0 || ^2.0.0
23712371
"@lumino/disposable": ^1.10.0 || ^2.0.0
23722372
"@lumino/signaling": ^1.10.0 || ^2.0.0
23732373
y-protocols: ^1.0.5
23742374
yjs: ^13.5.40
2375-
checksum: 7cf5459bb801a68097dcbe271ed9f620d6749943b9351bb04e13e82041aaf24c903af3492a367a3ed7bcae9ab6857cd78e61f47905521c1fb4c5bb048ebabbe5
2375+
checksum: 33b41067157c694407de89d672f702ce725e8dea9051e9c21106a2462743641962f9b11c0495dcb9adfe09585b2e4456925f60e873b31547e4388cc2fb8543fc
23762376
languageName: node
23772377
linkType: hard
23782378

0 commit comments

Comments
 (0)