Skip to content

Commit

Permalink
Add missing singleton packages for RTC (#6816)
Browse files Browse the repository at this point in the history
* Add missing singleton packages for RTC

* Add RTC screencast to the docs

* try fix package check
  • Loading branch information
jtpio authored Apr 4, 2023
1 parent 0c888ae commit b99718f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
8 changes: 8 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -318,6 +322,8 @@
}
},
"singletonPackages": [
"@codemirror/state",
"@codemirror/view",
"@jupyter-notebook/tree",
"@jupyter/ydoc",
"@jupyterlab/application",
Expand Down Expand Up @@ -352,6 +358,8 @@
"@jupyterlab/tooltip",
"@jupyterlab/translation",
"@jupyterlab/ui-components",
"@lezer/common",
"@lezer/highlight",
"@lumino/algorithm",
"@lumino/application",
"@lumino/commands",
Expand Down
15 changes: 12 additions & 3 deletions buildutils/src/ensure-repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions docs/source/notebook_7_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b99718f

Please sign in to comment.