Skip to content

Commit e15debb

Browse files
authored
Merge pull request #3051 from jasongrout/update
Mention adding a sharedPackages configuration when updating to JLab 3.
2 parents 71333cc + d94ddb0 commit e15debb

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

docs/source/changelog.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,23 @@ This is accomplished with the new python package `jupyterlab_widgets` version 1.
1414

1515
### Updates for Widget Maintainers
1616

17-
Custom widget maintainers will need to update their `@jupyter-widgets/base` dependency version to work in JupyterLab 3.0. For example, if you had a dependency on `@jupyter-widgets/base` version `^2 || ^3`, update to `^2 || ^3 || ^4` for your widget to work in classic Jupyter Notebook, JupyterLab 1, JupyterLab 2, and JupyterLab 3. See [#2472](https://github.com/jupyter-widgets/ipywidgets/pull/2472) for background.
18-
19-
Separately from this update of the version of the `@jupyter-widgets/base` dependency version range, you might consider making your widget's JupyterLab extension a prebuilt extension for JupyterLab 3.0. Users will be able to install your JupyterLab 3.0 prebuilt extension without rebuilding JupyterLab or needing Node.js. See the [JupyterLab 3 extension developer documentation](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html) or the new [widget extension cookiecutter](https://github.com/jupyter-widgets/widget-ts-cookiecutter) for more details.
17+
Custom widget maintainers will need to make two changes to update for JupyterLab 3:
18+
19+
1. Update the `@jupyter-widgets/base` dependency version to include `^4` to work in JupyterLab 3.0. For example, if you had a dependency on `@jupyter-widgets/base` version `^2 || ^3`, update to `^2 || ^3 || ^4` for your widget to work in classic Jupyter Notebook, JupyterLab 1, JupyterLab 2, and JupyterLab 3. See [#2472](https://github.com/jupyter-widgets/ipywidgets/pull/2472) for background.
20+
2. In the `package.json`, add the following `sharedPackages` configuration inside the `jupyterlab` key. See the [JupyterLab extension documentation](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html#requiring-a-service) for more information.
21+
22+
```json
23+
"jupyterlab": {
24+
"sharedPackages": {
25+
"@jupyter-widgets/base": {
26+
"bundled": false,
27+
"singleton": true
28+
}
29+
}
30+
}
31+
```
32+
33+
Separate from these two steps to update for JupyterLab 3, we also recommend that you make your widget's JupyterLab extension a prebuilt extension for JupyterLab 3.0. Users will be able to install your JupyterLab 3.0 prebuilt extension without rebuilding JupyterLab or needing Node.js. See the [JupyterLab 3 extension developer documentation](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html) or the new [widget extension cookiecutter](https://github.com/jupyter-widgets/widget-ts-cookiecutter/tree/jlab3) for more details.
2034

2135

2236
7.5

0 commit comments

Comments
 (0)