Update to JupyterLab 4.0.0a37 (#6777)

* Update JupyterLab and Lumino packages

* fix resolutions

* Update to TypeScript 5 final

* Reuse upstream sessionDialogs plugin

* update gitpod setup

* Update UI tests setup

* Update npmClient

* try without immutable

* add explicit playwright dep

* Update mathjax package

* update yarn.lock

* update dev dependencies

* lint

* update yarn.lock

* Fix typescript dependency

* fix metapackage
pull/6795/head
Jeremy Tuloup 3 years ago committed by GitHub
parent 551515559b
commit 7903de83e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,7 +4,7 @@ module.exports = {
es6: true,
commonjs: true,
node: true,
'jest/globals': true
'jest/globals': true,
},
root: true,
extends: [
@ -13,12 +13,12 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
'plugin:jest/recommended'
'plugin:jest/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.eslint.json',
sourceType: 'module'
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'jest'],
rules: {
@ -29,9 +29,9 @@ module.exports = {
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true
}
}
match: true,
},
},
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
@ -42,16 +42,16 @@ module.exports = {
'@typescript-eslint/quotes': [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: false }
{ avoidEscape: true, allowTemplateLiterals: false },
],
'jest/no-done-callback': 'off',
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error'
'prefer-arrow-callback': 'error',
},
settings: {
react: {
version: 'detect'
}
}
version: 'detect',
},
},
};

@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U "jupyterlab>=4.0.0a36,<5" hatch
python -m pip install -U "jupyterlab>=4.0.0a37,<5" hatch
jlpm
jlpm run build
@ -76,6 +76,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U "jupyterlab>=4.0.0a36,<5" pip
python -m pip install -U "jupyterlab>=4.0.0a37,<5" pip
jlpm
jlpm run build

@ -51,7 +51,7 @@ jobs:
- name: Install the test dependencies
run: |
cd ui-tests
jlpm --frozen-lockfile
jlpm
jlpm playwright install
- name: Update snapshots

@ -49,7 +49,7 @@ jobs:
- name: Install the test dependencies
run: |
cd ui-tests
jlpm --frozen-lockfile
jlpm
jlpm playwright install
- name: Test

6
.gitignore vendored

