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

Provide @jupyterlab/shared-models as singleton #14229

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ iframe_figures/
lerna-debug.log
yarn-error.log

# yarn >=2.x local files
.yarn
.pnp.*

# copied changelog file
docs/source/getting_started/changelog.md

Expand Down
1 change: 1 addition & 0 deletions dev_mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@
"@jupyterlab/services",
"@jupyterlab/settingeditor",
"@jupyterlab/settingregistry",
"@jupyterlab/shared-models",
"@jupyterlab/statedb",
"@jupyterlab/statusbar",
"@jupyterlab/terminal",
Expand Down
10 changes: 7 additions & 3 deletions docs/source/extension/extension_migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ Instead of using the content API, now the provider opens a WebSocket connection
`jupyter server extension <https://github.com/jupyter-server/jupyter_server_ydoc>`__.

In addition, the shared models' package was moved to an external package called `@jupyter/ydoc
<https://github.com/jupyter-server/jupyter_ydoc>`__. All the extensions that depend on
``@jupyterlab/shared-models`` will need to update to depend in ``@jupyter/ydoc@~0.2.2``; the API should
be the same.
<https://github.com/jupyter-server/jupyter_ydoc>`__. ``@jupyterlab/shared-models`` has been kept
for backward compatibility (except in 3.6.0 and 3.6.1). It is now a proxy to ``@jupyter/ydoc@~0.2.2``;
the API is almost the same; see the required modification for the `example <https://github.com/jupyterlab/extension-examples/pull/224>`_.

**API Changes:**

To be able to fix RTC and make it stable. It was necessary to change the API and make a few breaking changes.
These changes should not affect the vast majority of extensions. They will only affect a couple
of extensions focused on RTC.
Expand All @@ -85,6 +86,9 @@ The involved packages are:

* ``WebSocketProvider.IOptions`` has a new optional attribute, ``user``.

- ``@jupyterlab/shared-models``: It is now a proxy to ``@jupyter/ydoc@~0.2.2``.
- A document model extending ``YDocument`` must define a change interface extending ``DocumentChange``.

- ``@jupyterlab/services``:
* The interface ``IManager`` has a new optional property, ``user`` that implement `User.IManager <../api/interfaces/services.User.IManager.html>`_.

Expand Down