Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '16.x'
node-version: '18.x'

- name: get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '16.x'
node-version: '18.x'

- name: Install Python dependencies
run: |
Expand Down
5 changes: 5 additions & 0 deletions docs/source/nbclassic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ NbClassic Development
the classic Jupyter Notebook 6 and serves this UI through the server
endpoints provided by Jupyter Server.

NbClassic 1.3.2 contained new paths for the static assets of the classic Notebook. This was done to allow
for the complete removal of bower components and the use of npm packages. This change broke the ability to
serve the classic Notebook static assets from the original endpoints. NbClassic 1.3.3 introduces the use of the
Copy Webpack Plugin to copy the static assets to the legacy paths.

*Jupyter Server Extensions*
- `Authoring a basic server extension <https://jupyter-server.readthedocs.io/en/latest/developers/extensions.html>`_

Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"babel-loader": "^8.2.2",
"babel-polyfill": "^6.26.0",
"commander": "^6.0.0",
"copy-webpack-plugin": "^13.0.1",
"gettext-parser": "2.0.0",
"gettext-to-messageformat": "0.3.1",
"less": "^4.2.2",
Expand All @@ -60,26 +61,27 @@
"backbone": "~1.6.0",
"bootstrap": "~3.4.1",
"bootstrap-tour": "0.12.0",
"mathjax": "^2.7.4",
"codemirror": "~5.58.2",
"es6-promise": "~1.0",
"font-awesome": "4.7.0",
"google-caja-sanitizer": "~1.0.4",
"jed": "~1.1.1",
"jquery": "~3.7.1",
"jquery-typeahead": "~2.11.1",
"jquery-ui": "~1.13.3",
"marked": "~4.0.10",
"mathjax": "^2.7.4",
"moment": "~2.29.4",
"react": "~16.0.0",
"react-dom": "~16.0.0",
"requirejs-plugins": "~1.0.2",
"requirejs-text": "~2.0.16",
"text-encoding": "~0.1",
"underscore": "~1.13.7",
"font-awesome": "4.7.0"
"underscore": "~1.13.7"
},
"engines": {
"yarn": "^1.22.22",
"node": ">=16"
}
"node": ">=18"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ artifacts = [
"nbclassic/static/components/create-react-class/index.js" = "nbclassic/static/components/create-react-class/index.js"
"nbclassic/static/components/google-caja-sanitizer/sanitizer.js" = "nbclassic/static/components/google-caja-sanitizer/sanitizer.js"
"nbclassic/static/components/jed/jed.js" = "nbclassic/static/components/jed/jed.js"
"nbclassic/static/components/es6-promise/promise.min.js" = "nbclassic/static/components/es6-promise/promise.min.js"
"nbclassic/static/components/jquery/jquery.min.js" = "nbclassic/static/components/jquery/jquery.min.js"
"nbclassic/static/components/react/react-dom.production.min.js" = "nbclassic/static/components/react/react-dom.production.min.js"
"nbclassic/static/components/react/react.production.min.js" = "nbclassic/static/components/react/react.production.min.js"
"nbclassic/static/components/jquery/dist/jquery.min.js" = "nbclassic/static/components/jquery/dist/jquery.min.js"
"nbclassic/static/components/jquery-typeahead/dist/jquery.typeahead.min.js" = "nbclassic/static/components/jquery-typeahead/dist/jquery.typeahead.min.js"
"nbclassic/static/components/jquery-typeahead/dist/jquery.typeahead.min.css" = "nbclassic/static/components/jquery-typeahead/dist/jquery.typeahead.min.css"
Expand Down
37 changes: 36 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
const path = require('path');
const crypto = require('crypto');
const CopyWebpackPlugin = require('copy-webpack-plugin');

// Workaround for loaders using "md4" by default, which is not supported in FIPS-compliant OpenSSL
// See https://github.com/jupyterlab/jupyterlab/issues/11248
const cryptoOrigCreateHash = crypto.createHash;
crypto.createHash = (algorithm) =>
cryptoOrigCreateHash(algorithm == 'md4' ? 'sha256' : algorithm);

module.exports = {
const mainConfig = {
name: 'mainConfig',
entry: ['babel-polyfill', '@jupyterlab/apputils/lib/sanitizer'],
output: {
filename: 'index.js',
Expand All @@ -32,3 +34,36 @@ module.exports = {
]
}
}

const nb6Config = {
name: 'nb6Config',
mode: 'production',
entry: {},
plugins: [
new CopyWebpackPlugin({
patterns: [
// Same content, different path/name for NB6-style consumers:
{
from: path.resolve(__dirname, 'nbclassic/static/components/react/umd/react.production.min.js'),
to: path.resolve(__dirname, 'nbclassic/static/components/react/react.production.min.js'),
},
{
from: path.resolve(__dirname, 'nbclassic/static/components/react-dom/umd/react-dom.production.min.js'),
to: path.resolve(__dirname, 'nbclassic/static/components/react/react-dom.production.min.js'),
},
{
from: path.resolve(__dirname, 'nbclassic/static/components/es6-promise/dist/promise-1.0.0.min.js'),
to: path.resolve(__dirname, 'nbclassic/static/components/es6-promise/promise.min.js'),
},
{
from: path.resolve(__dirname, 'nbclassic/static/components/jquery/dist/jquery.min.js'),
to: path.resolve(__dirname, 'nbclassic/static/components/jquery/jquery.min.js'),
}
],
}),
],
// ensure this runs after 'main'
dependencies: ['mainConfig'],
};

module.exports = [mainConfig, nb6Config];
48 changes: 47 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,17 @@ copy-anything@^2.0.1:
dependencies:
is-what "^3.14.1"

copy-webpack-plugin@^13.0.1:
version "13.0.1"
resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-13.0.1.tgz#fba18c22bcab3633524e1b652580ff4489eddc0d"
integrity sha512-J+YV3WfhY6W/Xf9h+J1znYuqTye2xkBUIGyTPWuBAT27qajBa5mR4f8WBmfDY3YjRftT2kqZZiLi1qf0H+UOFw==
dependencies:
glob-parent "^6.0.1"
normalize-path "^3.0.0"
schema-utils "^4.2.0"
serialize-javascript "^6.0.2"
tinyglobby "^0.2.12"

core-js-compat@^3.40.0:
version "3.41.0"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.41.0.tgz#4cdfce95f39a8f27759b667cf693d96e5dda3d17"
Expand Down Expand Up @@ -1934,6 +1945,11 @@ fbjs@^0.8.16:
setimmediate "^1.0.5"
ua-parser-js "^0.7.30"

fdir@^6.5.0:
version "6.5.0"
resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.5.0.tgz#ed2ab967a331ade62f18d077dae192684d50d350"
integrity sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==

fill-range@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
Expand Down Expand Up @@ -2056,6 +2072,13 @@ [email protected]:
dependencies:
gettext-parser "^1.4.0"

glob-parent@^6.0.1:
version "6.0.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==
dependencies:
is-glob "^4.0.3"

glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
Expand Down Expand Up @@ -2199,7 +2222,7 @@ is-extglob@^2.1.1:
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==

is-glob@^4.0.1, is-glob@~4.0.1:
is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
version "4.0.3"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
Expand Down Expand Up @@ -2660,6 +2683,11 @@ picomatch@^2.0.4, picomatch@^2.2.1:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==

picomatch@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042"
integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==

pify@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
Expand Down Expand Up @@ -3001,6 +3029,16 @@ schema-utils@^2.6.5:
ajv "^6.12.4"
ajv-keywords "^3.5.2"

schema-utils@^4.2.0:
version "4.3.2"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.2.tgz#0c10878bf4a73fd2b1dfd14b9462b26788c806ae"
integrity sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==
dependencies:
"@types/json-schema" "^7.0.9"
ajv "^8.9.0"
ajv-formats "^2.1.1"
ajv-keywords "^5.1.0"

schema-utils@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.0.tgz#3b669f04f71ff2dfb5aba7ce2d5a9d79b35622c0"
Expand Down Expand Up @@ -3182,6 +3220,14 @@ text-encoding@~0.1:
resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.1.0.tgz#dfae5dfb298c3bbe5a8e5a95f4de7fffd010cc5b"
integrity sha512-YioxUvvjxITnWOgK0OHqyYyAtqi3bYznsE4+PXgDFcDyxLshJ+VZ6xm0lCeuySNsVXVeLRspRkix3G0l7Nad9w==

tinyglobby@^0.2.12:
version "0.2.15"
resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.15.tgz#e228dd1e638cea993d2fdb4fcd2d4602a79951c2"
integrity sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==
dependencies:
fdir "^6.5.0"
picomatch "^4.0.3"

to-regex-range@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
Expand Down
Loading