Skip to content

Commit 7e3339c

Browse files
authored
Merge pull request #143 from PolusAI/4.0.11
Update to the latest JupyterLab 4.x (4.0.11)
2 parents 94f9d38 + eb0fe2f commit 7e3339c

File tree

4 files changed

+55
-42
lines changed

4 files changed

+55
-42
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

{{cookiecutter.github_project_name}}/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jupyter nbextension enable --py [--sys-prefix|--user|--system] {{ cookiecutter.p
2525

2626
Create a dev environment:
2727
```bash
28-
conda create -n {{ cookiecutter.python_package_name }}-dev -c conda-forge nodejs yarn python jupyterlab
28+
conda create -n {{ cookiecutter.python_package_name }}-dev -c conda-forge nodejs python jupyterlab=4.0.11
2929
conda activate {{ cookiecutter.python_package_name }}-dev
3030
```
3131

@@ -39,7 +39,7 @@ notebook / lab frontend. For lab, this is done by the command:
3939

4040
```
4141
jupyter labextension develop --overwrite .
42-
yarn run build
42+
jlpm run build
4343
```
4444

4545
For classic notebook, you need to run:
@@ -61,7 +61,7 @@ terminals to watch for changes in the extension's source and automatically rebui
6161

6262
```bash
6363
# Watch the source directory in one terminal, automatically rebuilding when needed
64-
yarn run watch
64+
jlpm run watch
6565
# Run JupyterLab in another terminal
6666
jupyter lab
6767
```

{{cookiecutter.github_project_name}}/package.json

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@
2929
"url": "https://github.com/{{ cookiecutter.github_organization_name }}/{{ cookiecutter.github_project_name }}"
3030
},
3131
"scripts": {
32-
"build": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension:dev",
33-
"build:prod": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension",
32+
"build": "jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension:dev",
33+
"build:prod": "jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension",
3434
"build:labextension": "jupyter labextension build .",
3535
"build:labextension:dev": "jupyter labextension build --development True .",
3636
"build:lib": "tsc",
3737
"build:nbextension": "webpack",
38-
"clean": "yarn run clean:lib && yarn run clean:nbextension && yarn run clean:labextension",
38+
"clean": "jlpm run clean:lib && jlpm run clean:nbextension && jlpm run clean:labextension",
3939
"clean:lib": "rimraf lib",
4040
"clean:labextension": "rimraf {{ cookiecutter.python_package_name }}/labextension",
4141
"clean:nbextension": "rimraf {{ cookiecutter.python_package_name }}/nbextension/static/index.js",
4242
"lint": "eslint . --ext .ts,.tsx --fix",
4343
"lint:check": "eslint . --ext .ts,.tsx",
44-
"prepack": "yarn run build:lib",
44+
"prepack": "jlpm run build:lib",
4545
"test": "jest",
4646
"watch": "npm-run-all -p watch:*",
4747
"watch:lib": "tsc -w",
@@ -52,35 +52,40 @@
5252
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4 || ^5 || ^6"
5353
},
5454
"devDependencies": {
55-
"@babel/core": "^7.5.0",
56-
"@babel/preset-env": "^7.5.0",
57-
"@jupyter-widgets/base-manager": "^1.0.2",
58-
"@jupyterlab/builder": "^3.0.0",
59-
"@lumino/application": "^1.6.0",
60-
"@lumino/widgets": "^1.6.0",
61-
"@types/jest": "^26.0.0",
62-
"@types/webpack-env": "^1.13.6",
63-
"@typescript-eslint/eslint-plugin": "^3.6.0",
64-
"@typescript-eslint/parser": "^3.6.0",
65-
"acorn": "^7.2.0",
66-
"css-loader": "^3.2.0",
67-
"eslint": "^7.4.0",
68-
"eslint-config-prettier": "^6.11.0",
69-
"eslint-plugin-prettier": "^3.1.4",
70-
"fs-extra": "^7.0.0",
55+
"@babel/core": "^7.23.7",
56+
"@babel/preset-env": "^7.23.8",
57+
"@jupyter-widgets/base-manager": "^1.0.7",
58+
"@jupyterlab/builder": "^4.0.11",
59+
"@lumino/application": "^2.3.0",
60+
"@lumino/widgets": "^2.3.1",
61+
"@types/jest": "^29.5.11",
62+
"@types/webpack-env": "^1.18.4",
63+
"@typescript-eslint/eslint-plugin": "^6.19.1",
64+
"@typescript-eslint/parser": "^6.19.1",
65+
"acorn": "^8.11.3",
66+
"css-loader": "^6.9.1",
67+
"eslint": "^8.56.0",
68+
"eslint-config-prettier": "^9.1.0",
69+
"eslint-plugin-prettier": "^5.1.3",
70+
"fs-extra": "^11.2.0",
7171
"identity-obj-proxy": "^3.0.0",
72-
"jest": "^26.0.0",
73-
"mkdirp": "^0.5.1",
74-
"npm-run-all": "^4.1.3",
75-
"prettier": "^2.0.5",
76-
"rimraf": "^2.6.2",
77-
"source-map-loader": "^1.1.3",
78-
"style-loader": "^1.0.0",
79-
"ts-jest": "^26.0.0",
80-
"ts-loader": "^8.0.0",
81-
"typescript": "~4.1.3",
82-
"webpack": "^5.61.0",
83-
"webpack-cli": "^4.0.0"
72+
"jest": "^29.7.0",
73+
"mkdirp": "^3.0.1",
74+
"npm-run-all": "^4.1.5",
75+
"prettier": "^3.2.4",
76+
"rimraf": "^5.0.5",
77+
"source-map-loader": "^5.0.0",
78+
"style-loader": "^3.3.4",
79+
"ts-jest": "^29.1.2",
80+
"ts-loader": "^9.5.1",
81+
"typescript": "~5.3.3",
82+
"webpack": "^5.90.0",
83+
"webpack-cli": "^5.1.4"
84+
},
85+
"devDependenciesComments": {
86+
"@jupyterlab/builder": "pinned to the latest JupyterLab 3.x release",
87+
"@lumino/application": "pinned to the latest Lumino 1.x release",
88+
"@lumino/widgets": "pinned to the latest Lumino 1.x release"
8489
},
8590
"jupyterlab": {
8691
"extension": "lib/plugin",

{{cookiecutter.github_project_name}}/pyproject.toml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[build-system]
22
requires = [
3-
"hatchling>=1.3.1",
4-
"jupyterlab==3.*",
3+
"hatchling>=1.21.1",
4+
"jupyterlab>=4.0.0,<5",
5+
"hatch-nodejs-version>=0.3.2",
56
]
67
build-backend = "hatchling.build"
78

@@ -10,7 +11,7 @@ name = "{{ cookiecutter.python_package_name }}"
1011
description = "{{ cookiecutter.project_short_description }}"
1112
readme = "README.md"
1213
license = { file = "LICENSE.txt" }
13-
requires-python = ">=3.7"
14+
requires-python = ">=3.9"
1415
authors = [
1516
{ name = "{{ cookiecutter.author_name }}", email = "{{ cookiecutter.author_email }}" },
1617
]
@@ -30,9 +31,11 @@ classifiers = [
3031
"Programming Language :: Python :: 3.8",
3132
"Programming Language :: Python :: 3.9",
3233
"Programming Language :: Python :: 3.10",
34+
"Programming Language :: Python :: 3.11",
35+
"Programming Language :: Python :: 3.12",
3336
]
3437
dependencies = [
35-
"ipywidgets>=7.0.0",
38+
"ipywidgets>=8.0.0",
3639
]
3740
version = "0.1.0.dev0"
3841

@@ -57,6 +60,9 @@ test = [
5760
[project.urls]
5861
Homepage = "https://github.com/{{ cookiecutter.github_organization_name }}/{{ cookiecutter.github_project_name }}"
5962

63+
[tool.hatch.metadata]
64+
allow-direct-references = true
65+
6066
[tool.hatch.build]
6167
artifacts = [
6268
"{{ cookiecutter.python_package_name }}/nbextension/index.*",
@@ -66,8 +72,8 @@ artifacts = [
6672

6773
[tool.hatch.build.targets.wheel.shared-data]
6874
"{{ cookiecutter.python_package_name }}/nbextension" = "share/jupyter/nbextensions/{{ cookiecutter.python_package_name }}"
69-
"{{ cookiecutter.python_package_name }}/labextension" = "share/jupyter/labextensions/{{ cookiecutter.python_package_name }}"
70-
"./install.json" = "share/jupyter/labextensions/{{ cookiecutter.python_package_name }}/install.json"
75+
"{{ cookiecutter.python_package_name }}/labextension" = "share/jupyter/labextensions/{{ cookiecutter.npm_package_name }}"
76+
"./install.json" = "share/jupyter/labextensions/{{ cookiecutter.npm_package_name }}/install.json"
7177
"./{{ cookiecutter.python_package_name }}.json" = "etc/jupyter/nbconfig/notebook.d/{{ cookiecutter.python_package_name }}.json"
7278

7379
[tool.hatch.build.targets.sdist]
@@ -86,12 +92,13 @@ skip-if-exists = [
8692
"{{ cookiecutter.python_package_name }}/labextension/package.json",
8793
]
8894
dependencies = [
89-
"hatch-jupyter-builder>=0.5.0",
95+
"hatch-jupyter-builder>=0.8.3",
9096
]
9197

9298
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
9399
path = "."
94100
build_cmd = "build:prod"
101+
npm = ["jlpm"]
95102

96103
[tool.tbump]
97104
field = [

0 commit comments

Comments
 (0)