Skip to content

Commit 91cb220

Browse files
committed
update deps for jlab 4
1 parent 466cb53 commit 91cb220

9 files changed

+77
-70
lines changed

.eslintrc.js

+1-12
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,11 @@ module.exports = {
77
],
88
parser: '@typescript-eslint/parser',
99
parserOptions: {
10-
project: 'tsconfig.json',
10+
project: 'tsconfig.eslint.json',
1111
sourceType: 'module'
1212
},
1313
plugins: ['@typescript-eslint'],
1414
rules: {
15-
'@typescript-eslint/naming-convention': [
16-
'error',
17-
{
18-
'selector': 'interface',
19-
'format': ['PascalCase'],
20-
'custom': {
21-
'regex': '^I[A-Z]',
22-
'match': true
23-
}
24-
}
25-
],
2615
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
2716
'@typescript-eslint/no-explicit-any': 'off',
2817
'@typescript-eslint/no-namespace': 'off',

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
node-version: '18.x'
2222
- name: Install dependencies
23-
run: python -m pip install -U jupyterlab~=3.0
23+
run: python -m pip install -U jupyterlab~=4.0
2424
- name: Build the extension
2525
run: |
2626
jlpm

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,4 @@ dmypy.json
116116

117117
# yarn build related
118118
.yarn/
119-
.yarnrc.yml
120119
yarn.lock

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ The following assumes you're using conda. If not, you'll need to install nodejs
4141
in your environemnt separately.
4242

4343
```bash
44-
conda create -n widgyts-dev -c conda-forge nodejs python=3.10 jupyterlab=3
44+
conda create -n widgyts-dev -c conda-forge nodejs python=3.10 jupyterlab=4
4545
conda activate widgyts-dev
4646
```
4747

4848
Install the python. This will also build the TS package.
4949
```bash
50-
pip install -e "."
50+
pip install -e .
5151
```
5252

5353
When developing your extensions, you need to manually enable your extensions with the

babel.config.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
sourceMap: 'inline',
3+
presets: [
4+
[
5+
'@babel/preset-env',
6+
{
7+
targets: {
8+
node: 'current',
9+
},
10+
},
11+
],
12+
],
13+
};

package.json

