Add missing singleton packages for RTC (#6816)

* Add missing singleton packages for RTC

* Add RTC screencast to the docs

* try fix package check
This commit is contained in:
Jeremy Tuloup 2023-04-04 19:05:07 +02:00 committed by GitHub
parent 0c888aedee
commit b99718f57a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 3 deletions

View File

@ -10,6 +10,8 @@
"watch": "webpack --config ./webpack.config.watch.js"
},
"resolutions": {
"@codemirror/state": "~6.2.0",
"@codemirror/view": "~6.9.3",
"@jupyter-notebook/application": "~7.0.0-alpha.18",
"@jupyter-notebook/application-extension": "~7.0.0-alpha.18",
"@jupyter-notebook/console-extension": "~7.0.0-alpha.18",
@ -90,6 +92,8 @@
"@jupyterlab/ui-components": "~4.0.0-beta.0",
"@jupyterlab/ui-components-extension": "~4.0.0-beta.0",
"@jupyterlab/vega5-extension": "~4.0.0-beta.0",
"@lezer/common": "~1.0.2",
"@lezer/highlight": "~1.1.4",
"@lumino/algorithm": "~2.0.0",
"@lumino/application": "~2.0.1",
"@lumino/commands": "~2.0.1",
@ -318,6 +322,8 @@
}
},
"singletonPackages": [
"@codemirror/state",
"@codemirror/view",
"@jupyter-notebook/tree",
"@jupyter/ydoc",
"@jupyterlab/application",
@ -352,6 +358,8 @@
"@jupyterlab/tooltip",
"@jupyterlab/translation",
"@jupyterlab/ui-components",
"@lezer/common",
"@lezer/highlight",
"@lumino/algorithm",
"@lumino/application",
"@lumino/commands",

View File

@ -18,10 +18,19 @@ function ensureResolutions(): string[] {
corePackage.jupyterlab.singletonPackages
);
packages.forEach((name) => {
const data = require(`${name}/package.json`);
packages.forEach(async (name) => {
let version = '';
try {
const data = require(`${name}/package.json`);
version = data.version;
} catch {
const modulePath = require.resolve(name);
const parentDir = path.dirname(path.dirname(modulePath));
const data = require(path.join(parentDir, 'package.json'));
version = data.version;
}
// Insist on a restricted version in the yarn resolution.
corePackage.resolutions[name] = `~${data.version}`;
corePackage.resolutions[name] = `~${version}`;
});
// Write the package.json back to disk.

View File

@ -35,6 +35,8 @@ After installing the extension, restart the Jupyter Server so the extension can
It is possible for two users to work on the same notebook using Notebook 7 or JupyterLab.
```
![a screencast showing how users can collaborate on the same document with both Notebook 7 and JupyterLab](https://user-images.githubusercontent.com/591645/229854102-6eed73f4-587f-406e-8ed1-347b788da9ee.gif)
## Table of Contents
Notebook 7 includes a new table of contents extension that allows you to navigate through your notebook using a sidebar. The Table of Contents is built-in and enabled by default, just like in JupyterLab.