@ -129,3 +129,9 @@ ui-tests/playwright-report
# RTC
.jupyter_ystore.db
# yarn >=2.x local files
.yarn/*
.pnp.*
ui-tests/.yarn/*
ui-tests/.pnp.*

@ -22,7 +22,7 @@ tasks:
micromamba activate
EOT
source /workspace/bin/activate-env.sh
micromamba install -n base -y -c conda-forge python=3.11 nodejs=14 yarn=1
micromamba install -n base -y -c conda-forge python=3.11 nodejs=18
source /workspace/bin/activate-env.sh
python -m pip install -e ".[dev,test]" && jlpm && jlpm run build && jlpm develop
gp sync-done setup

@ -0,0 +1,5 @@
enableImmutableInstalls: false
enableInlineBuilds: false
enableTelemetry: false
httpTimeout: 60000
nodeLinker: node-modules

@ -22,85 +22,85 @@
"@jupyter-notebook/tree-extension": "~7.0.0-alpha.16",
"@jupyter-notebook/ui-components": "~7.0.0-alpha.16",
"@jupyter/ydoc": "~0.3.4",
"@jupyterlab/application": "~4.0.0-alpha.21",
"@jupyterlab/application-extension": "~4.0.0-alpha.21",
"@jupyterlab/apputils": "~4.0.0-alpha.21",
"@jupyterlab/apputils-extension": "~4.0.0-alpha.21",
"@jupyterlab/cell-toolbar": "~4.0.0-alpha.21",
"@jupyterlab/cell-toolbar-extension": "~4.0.0-alpha.21",
"@jupyterlab/application": "~4.0.0-alpha.22",
"@jupyterlab/application-extension": "~4.0.0-alpha.22",
"@jupyterlab/apputils": "~4.0.0-alpha.22",
"@jupyterlab/apputils-extension": "~4.0.0-alpha.22",
"@jupyterlab/cell-toolbar": "~4.0.0-alpha.22",
"@jupyterlab/cell-toolbar-extension": "~4.0.0-alpha.22",
"@jupyterlab/celltags": "~4.0.0-alpha.20",
"@jupyterlab/celltags-extension": "~4.0.0-alpha.21",
"@jupyterlab/codeeditor": "~4.0.0-alpha.21",
"@jupyterlab/codemirror": "~4.0.0-alpha.21",
"@jupyterlab/codemirror-extension": "~4.0.0-alpha.21",
"@jupyterlab/completer": "~4.0.0-alpha.21",
"@jupyterlab/completer-extension": "~4.0.0-alpha.21",
"@jupyterlab/console": "~4.0.0-alpha.21",
"@jupyterlab/console-extension": "~4.0.0-alpha.21",
"@jupyterlab/coreutils": "~6.0.0-alpha.21",
"@jupyterlab/debugger": "~4.0.0-alpha.21",
"@jupyterlab/debugger-extension": "~4.0.0-alpha.21",
"@jupyterlab/docmanager": "~4.0.0-alpha.21",
"@jupyterlab/docmanager-extension": "~4.0.0-alpha.21",
"@jupyterlab/documentsearch": "~4.0.0-alpha.21",
"@jupyterlab/documentsearch-extension": "~4.0.0-alpha.21",
"@jupyterlab/extensionmanager": "~4.0.0-alpha.21",
"@jupyterlab/extensionmanager-extension": "~4.0.0-alpha.21",
"@jupyterlab/filebrowser": "~4.0.0-alpha.21",
"@jupyterlab/filebrowser-extension": "~4.0.0-alpha.21",
"@jupyterlab/fileeditor": "~4.0.0-alpha.21",
"@jupyterlab/fileeditor-extension": "~4.0.0-alpha.21",
"@jupyterlab/htmlviewer": "~4.0.0-alpha.21",
"@jupyterlab/htmlviewer-extension": "~4.0.0-alpha.21",
"@jupyterlab/hub-extension": "~4.0.0-alpha.21",
"@jupyterlab/javascript-extension": "~4.0.0-alpha.21",
"@jupyterlab/json-extension": "~4.0.0-alpha.21",
"@jupyterlab/lsp": "~4.0.0-alpha.21",
"@jupyterlab/lsp-extension": "~4.0.0-alpha.21",
"@jupyterlab/mainmenu": "~4.0.0-alpha.21",
"@jupyterlab/mainmenu-extension": "~4.0.0-alpha.21",
"@jupyterlab/markedparser-extension": "~4.0.0-alpha.21",
"@jupyterlab/mathjax2-extension": "~4.0.0-alpha.21",
"@jupyterlab/notebook": "~4.0.0-alpha.21",
"@jupyterlab/notebook-extension": "~4.0.0-alpha.21",
"@jupyterlab/observables": "~5.0.0-alpha.21",
"@jupyterlab/outputarea": "~4.0.0-alpha.21",
"@jupyterlab/pdf-extension": "~4.0.0-alpha.21",
"@jupyterlab/rendermime": "~4.0.0-alpha.21",
"@jupyterlab/rendermime-extension": "~4.0.0-alpha.21",
"@jupyterlab/rendermime-interfaces": "~3.8.0-alpha.21",
"@jupyterlab/running-extension": "~4.0.0-alpha.21",
"@jupyterlab/services": "~7.0.0-alpha.21",
"@jupyterlab/settingeditor": "~4.0.0-alpha.21",
"@jupyterlab/settingeditor-extension": "~4.0.0-alpha.21",
"@jupyterlab/settingregistry": "~4.0.0-alpha.21",
"@jupyterlab/shortcuts-extension": "~4.0.0-alpha.21",
"@jupyterlab/statedb": "~4.0.0-alpha.21",
"@jupyterlab/statusbar": "~4.0.0-alpha.21",
"@jupyterlab/terminal": "~4.0.0-alpha.21",
"@jupyterlab/terminal-extension": "~4.0.0-alpha.21",
"@jupyterlab/theme-dark-extension": "~4.0.0-alpha.21",
"@jupyterlab/theme-light-extension": "~4.0.0-alpha.21",
"@jupyterlab/toc-extension": "~6.0.0-alpha.21",
"@jupyterlab/tooltip": "~4.0.0-alpha.21",
"@jupyterlab/tooltip-extension": "~4.0.0-alpha.21",
"@jupyterlab/translation": "~4.0.0-alpha.21",
"@jupyterlab/translation-extension": "~4.0.0-alpha.21",
"@jupyterlab/ui-components": "~4.0.0-alpha.36",
"@jupyterlab/ui-components-extension": "~4.0.0-alpha.21",
"@jupyterlab/vega5-extension": "~4.0.0-alpha.21",
"@lumino/algorithm": "~2.0.0-rc.1",
"@lumino/application": "~2.0.0-rc.1",
"@lumino/commands": "~2.0.0-rc.1",
"@lumino/coreutils": "~2.0.0-rc.1",
"@lumino/disposable": "~2.0.0-rc.1",
"@lumino/domutils": "~2.0.0-rc.1",
"@lumino/dragdrop": "~2.0.0-rc.1",
"@lumino/messaging": "~2.0.0-rc.1",
"@lumino/properties": "~2.0.0-rc.1",
"@lumino/signaling": "~2.0.0-rc.1",
"@lumino/virtualdom": "~2.0.0-rc.1",
"@lumino/widgets": "~2.0.0-rc.1",
"@jupyterlab/celltags-extension": "~4.0.0-alpha.22",
"@jupyterlab/codeeditor": "~4.0.0-alpha.22",
"@jupyterlab/codemirror": "~4.0.0-alpha.22",
"@jupyterlab/codemirror-extension": "~4.0.0-alpha.22",
"@jupyterlab/completer": "~4.0.0-alpha.22",
"@jupyterlab/completer-extension": "~4.0.0-alpha.22",
"@jupyterlab/console": "~4.0.0-alpha.22",
"@jupyterlab/console-extension": "~4.0.0-alpha.22",
"@jupyterlab/coreutils": "~6.0.0-alpha.22",
"@jupyterlab/debugger": "~4.0.0-alpha.22",
"@jupyterlab/debugger-extension": "~4.0.0-alpha.22",
"@jupyterlab/docmanager": "~4.0.0-alpha.22",
"@jupyterlab/docmanager-extension": "~4.0.0-alpha.22",
"@jupyterlab/documentsearch": "~4.0.0-alpha.22",
"@jupyterlab/documentsearch-extension": "~4.0.0-alpha.22",
"@jupyterlab/extensionmanager": "~4.0.0-alpha.22",
"@jupyterlab/extensionmanager-extension": "~4.0.0-alpha.22",
"@jupyterlab/filebrowser": "~4.0.0-alpha.22",
"@jupyterlab/filebrowser-extension": "~4.0.0-alpha.22",
"@jupyterlab/fileeditor": "~4.0.0-alpha.22",
"@jupyterlab/fileeditor-extension": "~4.0.0-alpha.22",
"@jupyterlab/htmlviewer": "~4.0.0-alpha.22",
"@jupyterlab/htmlviewer-extension": "~4.0.0-alpha.22",
"@jupyterlab/hub-extension": "~4.0.0-alpha.22",
"@jupyterlab/javascript-extension": "~4.0.0-alpha.22",
"@jupyterlab/json-extension": "~4.0.0-alpha.22",
"@jupyterlab/lsp": "~4.0.0-alpha.22",
"@jupyterlab/lsp-extension": "~4.0.0-alpha.22",
"@jupyterlab/mainmenu": "~4.0.0-alpha.22",
"@jupyterlab/mainmenu-extension": "~4.0.0-alpha.22",
"@jupyterlab/markedparser-extension": "~4.0.0-alpha.22",
"@jupyterlab/mathjax-extension": "~4.0.0-alpha.22",
"@jupyterlab/notebook": "~4.0.0-alpha.22",
"@jupyterlab/notebook-extension": "~4.0.0-alpha.22",
"@jupyterlab/observables": "~5.0.0-alpha.22",
"@jupyterlab/outputarea": "~4.0.0-alpha.22",
"@jupyterlab/pdf-extension": "~4.0.0-alpha.22",
"@jupyterlab/rendermime": "~4.0.0-alpha.22",
"@jupyterlab/rendermime-extension": "~4.0.0-alpha.22",
"@jupyterlab/rendermime-interfaces": "~3.8.0-alpha.22",
"@jupyterlab/running-extension": "~4.0.0-alpha.22",
"@jupyterlab/services": "~7.0.0-alpha.22",
"@jupyterlab/settingeditor": "~4.0.0-alpha.22",
"@jupyterlab/settingeditor-extension": "~4.0.0-alpha.22",
"@jupyterlab/settingregistry": "~4.0.0-alpha.22",
"@jupyterlab/shortcuts-extension": "~4.0.0-alpha.22",
"@jupyterlab/statedb": "~4.0.0-alpha.22",
"@jupyterlab/statusbar": "~4.0.0-alpha.22",
"@jupyterlab/terminal": "~4.0.0-alpha.22",
"@jupyterlab/terminal-extension": "~4.0.0-alpha.22",
"@jupyterlab/theme-dark-extension": "~4.0.0-alpha.22",
"@jupyterlab/theme-light-extension": "~4.0.0-alpha.22",
"@jupyterlab/toc-extension": "~6.0.0-alpha.22",
"@jupyterlab/tooltip": "~4.0.0-alpha.22",
"@jupyterlab/tooltip-extension": "~4.0.0-alpha.22",
"@jupyterlab/translation": "~4.0.0-alpha.22",
"@jupyterlab/translation-extension": "~4.0.0-alpha.22",
"@jupyterlab/ui-components": "~4.0.0-alpha.37",
"@jupyterlab/ui-components-extension": "~4.0.0-alpha.22",
"@jupyterlab/vega5-extension": "~4.0.0-alpha.22",
"@lumino/algorithm": "~2.0.0",
"@lumino/application": "~2.0.0",
"@lumino/commands": "~2.0.0",
"@lumino/coreutils": "~2.0.0",
"@lumino/disposable": "~2.0.0",
"@lumino/domutils": "~2.0.0",
"@lumino/dragdrop": "~2.0.0",
"@lumino/messaging": "~2.0.0",
"@lumino/properties": "~2.0.0",
"@lumino/signaling": "~2.0.0",
"@lumino/virtualdom": "~2.0.0",
"@lumino/widgets": "~2.0.0",
"react": "~18.2.0",
"react-dom": "~18.2.0",
"yjs": "~13.5.50"
@ -117,52 +117,53 @@
"@jupyter-notebook/tree": "^7.0.0-alpha.16",
"@jupyter-notebook/tree-extension": "^7.0.0-alpha.16",
"@jupyter-notebook/ui-components": "^7.0.0-alpha.16",
"@jupyterlab/application-extension": "^4.0.0-alpha.21",
"@jupyterlab/apputils-extension": "^4.0.0-alpha.21",
"@jupyterlab/cell-toolbar-extension": "^4.0.0-alpha.21",
"@jupyterlab/application-extension": "^4.0.0-alpha.22",
"@jupyterlab/apputils-extension": "^4.0.0-alpha.22",
"@jupyterlab/cell-toolbar-extension": "^4.0.0-alpha.22",
"@jupyterlab/celltags": "^4.0.0-alpha.20",
"@jupyterlab/celltags-extension": "^4.0.0-alpha.21",
"@jupyterlab/codemirror": "^4.0.0-alpha.21",
"@jupyterlab/codemirror-extension": "^4.0.0-alpha.21",
"@jupyterlab/completer-extension": "^4.0.0-alpha.21",
"@jupyterlab/console-extension": "^4.0.0-alpha.21",
"@jupyterlab/coreutils": "^6.0.0-alpha.21",
"@jupyterlab/debugger-extension": "^4.0.0-alpha.21",
"@jupyterlab/docmanager-extension": "^4.0.0-alpha.21",
"@jupyterlab/documentsearch-extension": "^4.0.0-alpha.21",
"@jupyterlab/extensionmanager-extension": "^4.0.0-alpha.21",
"@jupyterlab/filebrowser-extension": "^4.0.0-alpha.21",
"@jupyterlab/fileeditor-extension": "^4.0.0-alpha.21",
"@jupyterlab/htmlviewer-extension": "^4.0.0-alpha.21",
"@jupyterlab/hub-extension": "^4.0.0-alpha.21",
"@jupyterlab/javascript-extension": "^4.0.0-alpha.21",
"@jupyterlab/json-extension": "^4.0.0-alpha.21",
"@jupyterlab/lsp": "^4.0.0-alpha.21",
"@jupyterlab/lsp-extension": "^4.0.0-alpha.21",
"@jupyterlab/mainmenu-extension": "^4.0.0-alpha.21",
"@jupyterlab/markedparser-extension": "^4.0.0-alpha.21",
"@jupyterlab/mathjax2-extension": "^4.0.0-alpha.21",
"@jupyterlab/notebook-extension": "^4.0.0-alpha.21",
"@jupyterlab/pdf-extension": "^4.0.0-alpha.21",
"@jupyterlab/rendermime-extension": "^4.0.0-alpha.21",
"@jupyterlab/running-extension": "^4.0.0-alpha.21",
"@jupyterlab/settingeditor": "^4.0.0-alpha.21",
"@jupyterlab/settingeditor-extension": "^4.0.0-alpha.21",
"@jupyterlab/shortcuts-extension": "^4.0.0-alpha.21",
"@jupyterlab/terminal-extension": "^4.0.0-alpha.21",
"@jupyterlab/theme-dark-extension": "^4.0.0-alpha.21",
"@jupyterlab/theme-light-extension": "^4.0.0-alpha.21",
"@jupyterlab/toc-extension": "^6.0.0-alpha.21",
"@jupyterlab/tooltip-extension": "^4.0.0-alpha.21",
"@jupyterlab/translation-extension": "^4.0.0-alpha.21",
"@jupyterlab/ui-components-extension": "^4.0.0-alpha.21",
"@jupyterlab/vega5-extension": "^4.0.0-alpha.21"
"@jupyterlab/celltags-extension": "^4.0.0-alpha.22",
"@jupyterlab/codemirror": "^4.0.0-alpha.22",
"@jupyterlab/codemirror-extension": "^4.0.0-alpha.22",
"@jupyterlab/completer-extension": "^4.0.0-alpha.22",
"@jupyterlab/console-extension": "^4.0.0-alpha.22",
"@jupyterlab/coreutils": "^6.0.0-alpha.22",
"@jupyterlab/debugger-extension": "^4.0.0-alpha.22",
"@jupyterlab/docmanager-extension": "^4.0.0-alpha.22",
"@jupyterlab/documentsearch-extension": "^4.0.0-alpha.22",
"@jupyterlab/extensionmanager-extension": "^4.0.0-alpha.22",
"@jupyterlab/filebrowser-extension": "^4.0.0-alpha.22",
"@jupyterlab/fileeditor-extension": "^4.0.0-alpha.22",
"@jupyterlab/htmlviewer-extension": "^4.0.0-alpha.22",
"@jupyterlab/hub-extension": "^4.0.0-alpha.22",
"@jupyterlab/javascript-extension": "^4.0.0-alpha.22",
"@jupyterlab/json-extension": "^4.0.0-alpha.22",
"@jupyterlab/lsp": "^4.0.0-alpha.22",
"@jupyterlab/lsp-extension": "^4.0.0-alpha.22",
"@jupyterlab/mainmenu-extension": "^4.0.0-alpha.22",
"@jupyterlab/markedparser-extension": "^4.0.0-alpha.22",
"@jupyterlab/mathjax-extension": "^4.0.0-alpha.22",
"@jupyterlab/notebook-extension": "^4.0.0-alpha.22",
"@jupyterlab/pdf-extension": "^4.0.0-alpha.22",
"@jupyterlab/rendermime-extension": "^4.0.0-alpha.22",
"@jupyterlab/running-extension": "^4.0.0-alpha.22",
"@jupyterlab/settingeditor": "^4.0.0-alpha.22",
"@jupyterlab/settingeditor-extension": "^4.0.0-alpha.22",
"@jupyterlab/shortcuts-extension": "^4.0.0-alpha.22",
"@jupyterlab/terminal-extension": "^4.0.0-alpha.22",
"@jupyterlab/theme-dark-extension": "^4.0.0-alpha.22",
"@jupyterlab/theme-light-extension": "^4.0.0-alpha.22",
"@jupyterlab/toc-extension": "^6.0.0-alpha.22",
"@jupyterlab/tooltip-extension": "^4.0.0-alpha.22",
"@jupyterlab/translation-extension": "^4.0.0-alpha.22",
"@jupyterlab/ui-components-extension": "^4.0.0-alpha.22",
"@jupyterlab/vega5-extension": "^4.0.0-alpha.22"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0-alpha.21",
"@jupyterlab/buildutils": "^4.0.0-alpha.21",
"@jupyterlab/builder": "^4.0.0-alpha.22",
"@jupyterlab/buildutils": "^4.0.0-alpha.22",
"@types/rimraf": "^3.0.2",
"css-loader": "~5.0.1",
"extra-watch-webpack-plugin": "^1.0.3",
"fs-extra": "^8.1.0",
"glob": "~7.1.6",
"handlebars": "^4.7.7",
@ -205,6 +206,7 @@
"@jupyterlab/apputils-extension": [
"@jupyterlab/apputils-extension:palette",
"@jupyterlab/apputils-extension:sanitizer",
"@jupyterlab/apputils-extension:sessionDialogs",
"@jupyterlab/apputils-extension:settings",
"@jupyterlab/apputils-extension:state",
"@jupyterlab/apputils-extension:themes",
@ -242,7 +244,7 @@
"@jupyterlab/lsp-extension": true,
"@jupyterlab/mainmenu-extension": true,
"@jupyterlab/markedparser-extension": true,
"@jupyterlab/mathjax2-extension": true,
"@jupyterlab/mathjax-extension": true,
"@jupyterlab/notebook-extension": [
"@jupyterlab/notebook-extension:code-console",
"@jupyterlab/notebook-extension:export",

@ -10,15 +10,15 @@ const webpack = require('webpack');
const merge = require('webpack-merge').default;
const Handlebars = require('handlebars');
const { ModuleFederationPlugin } = webpack.container;
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
const BundleAnalyzerPlugin =
require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const Build = require('@jupyterlab/builder').Build;
const baseConfig = require('@jupyterlab/builder/lib/webpack.config.base');
const data = require('./package.json');
const names = Object.keys(data.dependencies).filter(name => {
const names = Object.keys(data.dependencies).filter((name) => {
const packageData = require(path.join(name, 'package.json'));
return packageData.jupyterlab !== undefined;
});
@ -35,32 +35,32 @@ const { mimeExtensions, plugins } = data.jupyterlab;
// Create the list of extension packages from the package.json metadata
const extensionPackages = new Set();
Object.keys(plugins).forEach(page => {
Object.keys(plugins).forEach((page) => {
const pagePlugins = plugins[page];
Object.keys(pagePlugins).forEach(name => {
Object.keys(pagePlugins).forEach((name) => {
extensionPackages.add(name);
});
});
Handlebars.registerHelper('json', function(context) {
Handlebars.registerHelper('json', function (context) {
return JSON.stringify(context);
});
// custom help to check if a page corresponds to a value
Handlebars.registerHelper('ispage', function(key, page) {
Handlebars.registerHelper('ispage', function (key, page) {
return key === page;
});
// custom helper to load the plugins on the index page
Handlebars.registerHelper('list_plugins', function() {
Handlebars.registerHelper('list_plugins', function () {
let str = '';
const page = this;
Object.keys(this).forEach(extension => {
Object.keys(this).forEach((extension) => {
const plugin = page[extension];
if (plugin === true) {
str += `require(\'${extension}\'),\n `;
} else if (Array.isArray(plugin)) {
const plugins = plugin.map(p => `'${p}',`).join('\n');
const plugins = plugin.map((p) => `'${p}',`).join('\n');
str += `
require(\'${extension}\').default.filter(({id}) => [
${plugins}
@ -76,7 +76,7 @@ const source = fs.readFileSync('index.template.js').toString();
const template = Handlebars.compile(source);
const extData = {
notebook_plugins: plugins,
notebook_mime_extensions: mimeExtensions
notebook_mime_extensions: mimeExtensions,
};
const indexOut = template(extData);
fs.writeFileSync(path.join(buildDir, 'index.js'), indexOut);
@ -88,7 +88,7 @@ fs.copySync(cssImports, path.resolve(buildDir, 'extraStyle.js'));
const extras = Build.ensureAssets({
packageNames: names,
output: buildDir,
schemaOutput: path.resolve(__dirname, '..', 'notebook')
schemaOutput: path.resolve(__dirname, '..', 'notebook'),
});
/**
@ -107,7 +107,7 @@ function createShared(packageData) {
for (let pkg of extensionPackages) {
if (!shared[pkg]) {
shared[pkg] = {
requiredVersion: require(`${pkg}/package.json`).version
requiredVersion: require(`${pkg}/package.json`).version,
};
}
}
@ -120,7 +120,7 @@ function createShared(packageData) {
let pkgShared = {};
let {
dependencies = {},
jupyterlab: { sharedPackages = {} } = {}
jupyterlab: { sharedPackages = {} } = {},
} = require(`${pkg}/package.json`);
for (let [dep, requiredVersion] of Object.entries(dependencies)) {
if (!shared[dep]) {
@ -211,19 +211,19 @@ module.exports = [
path: path.resolve(__dirname, '..', 'notebook/static/'),
library: {
type: 'var',
name: ['_JUPYTERLAB', 'CORE_OUTPUT']
name: ['_JUPYTERLAB', 'CORE_OUTPUT'],
},
filename: 'bundle.js'
filename: 'bundle.js',
},
plugins: [
new ModuleFederationPlugin({
library: {
type: 'var',
name: ['_JUPYTERLAB', 'CORE_LIBRARY_FEDERATION']
name: ['_JUPYTERLAB', 'CORE_LIBRARY_FEDERATION'],
},
name: 'CORE_FEDERATION',
shared: createShared(data)
})
]
})
shared: createShared(data),
}),
],
}),
].concat(extras);

@ -9,9 +9,9 @@ module.exports = [
plugins: [
...base[0].plugins,
new ExtraWatchWebpackPlugin({
files: ['../packages/_metapackage/tsconfig.tsbuildinfo']
})
]
files: ['../packages/_metapackage/tsconfig.tsbuildinfo'],
}),
],
},
...base.slice(1)
...base.slice(1),
];

@ -29,10 +29,10 @@
"watch": "tsc -w --listEmittedFiles"
},
"dependencies": {
"@jupyterlab/buildutils": "^4.0.0-alpha.21",
"@jupyterlab/buildutils": "^4.0.0-alpha.22",
"commander": "^6.2.0",
"fs-extra": "^9.1.0",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"devDependencies": {
"@types/fs-extra": "^9.0.10",

@ -22,7 +22,7 @@ commander
const prefix = run(
'python -c "import sys; print(sys.prefix)"',
{
stdio: 'pipe'
stdio: 'pipe',
},
true
);

@ -18,7 +18,7 @@ function ensureResolutions(): string[] {
corePackage.jupyterlab.singletonPackages
);
packages.forEach(name => {
packages.forEach((name) => {
const data = require(`${name}/package.json`);
// Insist on a restricted version in the yarn resolution.
corePackage.resolutions[name] = `~${data.version}`;

@ -1,5 +1,5 @@
exports.handlers = {
newDoclet: function(e) {
newDoclet: function (e) {
// e.doclet will refer to the newly created doclet
// you can read and modify properties of that doclet if you wish
if (typeof e.doclet.name === 'string') {
@ -10,5 +10,5 @@ exports.handlers = {
e.doclet.memberof = '<anonymous>';
}
}
}
},
};

@ -1,5 +1,5 @@
{
"npmClient": "yarn",
"npmClient": "jlpm",
"version": "independent",
"useWorkspaces": true
}

@ -42,19 +42,18 @@
"watch:lib": "lerna exec --stream --scope @jupyter-notebook/metapackage jlpm watch"
},
"devDependencies": {
"@jupyterlab/buildutils": "^4.0.0-alpha.21",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"eslint": "^7.10.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-jest": "^27.2.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"extra-watch-webpack-plugin": "^1.0.3",
"lerna": "^6.0.1",
"@jupyterlab/buildutils": "^4.0.0-alpha.22",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"lerna": "^6.5.1",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.0",
"prettier": "^2.8.5",
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
}
}

@ -20,20 +20,20 @@
"watch": "tsc -b -w --preserveWatchOutput"
},
"dependencies": {
"@jupyter-notebook/application": "file:../application",
"@jupyter-notebook/application-extension": "file:../application-extension",
"@jupyter-notebook/console-extension": "file:../console-extension",
"@jupyter-notebook/docmanager-extension": "file:../docmanager-extension",
"@jupyter-notebook/documentsearch-extension": "file:../documentsearch-extension",
"@jupyter-notebook/help-extension": "file:../help-extension",
"@jupyter-notebook/lab-extension": "file:../lab-extension",
"@jupyter-notebook/notebook-extension": "file:../notebook-extension",
"@jupyter-notebook/terminal-extension": "file:../terminal-extension",
"@jupyter-notebook/tree": "file:../tree",
"@jupyter-notebook/tree-extension": "file:../tree-extension",
"@jupyter-notebook/ui-components": "file:../ui-components"
"@jupyter-notebook/application": "^7.0.0-alpha.16",
"@jupyter-notebook/application-extension": "^7.0.0-alpha.16",
"@jupyter-notebook/console-extension": "^7.0.0-alpha.16",
"@jupyter-notebook/docmanager-extension": "^7.0.0-alpha.16",
"@jupyter-notebook/documentsearch-extension": "^7.0.0-alpha.16",
"@jupyter-notebook/help-extension": "^7.0.0-alpha.16",
"@jupyter-notebook/lab-extension": "^7.0.0-alpha.16",
"@jupyter-notebook/notebook-extension": "^7.0.0-alpha.16",
"@jupyter-notebook/terminal-extension": "^7.0.0-alpha.16",
"@jupyter-notebook/tree": "^7.0.0-alpha.16",
"@jupyter-notebook/tree-extension": "^7.0.0-alpha.16",
"@jupyter-notebook/ui-components": "^7.0.0-alpha.16"
},
"devDependencies": {
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
}
}

@ -40,24 +40,24 @@
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.16",
"@jupyter-notebook/ui-components": "^7.0.0-alpha.16",
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/apputils": "^4.0.0-alpha.21",
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/apputils": "^4.0.0-alpha.22",
"@jupyterlab/celltags": "^4.0.0-alpha.20",
"@jupyterlab/codeeditor": "^4.0.0-alpha.21",
"@jupyterlab/console": "^4.0.0-alpha.21",
"@jupyterlab/coreutils": "^6.0.0-alpha.21",
"@jupyterlab/docmanager": "^4.0.0-alpha.21",
"@jupyterlab/docregistry": "^4.0.0-alpha.21",
"@jupyterlab/mainmenu": "^4.0.0-alpha.21",
"@jupyterlab/settingregistry": "^4.0.0-alpha.21",
"@jupyterlab/translation": "^4.0.0-alpha.21",
"@lumino/coreutils": "^2.0.0-rc.1",
"@lumino/disposable": "^2.0.0-rc.1",
"@lumino/widgets": "^2.0.0-rc.1"
"@jupyterlab/codeeditor": "^4.0.0-alpha.22",
"@jupyterlab/console": "^4.0.0-alpha.22",
"@jupyterlab/coreutils": "^6.0.0-alpha.22",
"@jupyterlab/docmanager": "^4.0.0-alpha.22",
"@jupyterlab/docregistry": "^4.0.0-alpha.22",
"@jupyterlab/mainmenu": "^4.0.0-alpha.22",
"@jupyterlab/settingregistry": "^4.0.0-alpha.22",
"@jupyterlab/translation": "^4.0.0-alpha.22",
"@lumino/coreutils": "^2.0.0",
"@lumino/disposable": "^2.0.0",
"@lumino/widgets": "^2.0.0"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -6,15 +6,13 @@ import {
IRouter,
ITreePathUpdater,
JupyterFrontEnd,
JupyterFrontEndPlugin
JupyterFrontEndPlugin,
} from '@jupyterlab/application';
import {
sessionContextDialogs,
ISessionContextDialogs,
DOMUtils,
ICommandPalette,
IToolbarWidgetRegistry
IToolbarWidgetRegistry,
} from '@jupyterlab/apputils';
import { ConsolePanel } from '@jupyterlab/console';
@ -37,7 +35,7 @@ import {
INotebookShell,
SidePanel,
SidePanelHandler,
SidePanelPalette
SidePanelPalette,
} from '@jupyter-notebook/application';
import { jupyterIcon } from '@jupyter-notebook/ui-components';
@ -47,7 +45,7 @@ import { PromiseDelegate } from '@lumino/coreutils';
import {
DisposableDelegate,
DisposableSet,
IDisposable
IDisposable,
} from '@lumino/disposable';
import { Menu, Widget } from '@lumino/widgets';
@ -122,12 +120,12 @@ const dirty: JupyterFrontEndPlugin<void> = {
'Are you sure you want to exit Jupyter Notebook?\n\nAny unsaved changes will be lost.'
);
window.addEventListener('beforeunload', event => {
window.addEventListener('beforeunload', (event) => {
if (app.status.isDirty) {
return ((event as any).returnValue = message);
}
});
}
},
};
/**
@ -150,11 +148,11 @@ const logo: JupyterFrontEndPlugin<void> = {
padding: '2px 2px 2px 8px',
height: '28px',
width: 'auto',
cursor: 'pointer'
cursor: 'pointer',
});
logo.id = 'jp-NotebookLogo';
app.shell.add(logo, 'top', { rank: 0 });
}
},
};
/**
@ -186,14 +184,14 @@ const opener: JupyterFrontEndPlugin<void> = {
const factory = urlParams.get('factory') ?? 'default';
app.started.then(async () => {
docManager.open(file, factory, undefined, {
ref: '_noref'
ref: '_noref',
});
});
}
},
});
router.register({ command, pattern: TREE_PATTERN });
}
},
};
/**
@ -223,7 +221,7 @@ const menus: JupyterFrontEndPlugin<void> = {
default:
break;
}
}
},
};
/**
@ -237,7 +235,7 @@ const menuSpacer: JupyterFrontEndPlugin<void> = {
menu.id = DOMUtils.createDomID();
menu.addClass('jp-NotebookSpacer');
app.shell.add(menu, 'menu', { rank: 900 });
}
},
};
/**
@ -260,7 +258,7 @@ const pages: JupyterFrontEndPlugin<void> = {
label: trans.__('Open JupyterLab'),
execute: () => {
window.open(`${baseUrl}lab`);
}
},
});
const page = PageConfig.getOption('notebookPage');
@ -272,14 +270,14 @@ const pages: JupyterFrontEndPlugin<void> = {
} else {
window.open(`${baseUrl}tree`);
}
}
},
});
if (palette) {
palette.addItem({ command: CommandIDs.openLab, category: 'View' });
palette.addItem({ command: CommandIDs.openTree, category: 'View' });
}
}
},
};
/**
@ -294,17 +292,7 @@ const paths: JupyterFrontEndPlugin<JupyterFrontEnd.IPaths> = {
throw new Error(`${paths.id} must be activated in Jupyter Notebook.`);
}
return app.paths;
}
};
/**
* The default session dialogs plugin
*/
const sessionDialogs: JupyterFrontEndPlugin<ISessionContextDialogs> = {
id: '@jupyter-notebook/application-extension:session-dialogs',
provides: ISessionContextDialogs,
autoStart: true,
activate: () => sessionContextDialogs
},
};
/**
@ -319,7 +307,7 @@ const shell: JupyterFrontEndPlugin<INotebookShell> = {
return app.shell;
},
autoStart: true,
provides: INotebookShell
provides: INotebookShell,
};
/**
@ -334,7 +322,7 @@ const status: JupyterFrontEndPlugin<ILabStatus> = {
throw new Error(`${status.id} must be activated in Jupyter Notebook.`);
}
return app.status;
}
},
};
/**
@ -370,7 +358,7 @@ const tabTitle: JupyterFrontEndPlugin<void> = {
shell.currentChanged.connect(setTabTitle);
setTabTitle();
}
},
};
/**
@ -394,7 +382,7 @@ const title: JupyterFrontEndPlugin<void> = {
const node = document.createElement('div');
if (toolbarRegistry) {
toolbarRegistry.addFactory('TopBar', 'widgetTitle', toolbar => {
toolbarRegistry.addFactory('TopBar', 'widgetTitle', (toolbar) => {
const widget = new Widget({ node });
widget.id = 'jp-title';
return widget;
@ -456,9 +444,9 @@ const title: JupyterFrontEndPlugin<void> = {
}
const encoded = encodeURIComponent(newPath);
router.navigate(`/${route}/${encoded}`, {
skipRouting: true
skipRouting: true,
});
}
},
});
node.onclick = async () => {
@ -468,7 +456,7 @@ const title: JupyterFrontEndPlugin<void> = {
shell.currentChanged.connect(addTitle);
void addTitle();
}
},
};
/**
@ -497,7 +485,7 @@ const topVisibility: JupyterFrontEndPlugin<void> = {
void settingRegistry.set(pluginId, 'visible', top.isVisible);
}
},
isToggled: () => top.isVisible
isToggled: () => top.isVisible,
});
let settingsOverride = false;
@ -515,7 +503,7 @@ const topVisibility: JupyterFrontEndPlugin<void> = {
Promise.all([loadSettings, app.restored])
.then(([settings]) => {
updateSettings(settings);
settings.changed.connect(settings => {
settings.changed.connect((settings) => {
updateSettings(settings);
});
})
@ -542,7 +530,7 @@ const topVisibility: JupyterFrontEndPlugin<void> = {
// listen on format change (mobile and desktop) to make the view more compact
app.formatChanged.connect(onChanged);
},
autoStart: true
autoStart: true,
};
/**
@ -568,8 +556,8 @@ const sidePanelVisibility: JupyterFrontEndPlugin<void> = {
* id, widget ID to activate in the side panel
*/
app.commands.addCommand(CommandIDs.togglePanel, {
label: args => args['title'] as string,
caption: args => {
label: (args) => args['title'] as string,
caption: (args) => {
// We do not substitute the parameter into the string because the parameter is not
// localized (e.g., it is always 'left') even though the string is localized.
if (args['side'] === 'left') {
@ -585,7 +573,7 @@ const sidePanelVisibility: JupyterFrontEndPlugin<void> = {
}
return trans.__('Show %1 in the sidebar', args['title'] as string);
},
execute: args => {
execute: (args) => {
switch (args['side'] as string) {
case 'left':
if (notebookShell.leftCollapsed) {
@ -617,7 +605,7 @@ const sidePanelVisibility: JupyterFrontEndPlugin<void> = {
break;
}
},
isToggled: args => {
isToggled: (args) => {
switch (args['side'] as string) {
case 'left': {
if (notebookShell.leftCollapsed) {
@ -643,12 +631,12 @@ const sidePanelVisibility: JupyterFrontEndPlugin<void> = {
}
}
return false;
}
},
});
const sidePanelMenu: { [area in SidePanel.Area]: IDisposable | null } = {
left: null,
right: null
right: null,
};
/**
@ -678,8 +666,8 @@ const sidePanelVisibility: JupyterFrontEndPlugin<void> = {
args: {
side: area,
title: `Show ${widget.title.caption}`,
id: widget.id
}
id: widget.id,
},
});
menuToAdd = true;
}
@ -688,7 +676,7 @@ const sidePanelVisibility: JupyterFrontEndPlugin<void> = {
if (menuToAdd) {
sidePanelMenu[area] = menu.viewMenu.addItem({
type: 'submenu',
submenu: newMenu
submenu: newMenu,
});
}
};
@ -729,14 +717,14 @@ const sidePanelVisibility: JupyterFrontEndPlugin<void> = {
if (palette) {
const sidePanelPalette = new SidePanelPalette({
commandPalette: palette as ICommandPalette,
command: CommandIDs.togglePanel
command: CommandIDs.togglePanel,
});
notebookShell.leftHandler.widgets.forEach(widget => {
notebookShell.leftHandler.widgets.forEach((widget) => {
sidePanelPalette.addItem(widget, notebookShell.leftHandler.area);
});
notebookShell.rightHandler.widgets.forEach(widget => {
notebookShell.rightHandler.widgets.forEach((widget) => {
sidePanelPalette.addItem(widget, notebookShell.rightHandler.area);
});
@ -757,7 +745,7 @@ const sidePanelVisibility: JupyterFrontEndPlugin<void> = {
);
}
});
}
},
};
/**
@ -795,7 +783,7 @@ const tree: JupyterFrontEndPlugin<JupyterFrontEnd.ITreeResolver> = {
set.dispose();
delegate.resolve({ browser, file: PageConfig.getOption('treePath') });
}) as (args: any) => Promise<void>
}) as (args: any) => Promise<void>,
})
);
set.add(
@ -819,7 +807,7 @@ const tree: JupyterFrontEndPlugin<JupyterFrontEnd.ITreeResolver> = {
);
return { paths: delegate.promise };
}
},
};
const treePathUpdater: JupyterFrontEndPlugin<ITreePathUpdater> = {
@ -841,7 +829,7 @@ const treePathUpdater: JupyterFrontEndPlugin<ITreePathUpdater> = {
}
return updateTreePath;
},
autoStart: true
autoStart: true,
};
const translator: JupyterFrontEndPlugin<void> = {
@ -854,7 +842,7 @@ const translator: JupyterFrontEndPlugin<void> = {
translator: ITranslator
) => {
notebookShell.translator = translator;
}
},
};
/**
@ -898,7 +886,7 @@ const zen: JupyterFrontEndPlugin<void> = {
document.exitFullscreen();
toggleOff();
}
}
},
});
document.addEventListener('fullscreenchange', () => {
@ -910,7 +898,7 @@ const zen: JupyterFrontEndPlugin<void> = {
if (palette) {
palette.addItem({ command: CommandIDs.toggleZen, category: 'Mode' });
}
}
},
};
/**
@ -924,7 +912,6 @@ const plugins: JupyterFrontEndPlugin<any>[] = [
opener,
pages,
paths,
sessionDialogs,
shell,
sidePanelVisibility,
status,
@ -934,7 +921,7 @@ const plugins: JupyterFrontEndPlugin<any>[] = [
tree,
treePathUpdater,
translator,
zen
zen,
];
export default plugins;

@ -6,16 +6,16 @@ const esModules = ['lib0', 'y-protocols'].join('|');
let local = {
preset: 'ts-jest/presets/js-with-babel',
transformIgnorePatterns: [
`/node_modules/(?!${esModules}).+\\.js/(?!(@jupyterlab/.*)/)`
`/node_modules/(?!${esModules}).+\\.js/(?!(@jupyterlab/.*)/)`,
],
globals: {
'ts-jest': {
tsconfig: './tsconfig.test.json'
}
}
tsconfig: './tsconfig.test.json',
},
},
};
Object.keys(local).forEach(option => {
Object.keys(local).forEach((option) => {
upstream[option] = local[option];
});

@ -42,27 +42,27 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/coreutils": "^6.0.0-alpha.21",
"@jupyterlab/docregistry": "^4.0.0-alpha.21",
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.21",
"@jupyterlab/ui-components": "^4.0.0-alpha.36",
"@lumino/algorithm": "^2.0.0-rc.1",
"@lumino/coreutils": "^2.0.0-rc.1",
"@lumino/messaging": "^2.0.0-rc.1",
"@lumino/polling": "^2.0.0-rc.1",
"@lumino/signaling": "^2.0.0-rc.1",
"@lumino/widgets": "^2.0.0-rc.1"
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/coreutils": "^6.0.0-alpha.22",
"@jupyterlab/docregistry": "^4.0.0-alpha.22",
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.22",
"@jupyterlab/ui-components": "^4.0.0-alpha.37",
"@lumino/algorithm": "^2.0.0",
"@lumino/coreutils": "^2.0.0",
"@lumino/messaging": "^2.0.0",
"@lumino/polling": "^2.0.0",
"@lumino/signaling": "^2.0.0",
"@lumino/widgets": "^2.0.0"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.12.1",
"@jupyterlab/testutils": "^4.0.0-alpha.21",
"@jupyterlab/testutils": "^4.0.0-alpha.22",
"@types/jest": "^29.2.5",
"jest": "^29.3.1",
"rimraf": "^3.0.2",
"ts-jest": "^29.0.3",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -3,7 +3,7 @@
import {
JupyterFrontEnd,
JupyterFrontEndPlugin
JupyterFrontEndPlugin,
} from '@jupyterlab/application';
import { Base64ModelFactory } from '@jupyterlab/docregistry';
@ -88,7 +88,7 @@ export class NotebookApp extends JupyterFrontEnd<INotebookShell> {
hubHost: PageConfig.getOption('hubHost') || undefined,
hubPrefix: PageConfig.getOption('hubPrefix') || undefined,
hubUser: PageConfig.getOption('hubUser') || undefined,
hubServerName: PageConfig.getOption('hubServerName') || undefined
hubServerName: PageConfig.getOption('hubServerName') || undefined,
},
directories: {
appSettings: PageConfig.getOption('appSettingsDir'),
@ -98,8 +98,8 @@ export class NotebookApp extends JupyterFrontEnd<INotebookShell> {
themes: PageConfig.getOption('themesDir'),
userSettings: PageConfig.getOption('userSettingsDir'),
serverRoot: PageConfig.getOption('serverRoot'),
workspaces: PageConfig.getOption('workspacesDir')
}
workspaces: PageConfig.getOption('workspacesDir'),
},
};
}
@ -129,7 +129,7 @@ export class NotebookApp extends JupyterFrontEnd<INotebookShell> {
if (!Array.isArray(data)) {
data = [data];
}
data.forEach(item => {
data.forEach((item) => {
try {
this.registerPlugin(item);
} catch (error) {
@ -144,7 +144,7 @@ export class NotebookApp extends JupyterFrontEnd<INotebookShell> {
* @param mods - The plugin modules to register.
*/
registerPluginModules(mods: NotebookApp.IPluginModule[]): void {
mods.forEach(mod => {
mods.forEach((mod) => {
this.registerPluginModule(mod);
});
}

@ -48,7 +48,7 @@ export class PanelHandler {
case 'child-removed':
{
const widget = (msg as Widget.ChildMessage).child;
ArrayExt.removeFirstWhere(this._items, v => v.widget === widget);
ArrayExt.removeFirstWhere(this._items, (v) => v.widget === widget);
}
break;
default:
@ -83,7 +83,7 @@ export class SidePanelHandler extends PanelHandler {
closeIcon.element({
container: this._closeButton,
height: '16px',
width: 'auto'
width: 'auto',
});
this._closeButton.onclick = () => {
this.collapse();
@ -133,7 +133,7 @@ export class SidePanelHandler extends PanelHandler {
* Get the widgets list.
*/
get widgets(): Readonly<Widget[]> {
return this._items.map(obj => obj.widget);
return this._items.map((obj) => obj.widget);
}
/**
@ -253,14 +253,14 @@ export class SidePanelHandler extends PanelHandler {
* Find the index of the item with the given widget, or `-1`.
*/
private _findWidgetIndex(widget: Widget): number {
return ArrayExt.findFirstIndex(this._items, i => i.widget === widget);
return ArrayExt.findFirstIndex(this._items, (i) => i.widget === widget);
}
/**
* Find the widget with the given id, or `null`.
*/
private _findWidgetByID(id: string): Widget | null {
const item = find(this._items, value => value.widget.id === id);
const item = find(this._items, (value) => value.widget.id === id);
return item ? item.widget : null;
}
@ -350,8 +350,8 @@ export class SidePanelPalette {
args: {
side: area,
title: `Show ${widget.title.caption}`,
id: widget.id
}
id: widget.id,
},
});
// Keep the disposableDelegate objet to be able to dispose of the item if the widget
@ -359,7 +359,7 @@ export class SidePanelPalette {
this._items.push({
widgetId: widget.id,
area: area,
disposable: disposableDelegate
disposable: disposableDelegate,
});
}

@ -77,7 +77,7 @@ export class NotebookShell extends Widget implements JupyterFrontEnd.IShell {
const middleLayout = new BoxLayout({
spacing: 0,
direction: 'top-to-bottom'
direction: 'top-to-bottom',
});
BoxLayout.setStretch(this._topWrapper, 0);
BoxLayout.setStretch(this._menuWrapper, 0);
@ -207,7 +207,7 @@ export class NotebookShell extends Widget implements JupyterFrontEnd.IShell {
activateById(id: string): void {
// Search all areas that can have widgets for this widget, starting with main.
for (const area of ['main', 'top', 'left', 'right', 'menu']) {
const widget = find(this.widgets(area as Shell.Area), w => w.id === id);
const widget = find(this.widgets(area as Shell.Area), (w) => w.id === id);
if (widget) {
if (area === 'left') {
this.expandLeft(id);

@ -4,7 +4,7 @@
import {
INotebookShell,
NotebookShell,
Shell
Shell,
} from '@jupyter-notebook/application';
import { JupyterFrontEnd } from '@jupyterlab/application';
@ -29,7 +29,7 @@ describe('Shell for notebooks', () => {
});
it('should make all areas empty initially', () => {
['main', 'top', 'left', 'right', 'menu'].forEach(area => {
['main', 'top', 'left', 'right', 'menu'].forEach((area) => {
const widgets = Array.from(shell.widgets(area as Shell.Area));
expect(widgets.length).toEqual(0);
});
@ -133,7 +133,7 @@ describe('Shell for tree view', () => {
});
it('should make all areas empty initially', () => {
['main', 'top', 'left', 'right', 'menu'].forEach(area => {
['main', 'top', 'left', 'right', 'menu'].forEach((area) => {
const widgets = Array.from(shell.widgets(area as Shell.Area));
expect(widgets.length).toEqual(0);
});

@ -38,14 +38,14 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/console": "^4.0.0-alpha.21",
"@jupyterlab/coreutils": "^6.0.0-alpha.21",
"@lumino/algorithm": "^2.0.0-rc.1"
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/console": "^4.0.0-alpha.22",
"@jupyterlab/coreutils": "^6.0.0-alpha.22",
"@lumino/algorithm": "^2.0.0"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -4,7 +4,7 @@
import {
IRouter,
JupyterFrontEnd,
JupyterFrontEndPlugin
JupyterFrontEndPlugin,
} from '@jupyterlab/application';
import { IConsoleTracker } from '@jupyterlab/console';
@ -39,11 +39,11 @@ const opener: JupyterFrontEndPlugin<void> = {
const path = decodeURIComponent(match);
commands.execute('console:create', { path });
}
},
});
router.register({ command, pattern: consolePattern });
}
},
};
/**
@ -58,7 +58,10 @@ const redirect: JupyterFrontEndPlugin<void> = {
tracker.widgetAdded.connect(async (send, console) => {
const { sessionContext } = console;
await sessionContext.ready;
const widget = find(app.shell.widgets('main'), w => w.id === console.id);
const widget = find(
app.shell.widgets('main'),
(w) => w.id === console.id
);
if (widget) {
// bail if the console is already added to the main area
return;
@ -68,7 +71,7 @@ const redirect: JupyterFrontEndPlugin<void> = {
// the widget is not needed anymore
console.dispose();
});
}
},
};
/**

@ -38,17 +38,17 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/coreutils": "^6.0.0-alpha.21",
"@jupyterlab/docmanager": "^4.0.0-alpha.21",
"@jupyterlab/docregistry": "^4.0.0-alpha.21",
"@jupyterlab/services": "^7.0.0-alpha.21",
"@lumino/algorithm": "^2.0.0-rc.1",
"@lumino/signaling": "^2.0.0-rc.1"
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/coreutils": "^6.0.0-alpha.22",
"@jupyterlab/docmanager": "^4.0.0-alpha.22",
"@jupyterlab/docregistry": "^4.0.0-alpha.22",
"@jupyterlab/services": "^7.0.0-alpha.22",
"@lumino/algorithm": "^2.0.0",
"@lumino/signaling": "^2.0.0"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -3,7 +3,7 @@
import {
JupyterFrontEnd,
JupyterFrontEndPlugin
JupyterFrontEndPlugin,
} from '@jupyterlab/application';
import { PageConfig, PathExt } from '@jupyterlab/coreutils';
@ -58,7 +58,7 @@ const opener: JupyterFrontEndPlugin<IDocumentWidgetOpener> = {
}
widget.title.dataset = {
type: 'document-title',
...widget.title.dataset
...widget.title.dataset,
};
if (!widget.isAttached) {
app.shell.add(widget, 'main', options || {});
@ -73,7 +73,7 @@ const opener: JupyterFrontEndPlugin<IDocumentWidgetOpener> = {
private _opened = new Signal<this, IDocumentWidget>(this);
})();
}
},
};
/**

@ -39,13 +39,13 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.16",
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/documentsearch": "^4.0.0-alpha.21",
"@lumino/widgets": "^2.0.0-rc.1"
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/documentsearch": "^4.0.0-alpha.22",
"@lumino/widgets": "^2.0.0"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -1,6 +1,6 @@
import {
JupyterFrontEnd,
JupyterFrontEndPlugin
JupyterFrontEndPlugin,
} from '@jupyterlab/application';
import { ISearchProviderRegistry } from '@jupyterlab/documentsearch';
@ -51,7 +51,7 @@ const notebookShellWidgetListener: JupyterFrontEndPlugin<void> = {
transformWidgetSearchability(notebookShell.currentWidget);
}
});
}
},
};
/**

@ -39,16 +39,16 @@
},
"dependencies": {
"@jupyter-notebook/ui-components": "^7.0.0-alpha.16",
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/apputils": "^4.0.0-alpha.21",
"@jupyterlab/mainmenu": "^4.0.0-alpha.21",
"@jupyterlab/translation": "^4.0.0-alpha.21",
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/apputils": "^4.0.0-alpha.22",
"@jupyterlab/mainmenu": "^4.0.0-alpha.22",
"@jupyterlab/translation": "^4.0.0-alpha.22",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -3,7 +3,7 @@
import {
JupyterFrontEnd,
JupyterFrontEndPlugin
JupyterFrontEndPlugin,
} from '@jupyterlab/application';
import { showDialog, Dialog, ICommandPalette } from '@jupyterlab/apputils';
@ -22,12 +22,12 @@ import * as React from 'react';
const RESOURCES = [
{
text: 'About Jupyter',
url: 'https://jupyter.org'
url: 'https://jupyter.org',
},
{
text: 'Markdown Reference',
url: 'https://commonmark.org/help/'
}
url: 'https://commonmark.org/help/',
},
];
/**
@ -51,13 +51,13 @@ const open: JupyterFrontEndPlugin<void> = {
const { commands } = app;
commands.addCommand(CommandIDs.open, {
label: args => args['text'] as string,
execute: args => {
label: (args) => args['text'] as string,
execute: (args) => {
const url = args['url'] as string;
window.open(url);
}
},
});
}
},
};
/**
@ -132,28 +132,28 @@ const about: JupyterFrontEndPlugin<void> = {
Dialog.createButton({
label: trans.__('Dismiss'),
className:
'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled'
})
]
'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled',
}),
],
});
dialog.addClass('jp-AboutNotebook');
void dialog.launch();
}
},
});
if (palette) {
palette.addItem({ command: CommandIDs.about, category });
}
const resourcesGroup = RESOURCES.map(args => ({
const resourcesGroup = RESOURCES.map((args) => ({
args,
command: CommandIDs.open
command: CommandIDs.open,
}));
if (menu) {
menu.helpMenu.addGroup(resourcesGroup, 30);
}
}
},
};
/**
@ -194,7 +194,7 @@ const shortcuts: JupyterFrontEndPlugin<void> = {
</thead>
<tbody>
{commands.keyBindings
.filter(binding => commands.isEnabled(binding.command))
.filter((binding) => commands.isEnabled(binding.command))
.map((binding, i) => (
<tr key={i}>
<td>{commands.label(binding.command)}</td>
@ -214,17 +214,17 @@ const shortcuts: JupyterFrontEndPlugin<void> = {
Dialog.createButton({
label: trans.__('Dismiss'),
className:
'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled'
})
]
'jp-AboutNotebook-about-button jp-mod-reject jp-mod-styled',
}),
],
});
}
},
});
if (palette) {
palette.addItem({ command: CommandIDs.shortcuts, category });
}
}
},
};
const plugins: JupyterFrontEndPlugin<any>[] = [open, shortcuts, about];

@ -44,20 +44,20 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.16",
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/apputils": "^4.0.0-alpha.21",
"@jupyterlab/coreutils": "^6.0.0-alpha.21",
"@jupyterlab/docregistry": "^4.0.0-alpha.21",
"@jupyterlab/notebook": "^4.0.0-alpha.21",
"@jupyterlab/translation": "^4.0.0-alpha.21",
"@jupyterlab/ui-components": "^4.0.0-alpha.36",
"@lumino/commands": "^2.0.0-rc.1",
"@lumino/disposable": "^2.0.0-rc.1"
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/apputils": "^4.0.0-alpha.22",
"@jupyterlab/coreutils": "^6.0.0-alpha.22",
"@jupyterlab/docregistry": "^4.0.0-alpha.22",
"@jupyterlab/notebook": "^4.0.0-alpha.22",
"@jupyterlab/translation": "^4.0.0-alpha.22",
"@jupyterlab/ui-components": "^4.0.0-alpha.37",
"@lumino/commands": "^2.0.0",
"@lumino/disposable": "^2.0.0"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0-alpha.21",
"@jupyterlab/builder": "^4.0.0-alpha.22",
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -4,7 +4,7 @@
import {
ILabShell,
JupyterFrontEnd,
JupyterFrontEndPlugin
JupyterFrontEndPlugin,
} from '@jupyterlab/application';
import { ICommandPalette, IToolbarWidgetRegistry } from '@jupyterlab/apputils';
@ -59,7 +59,7 @@ const interfaceSwitcher: JupyterFrontEndPlugin<void> = {
ICommandPalette,
INotebookShell,
ILabShell,
IToolbarWidgetRegistry
IToolbarWidgetRegistry,
],
activate: (
app: JupyterFrontEnd,
@ -74,7 +74,7 @@ const interfaceSwitcher: JupyterFrontEndPlugin<void> = {
const baseUrl = PageConfig.getBaseUrl();
const trans = translator.load('notebook');
const overflowOptions = {
overflowMenuOptions: { isVisible: false }
overflowMenuOptions: { isVisible: false },
};
const menubar = new MenuBar(overflowOptions);
const switcher = new Menu({ commands });
@ -92,7 +92,7 @@ const interfaceSwitcher: JupyterFrontEndPlugin<void> = {
const addInterface = (option: ISwitcherChoice) => {
const { command, commandLabel, urlPrefix } = option;
commands.addCommand(command, {
label: args => (args.noLabel ? '' : commandLabel),
label: (args) => (args.noLabel ? '' : commandLabel),
caption: commandLabel,
execute: () => {
const current = notebookTracker.currentWidget;
@ -101,7 +101,7 @@ const interfaceSwitcher: JupyterFrontEndPlugin<void> = {
}
window.open(`${urlPrefix}${current.context.path}`);
},
isEnabled
isEnabled,
});
if (palette) {
@ -116,7 +116,7 @@ const interfaceSwitcher: JupyterFrontEndPlugin<void> = {
command: CommandIDs.openNotebook,
commandLabel: trans.__('Open With %1', 'Jupyter Notebook'),
buttonLabel: 'openNotebook',
urlPrefix: `${baseUrl}tree/`
urlPrefix: `${baseUrl}tree/`,
});
}
@ -125,7 +125,7 @@ const interfaceSwitcher: JupyterFrontEndPlugin<void> = {
command: CommandIDs.openLab,
commandLabel: trans.__('Open With %1', 'JupyterLab'),
buttonLabel: 'openLab',
urlPrefix: `${baseUrl}doc/tree/`
urlPrefix: `${baseUrl}doc/tree/`,
});
}
@ -133,7 +133,7 @@ const interfaceSwitcher: JupyterFrontEndPlugin<void> = {
toolbarRegistry.addFactory<NotebookPanel>(
'Notebook',
'interfaceSwitcher',
panel => {
(panel) => {
const menubar = new MenuBar(overflowOptions);
menubar.addMenu(switcher);
menubar.addClass('jp-InterfaceSwitcher');
@ -141,7 +141,7 @@ const interfaceSwitcher: JupyterFrontEndPlugin<void> = {
}
);
}
}
},
};
/**
@ -165,13 +165,13 @@ const launchNotebookTree: JupyterFrontEndPlugin<void> = {
label: trans.__('Launch Jupyter Notebook File Browser'),
execute: () => {
window.open(PageConfig.getBaseUrl() + 'tree');
}
},
});
if (palette) {
palette.addItem({ command: CommandIDs.launchNotebookTree, category });
}
}
},
};
/**
@ -179,7 +179,7 @@ const launchNotebookTree: JupyterFrontEndPlugin<void> = {
*/
const plugins: JupyterFrontEndPlugin<any>[] = [
launchNotebookTree,
interfaceSwitcher
interfaceSwitcher,
];
export default plugins;

@ -39,19 +39,19 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.16",
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/apputils": "^4.0.0-alpha.21",
"@jupyterlab/cells": "^4.0.0-alpha.21",
"@jupyterlab/docmanager": "^4.0.0-alpha.21",
"@jupyterlab/notebook": "^4.0.0-alpha.21",
"@jupyterlab/settingregistry": "^4.0.0-alpha.21",
"@jupyterlab/translation": "^4.0.0-alpha.21",
"@lumino/polling": "^2.0.0-rc.1",
"@lumino/widgets": "^2.0.0-rc.1"
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/apputils": "^4.0.0-alpha.22",
"@jupyterlab/cells": "^4.0.0-alpha.22",
"@jupyterlab/docmanager": "^4.0.0-alpha.22",
"@jupyterlab/notebook": "^4.0.0-alpha.22",
"@jupyterlab/settingregistry": "^4.0.0-alpha.22",
"@jupyterlab/translation": "^4.0.0-alpha.22",
"@lumino/polling": "^2.0.0",
"@lumino/widgets": "^2.0.0"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -3,13 +3,13 @@
import {
JupyterFrontEnd,
JupyterFrontEndPlugin
JupyterFrontEndPlugin,
} from '@jupyterlab/application';
import {
ISessionContext,
DOMUtils,
IToolbarWidgetRegistry
IToolbarWidgetRegistry,
} from '@jupyterlab/apputils';
import { Cell, CodeCell } from '@jupyterlab/cells';
@ -21,7 +21,7 @@ import { IDocumentManager } from '@jupyterlab/docmanager';
import {
NotebookPanel,
INotebookTracker,
INotebookTools
INotebookTools,
} from '@jupyterlab/notebook';
import { ISettingRegistry } from '@jupyterlab/settingregistry';
@ -81,7 +81,7 @@ const checkpoints: JupyterFrontEndPlugin<void> = {
const node = document.createElement('div');
if (toolbarRegistry) {
toolbarRegistry.addFactory('TopBar', 'checkpoint', toolbar => {
toolbarRegistry.addFactory('TopBar', 'checkpoint', (toolbar) => {
const widget = new Widget({ node });
widget.id = DOMUtils.createDomID();
widget.addClass('jp-NotebookCheckpoint');
@ -119,11 +119,11 @@ const checkpoints: JupyterFrontEndPlugin<void> = {
factory: () => onChange(),
frequency: {
interval: 2000,
backoff: false
backoff: false,
},
standby: 'when-hidden'
standby: 'when-hidden',
});
}
},
};
/**
@ -176,7 +176,7 @@ const kernelLogo: JupyterFrontEndPlugin<void> = {
};
if (toolbarRegistry) {
toolbarRegistry.addFactory('TopBar', 'kernelLogo', toolbar => {
toolbarRegistry.addFactory('TopBar', 'kernelLogo', (toolbar) => {
const widget = new Widget({ node });
widget.addClass('jp-NotebookKernelLogo');
return widget;
@ -186,7 +186,7 @@ const kernelLogo: JupyterFrontEndPlugin<void> = {
app.started.then(() => {
shell.currentChanged.connect(onChange);
});
}
},
};
/**
@ -248,7 +248,7 @@ const kernelStatus: JupyterFrontEndPlugin<void> = {
};
shell.currentChanged.connect(onChange);
}
},
};
/**
@ -327,7 +327,7 @@ const scrollOutput: JupyterFrontEndPlugin<void> = {
Promise.all([loadSettings, app.restored])
.then(([settings]) => {
updateSettings(settings);
settings.changed.connect(settings => {
settings.changed.connect((settings) => {
updateSettings(settings);
});
})
@ -335,7 +335,7 @@ const scrollOutput: JupyterFrontEndPlugin<void> = {
console.error(reason.message);
});
}
}
},
};
/**
@ -363,7 +363,7 @@ const notebookToolsWidget: JupyterFrontEndPlugin<void> = {
}
};
shell.currentChanged.connect(onChange);
}
},
};
/**
@ -392,7 +392,7 @@ const trusted: JupyterFrontEndPlugin<void> = {
};
notebookShell.currentChanged.connect(onChange);
}
},
};
/**
@ -404,7 +404,7 @@ const plugins: JupyterFrontEndPlugin<any>[] = [
kernelStatus,
scrollOutput,
notebookToolsWidget,
trusted
trusted,
];
export default plugins;

@ -37,7 +37,7 @@ const isTrusted = (notebook: Notebook): boolean => {
*/
const TrustedButton = ({
notebook,
translator
translator,
}: {
notebook: Notebook;
translator: ITranslator;
@ -93,7 +93,7 @@ export namespace TrustedComponent {
*/
export const create = ({
notebook,
translator
translator,
}: {
notebook: Notebook;
translator: ITranslator;

@ -38,14 +38,14 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/coreutils": "^6.0.0-alpha.21",
"@jupyterlab/terminal": "^4.0.0-alpha.21",
"@lumino/algorithm": "^2.0.0-rc.1"
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/coreutils": "^6.0.0-alpha.22",
"@jupyterlab/terminal": "^4.0.0-alpha.22",
"@lumino/algorithm": "^2.0.0"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -4,7 +4,7 @@
import {
IRouter,
JupyterFrontEnd,
JupyterFrontEndPlugin
JupyterFrontEndPlugin,
} from '@jupyterlab/application';
import { PageConfig } from '@jupyterlab/coreutils';
@ -45,11 +45,11 @@ const opener: JupyterFrontEndPlugin<void> = {
terminal.content.setOption('closeOnExit', false);
});
commands.execute('terminal:open', { name });
}
},
});
router.register({ command, pattern: terminalPattern });
}
},
};
/**
@ -62,7 +62,10 @@ const redirect: JupyterFrontEndPlugin<void> = {
activate: (app: JupyterFrontEnd, tracker: ITerminalTracker) => {
const baseUrl = PageConfig.getBaseUrl();
tracker.widgetAdded.connect((send, terminal) => {
const widget = find(app.shell.widgets('main'), w => w.id === terminal.id);
const widget = find(
app.shell.widgets('main'),
(w) => w.id === terminal.id
);
if (widget) {
// bail if the terminal is already added to the main area
return;
@ -73,7 +76,7 @@ const redirect: JupyterFrontEndPlugin<void> = {
// dispose the widget since it is not used on this page
terminal.dispose();
});
}
},
};
/**

@ -40,25 +40,25 @@
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.16",
"@jupyter-notebook/tree": "^7.0.0-alpha.16",
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/apputils": "^4.0.0-alpha.21",
"@jupyterlab/coreutils": "^6.0.0-alpha.21",
"@jupyterlab/docmanager": "^4.0.0-alpha.21",
"@jupyterlab/filebrowser": "^4.0.0-alpha.21",
"@jupyterlab/mainmenu": "^4.0.0-alpha.21",
"@jupyterlab/services": "^7.0.0-alpha.21",
"@jupyterlab/settingeditor": "^4.0.0-alpha.21",
"@jupyterlab/settingregistry": "^4.0.0-alpha.21",
"@jupyterlab/statedb": "^4.0.0-alpha.21",
"@jupyterlab/translation": "^4.0.0-alpha.21",
"@jupyterlab/ui-components": "^4.0.0-alpha.36",
"@lumino/algorithm": "^2.0.0-rc.1",
"@lumino/commands": "^2.0.0-rc.1",
"@lumino/widgets": "^2.0.0-rc.1"
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/apputils": "^4.0.0-alpha.22",
"@jupyterlab/coreutils": "^6.0.0-alpha.22",
"@jupyterlab/docmanager": "^4.0.0-alpha.22",
"@jupyterlab/filebrowser": "^4.0.0-alpha.22",
"@jupyterlab/mainmenu": "^4.0.0-alpha.22",
"@jupyterlab/services": "^7.0.0-alpha.22",
"@jupyterlab/settingeditor": "^4.0.0-alpha.22",
"@jupyterlab/settingregistry": "^4.0.0-alpha.22",
"@jupyterlab/statedb": "^4.0.0-alpha.22",
"@jupyterlab/translation": "^4.0.0-alpha.22",
"@jupyterlab/ui-components": "^4.0.0-alpha.37",
"@lumino/algorithm": "^2.0.0",
"@lumino/commands": "^2.0.0",
"@lumino/widgets": "^2.0.0"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -3,13 +3,13 @@
import {
JupyterFrontEnd,
JupyterFrontEndPlugin
JupyterFrontEndPlugin,
} from '@jupyterlab/application';
import {
IToolbarWidgetRegistry,
createToolbarFactory,
setToolbar
setToolbar,
} from '@jupyterlab/apputils';
import { PageConfig } from '@jupyterlab/coreutils';
@ -17,7 +17,7 @@ import { PageConfig } from '@jupyterlab/coreutils';
import {
FileBrowser,
Uploader,
IDefaultFileBrowser
IDefaultFileBrowser,
} from '@jupyterlab/filebrowser';
import { ISettingRegistry } from '@jupyterlab/settingregistry';
@ -33,7 +33,7 @@ import {
FilenameSearcher,
folderIcon,
IScore,
runningIcon
runningIcon,
} from '@jupyterlab/ui-components';
import { Menu, MenuBar } from '@lumino/widgets';
@ -81,7 +81,7 @@ const createNew: JupyterFrontEndPlugin<void> = {
const trans = translator.load('notebook');
const overflowOptions = {
overflowMenuOptions: { isVisible: false }
overflowMenuOptions: { isVisible: false },
};
const menubar = new MenuBar(overflowOptions);
const newMenu = new Menu({ commands });
@ -94,10 +94,10 @@ const createNew: JupyterFrontEndPlugin<void> = {
'terminal:create-new',
'console:create',
'filebrowser:create-new-file',
'filebrowser:create-new-directory'
'filebrowser:create-new-directory',
];
newCommands.forEach(command => {
newCommands.forEach((command) => {
newMenu.addItem({ command });
});
@ -113,7 +113,7 @@ const createNew: JupyterFrontEndPlugin<void> = {
}
);
}
}
},
};
/**
@ -141,7 +141,7 @@ const loadPlugins: JupyterFrontEndPlugin<void> = {
Object.keys(allPlugins).forEach((key: string) => {
const extensionsAndPlugins: { [key: string]: boolean | [string] } =
allPlugins[key];
Object.keys(extensionsAndPlugins).forEach(plugin => {
Object.keys(extensionsAndPlugins).forEach((plugin) => {
const value = extensionsAndPlugins[plugin];
if (typeof value === 'boolean' && value) {
pluginsSet.add(plugin);
@ -170,7 +170,7 @@ const loadPlugins: JupyterFrontEndPlugin<void> = {
}
});
});
}
},
};
/**
@ -189,9 +189,9 @@ const openFileBrowser: JupyterFrontEndPlugin<void> = {
commands.addCommand(CommandIDs.activate, {
execute: () => {
notebookTree.currentWidget = browser;
}
},
});
}
},
};
/**
@ -203,7 +203,7 @@ const notebookTreeWidget: JupyterFrontEndPlugin<INotebookTree> = {
IDefaultFileBrowser,
ITranslator,
ISettingRegistry,
IToolbarWidgetRegistry
IToolbarWidgetRegistry,
],
optional: [IRunningSessionManagers, ISettingEditorTracker],
autoStart: true,
@ -238,7 +238,7 @@ const notebookTreeWidget: JupyterFrontEndPlugin<INotebookTree> = {
new Uploader({
model: browser.model,
translator,
label: trans.__('Upload')
label: trans.__('Upload'),
})
);
@ -251,13 +251,13 @@ const notebookTreeWidget: JupyterFrontEndPlugin<INotebookTree> = {
filterFn: (item: string) => Partial<IScore> | null,
query?: string
) => {
browser.model.setFilter(value => {
browser.model.setFilter((value) => {
return filterFn(value.name.toLowerCase());
});
},
useFuzzyFilter: true,
placeholder: trans.__('Filter files by name'),
forceRefresh: true
forceRefresh: true,
});
searcher.addClass(FILTERBOX_CLASS);
return searcher;
@ -310,7 +310,7 @@ const notebookTreeWidget: JupyterFrontEndPlugin<INotebookTree> = {
}
return nbTreeWidget;
}
},
};
/**
@ -320,6 +320,6 @@ const plugins: JupyterFrontEndPlugin<any>[] = [
createNew,
loadPlugins,
openFileBrowser,
notebookTreeWidget
notebookTreeWidget,
];
export default plugins;

@ -39,25 +39,25 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.16",
"@jupyterlab/application": "^4.0.0-alpha.21",
"@jupyterlab/apputils": "^4.0.0-alpha.21",
"@jupyterlab/coreutils": "^6.0.0-alpha.21",
"@jupyterlab/docmanager": "^4.0.0-alpha.21",
"@jupyterlab/filebrowser": "^4.0.0-alpha.21",
"@jupyterlab/mainmenu": "^4.0.0-alpha.21",
"@jupyterlab/services": "^7.0.0-alpha.21",
"@jupyterlab/settingregistry": "^4.0.0-alpha.21",
"@jupyterlab/statedb": "^4.0.0-alpha.21",
"@jupyterlab/translation": "^4.0.0-alpha.21",
"@jupyterlab/ui-components": "^4.0.0-alpha.36",
"@lumino/algorithm": "^2.0.0-rc.1",
"@lumino/commands": "^2.0.0-rc.1",
"@lumino/coreutils": "^2.0.0-rc.1",
"@lumino/widgets": "^2.0.0-rc.1"
"@jupyterlab/application": "^4.0.0-alpha.22",
"@jupyterlab/apputils": "^4.0.0-alpha.22",
"@jupyterlab/coreutils": "^6.0.0-alpha.22",
"@jupyterlab/docmanager": "^4.0.0-alpha.22",
"@jupyterlab/filebrowser": "^4.0.0-alpha.22",
"@jupyterlab/mainmenu": "^4.0.0-alpha.22",
"@jupyterlab/services": "^7.0.0-alpha.22",
"@jupyterlab/settingregistry": "^4.0.0-alpha.22",
"@jupyterlab/statedb": "^4.0.0-alpha.22",
"@jupyterlab/translation": "^4.0.0-alpha.22",
"@jupyterlab/ui-components": "^4.0.0-alpha.37",
"@lumino/algorithm": "^2.0.0",
"@lumino/commands": "^2.0.0",
"@lumino/coreutils": "^2.0.0",
"@lumino/widgets": "^2.0.0"
},
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -15,7 +15,7 @@ export class NotebookTreeWidget extends TabPanel implements INotebookTree {
super({
tabPlacement: 'top',
tabsMovable: true,
renderer: TabBarSvg.defaultRenderer
renderer: TabBarSvg.defaultRenderer,
});
this.addClass('jp-TreePanel');
}

@ -42,20 +42,20 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/ui-components": "^4.0.0-alpha.36",
"@jupyterlab/ui-components": "^4.0.0-alpha.37",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"@jupyterlab/testutils": "^4.0.0-alpha.21",
"@jupyterlab/testutils": "^4.0.0-alpha.22",
"@types/jest": "^29.2.5",
"babel-loader": "^8.0.6",
"jest": "^29.3.1",
"rimraf": "^3.0.2",
"ts-jest": "^29.0.3",
"typescript": "5.0.1-rc"
"typescript": "~5.0.2"
},
"publishConfig": {
"access": "public"

@ -9,5 +9,5 @@ import jupyterSvgstr from '../../style/icons/jupyter.svg';
export const jupyterIcon = new LabIcon({
name: 'notebook-ui-components:jupyter',
svgstr: jupyterSvgstr
svgstr: jupyterSvgstr,
});

@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling>=1.11", "jupyterlab>=4.0.0a36,<5"]
requires = ["hatchling>=1.11", "jupyterlab>=4.0.0a37,<5"]
build-backend = "hatchling.build"
[project]
@ -32,7 +32,7 @@ classifiers = [
dependencies = [
"jupyter_server>=2.0.1,<3",
"importlib-resources>=5.0;python_version<\"3.9\"",
"jupyterlab>=4.0.0a36,<5",
"jupyterlab>=4.0.0a37,<5",
"jupyterlab_server>=2.19.0,<3",
"notebook_shim>=0.2,<0.3",
"tornado>=6.2.0",

@ -15,7 +15,8 @@
"test:update": "playwright test --update-snapshots"
},
"dependencies": {
"@jupyterlab/galata": "~5.0.0-alpha.19",
"@jupyterlab/galata": "~5.0.0-alpha.22",
"@playwright/test": "^1.31.0",
"rimraf": "^3.0.2"
}
}

@ -4,7 +4,7 @@ module.exports = {
...baseConfig,
use: {
appPath: '',
video: 'retain-on-failure'
video: 'retain-on-failure',
},
retries: 1,
webServer: [
@ -12,7 +12,7 @@ module.exports = {
command: 'jlpm start',
port: 8888,
timeout: 120 * 1000,
reuseExistingServer: true
}
]
reuseExistingServer: true,
},
],
};

@ -20,7 +20,7 @@ const processRenameDialog = async (page, prevName: string, newName: string) => {
await Promise.all([
await page.click('text="Rename"'),
// wait until the URL is updated
await page.waitForNavigation()
await page.waitForNavigation(),
]);
};
@ -34,7 +34,7 @@ test.describe('Editor', () => {
test('Renaming the file by clicking on the title', async ({
page,
tmpPath
tmpPath,
}) => {
const file = `${tmpPath}/${FILE}`;
await page.goto(`edit/${file}`);

@ -6,5 +6,5 @@ export const test = base.extend({
await page.waitForSelector('#main-panel');
};
await use(waitIsReady);
}
},
});

@ -32,7 +32,7 @@ test.describe('General', () => {
await page
.locator(checkpointLocator)
.evaluate(
element => (element.innerHTML = 'Last Checkpoint: 3 seconds ago')
(element) => (element.innerHTML = 'Last Checkpoint: 3 seconds ago')
);
// force switching back to command mode to avoid capturing the cursor in the screenshot

@ -20,7 +20,7 @@ const MENU_PATHS = [
'Kernel',
'Settings',
'Settings>Theme',
'Help'
'Help',
];
test.use({ autoGoto: false });
@ -33,7 +33,7 @@ test.describe('Notebook Menus', () => {
);
});
MENU_PATHS.forEach(menuPath => {
MENU_PATHS.forEach((menuPath) => {
test(`Open menu item ${menuPath}`, async ({ page, tmpPath }) => {
await page.goto(`notebooks/${tmpPath}/${NOTEBOOK}`);
await waitForKernelReady(page);

@ -14,7 +14,7 @@ test.use({ autoGoto: false });
test.describe('Mobile', () => {
test('The layout should be more compact on the file browser page', async ({
page,
tmpPath
tmpPath,
}) => {
await page.goto(`tree/${tmpPath}`);
@ -29,7 +29,7 @@ test.describe('Mobile', () => {
test('The layout should be more compact on the notebook page', async ({
page,
tmpPath
tmpPath,
}) => {
const notebook = 'empty.ipynb';
await page.contents.uploadFile(

@ -31,7 +31,7 @@ test.describe('Notebook', () => {
test('Renaming the notebook should be possible', async ({
page,
tmpPath
tmpPath,
}) => {
const notebook = `${tmpPath}/${NOTEBOOK}`;
await page.goto(`notebooks/${notebook}`);
@ -49,7 +49,7 @@ test.describe('Notebook', () => {
await Promise.all([
await page.click('text="Rename"'),
// wait until the URL is updated
await page.waitForNavigation()
await page.waitForNavigation(),
]);
// Check the URL contains the new name
@ -61,7 +61,7 @@ test.describe('Notebook', () => {
// and usable in Jupyter Notebook without active tabs
test('Outputs should be scrolled automatically', async ({
page,
tmpPath
tmpPath,
}) => {
const notebook = 'autoscroll.ipynb';
await page.contents.uploadFile(
@ -87,7 +87,7 @@ test.describe('Notebook', () => {
expect(page.locator('.jp-mod-outputsScrolled').nth(1)).toHaveCount(0);
const checkCell = async (n: number): Promise<boolean> => {
const scrolled = await page.$eval(`.jp-Notebook-cell >> nth=${n}`, el =>
const scrolled = await page.$eval(`.jp-Notebook-cell >> nth=${n}`, (el) =>
el.classList.contains('jp-mod-outputsScrolled')
);
return scrolled;

@ -10,7 +10,7 @@ test.use({ autoGoto: false });
test.describe('Settings', () => {
test('Should be persisted after reloading the page', async ({
page,
tmpPath
tmpPath,
}) => {
const showHeaderPath = 'View>Show Header';

@ -18,7 +18,7 @@ test.describe('Smoke', () => {
// Choose the kernel
const [console] = await Promise.all([
page.waitForEvent('popup'),
page.click('text="Select"')
page.click('text="Select"'),
]);
await console.waitForLoadState();
await console.waitForSelector('.jp-CodeConsole');
@ -27,7 +27,7 @@ test.describe('Smoke', () => {
const [notebook] = await Promise.all([
page.waitForEvent('popup'),
page.click('text="New"'),
page.click('text="Notebook"')
page.click('text="Notebook"'),
]);
try {
@ -67,7 +67,7 @@ math.pi`);
notebook.waitForEvent('popup'),
notebook.click(
'//*[local-name()="svg" and normalize-space(.)=\'Jupyter\']'
)
),
]);
// Shut down the kernels
@ -91,7 +91,7 @@ math.pi`);
// Open JupyterLab
const [lab] = await Promise.all([
page.waitForEvent('popup'),
page.menu.clickMenuItem('View>Open JupyterLab')
page.menu.clickMenuItem('View>Open JupyterLab'),
]);
await lab.waitForSelector('.jp-Launcher');
await lab.close();

@ -25,7 +25,7 @@ test('should go to subfolder', async ({ page, tmpPath }) => {
test('should update url when navigating in filebrowser', async ({
page,
tmpPath
tmpPath,
}) => {
await page.contents.createDirectory(`${tmpPath}/${SUBFOLDER}`);

File diff suppressed because it is too large Load Diff

31358
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save