+37-41
Original file line numberDiff line numberDiff line change
@@ -60,54 +60,50 @@
6060
},
6161
"dependencies": {
6262
"@data-exp-lab/yt-tools": "^0.4.1",
63-
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4",
64-
"@jupyterlab/application": "^3.0.4",
65-
"@jupyterlab/coreutils": "^5.0.2",
66-
"@jupyterlab/mainmenu": "^3.0.3",
67-
"@jupyterlab/services": "^6.0.3",
63+
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4 || ^5 || ^6",
64+
"@jupyterlab/application": "^4.2.5",
6865
"@types/fscreen": "^1.0.1",
6966
"@types/node": "^10.11.6",
7067
"@types/three": "^0.141.0",
7168
"fscreen": "^1.2.0",
72-
"ipycanvas": "^0.8.2",
69+
"ipycanvas": "^0.13.3",
7370
"jupyter-threejs": "^2.3.0"
7471
},
7572
"devDependencies": {
76-
"@jupyterlab/builder": "^3.0.0",
77-
"@phosphor/application": "^1.6.0",
78-
"@phosphor/widgets": "^1.6.0",
79-
"@types/expect.js": "^0.3.29",
80-
"@types/mocha": "^5.2.5",
81-
"@types/node": "^10.11.6",
82-
"@types/webpack-env": "^1.13.6",
83-
"@typescript-eslint/eslint-plugin": "^3.6.0",
84-
"@typescript-eslint/parser": "^3.6.0",
85-
"acorn": "^7.2.0",
86-
"css-loader": "^3.2.0",
87-
"eslint": "^7.4.0",
88-
"eslint-config-prettier": "^6.11.0",
89-
"eslint-plugin-prettier": "^3.1.4",
90-
"expect.js": "^0.3.1",
91-
"fs-extra": "^7.0.0",
92-
"karma": "^3.1.0",
93-
"karma-chrome-launcher": "^2.2.0",
94-
"karma-firefox-launcher": "^1.1.0",
95-
"karma-ie-launcher": "^1.0.0",
96-
"karma-mocha": "^1.3.0",
97-
"karma-mocha-reporter": "^2.2.5",
98-
"karma-typescript": "^5.0.3",
99-
"karma-typescript-es6-transform": "^5.0.3",
100-
"mkdirp": "^0.5.1",
101-
"mocha": "^5.2.0",
102-
"npm-run-all": "^4.1.3",
103-
"prettier": "^2.0.5",
104-
"rimraf": "^2.6.2",
105-
"source-map-loader": "^0.2.4",
106-
"style-loader": "^1.0.0",
107-
"ts-loader": "^5.2.1",
108-
"typescript": "^4.1.3",
109-
"webpack": "^4.20.2",
110-
"webpack-cli": "^3.1.2"
73+
"@babel/core": "^7.23.7",
74+
"@babel/preset-env": "^7.23.8",
75+
"@jupyter-widgets/base-manager": "^1.0.7",
76+
"@jupyterlab/builder": "^4.0.11",
77+
"@lumino/application": "^2.3.0",
78+
"@lumino/widgets": "^2.3.1",
79+
"@types/jest": "^29.5.11",
80+
"@types/webpack-env": "^1.18.4",
81+
"@typescript-eslint/eslint-plugin": "^6.19.1",
82+
"@typescript-eslint/parser": "^6.19.1",
83+
"acorn": "^8.11.3",
84+
"css-loader": "^6.9.1",
85+
"eslint": "^8.56.0",
86+
"eslint-config-prettier": "^9.1.0",
87+
"eslint-plugin-prettier": "^5.1.3",
88+
"fs-extra": "^11.2.0",
89+
"identity-obj-proxy": "^3.0.0",
90+
"jest": "^29.7.0",
91+
"mkdirp": "^3.0.1",
92+
"npm-run-all": "^4.1.5",
93+
"prettier": "^3.2.4",
94+
"rimraf": "^5.0.5",
95+
"source-map-loader": "^5.0.0",
96+
"style-loader": "^3.3.4",
97+
"ts-jest": "^29.1.2",
98+
"ts-loader": "^9.5.1",
99+
"typescript": "~5.3.3",
100+
"webpack": "^5.90.0",
101+
"webpack-cli": "^5.1.4"
102+
},
103+
"devDependenciesComments": {
104+
"@jupyterlab/builder": "pinned to the latest JupyterLab 4.x release",
105+
"@lumino/application": "pinned to the latest Lumino 2.x release",
106+
"@lumino/widgets": "pinned to the latest Lumino 2.x release"
111107
},
112108
"sideEffects": [
113109
"style/*.css",

pyproject.toml

+21-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[build-system]
22
requires = [
3-
"hatchling",
4-
"jupyterlab~=3.1",
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

@@ -16,7 +17,7 @@ authors = [
1617
keywords = [
1718
"Jupyter",
1819
"JupyterLab",
19-
"JupyterLab3",
20+
"JupyterLab4",
2021
]
2122
classifiers = [
2223
"Framework :: Jupyter",
@@ -29,8 +30,8 @@ classifiers = [
2930
]
3031
dependencies = [
3132
"ipycanvas>=0.4.7",
32-
"ipywidgets>=7.5.1",
33-
"jupyterlab~=3.0",
33+
"ipywidgets>=8.0.0",
34+
"jupyterlab>=4.0",
3435
"numpy>=1.14",
3536
"pythreejs>=2.2.0",
3637
"traitlets>=4.3.3",
@@ -49,12 +50,16 @@ Tracker = "https://github.com/yt-project/widgyts/issues"
4950

5051
[tool.hatch.build]
5152
artifacts = [
53+
"widgyts/labextension/*.tgz",
5254
"widgyts/labextension",
5355
]
5456

57+
[tool.hatch.metadata]
58+
allow-direct-references = true
59+
5560
[tool.hatch.build.targets.wheel.shared-data]
5661
"widgyts/labextension/static" = "share/jupyter/labextensions/@yt-project/yt-widgets/static"
57-
"install.json" = "share/jupyter/labextensions/@yt-project/yt-widgets/install.json"
62+
"./install.json" = "share/jupyter/labextensions/@yt-project/yt-widgets/install.json"
5863
"widgyts/labextension/build_log.json" = "share/jupyter/labextensions/@yt-project/yt-widgets/build_log.json"
5964
"widgyts/labextension/package.json" = "share/jupyter/labextensions/@yt-project/yt-widgets/package.json"
6065
jupyter-config = "etc/jupyter/jupyter_server_config.d"
@@ -66,7 +71,7 @@ exclude = [
6671

6772
[tool.hatch.build.hooks.jupyter-builder]
6873
dependencies = [
69-
"hatch-jupyter-builder>=0.9.1",
74+
"hatch-jupyter-builder>=0.8.3",
7075
]
7176
build-function = "hatch_jupyter_builder.npm_builder"
7277
ensured-targets = [
@@ -77,19 +82,23 @@ skip-if-exists = [
7782
"widgyts/labextension/static/style.js",
7883
]
7984

85+
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
86+
path = "."
87+
build_cmd = "build:prod"
88+
npm = [
89+
"jlpm",
90+
]
91+
8092
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
93+
path = "."
8194
build_dir = "widgyts/labextension"
8295
source_dir = "src"
8396
build_cmd = "install:extension"
8497
npm = [
8598
"jlpm",
8699
]
87100

88-
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
89-
build_cmd = "build:prod"
90-
npm = [
91-
"jlpm",
92-
]
101+
93102

94103
[tool.black]
95104
line-length = 88

src/fullscreen.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class FullscreenButtonView extends DOMWidgetView {
5050
this.el.classList.add('jupyter-widgets');
5151
this.el.classList.add('jupyter-button');
5252
this.el.classList.add('widget-button');
53-
this.delegate('click', this.el, this._handle_click);
53+
this.delegate('click', this.el.value, this._handle_click);
5454
this.update(); // Set defaults.
5555
}
5656

0 commit comments

Comments
 (0)