Skip to content

Commit 518d2c1

Browse files
committed
Fix build for latest yarn/jlpm
Move to jlpm to make sure we are in sync with JupyterLab quirks. Currently, jlpm is on yarn 3. To make the package work with that I had to: * Run `jlpm install` to change to the new lock file format. > ➤ YN0028: │ The lockfile would have been modified by this install, which is explicitly forbidden. * Change the CICD step that ran Jupyter in detached mode as yarn doesn't seem to respect the `&` operator at the end of command targets any more and won't run the target in the background. * Use PnP loose mode of yarn. This one applies due to transative dependencies not complying with recent yarn rules. NB that I pinned the version of JupyterLab to below 4. Signed-off-by: Vasilis Themelis <[email protected]>
1 parent 24f1586 commit 518d2c1

File tree

12 files changed

+25452
-17746
lines changed

12 files changed

+25452
-17746
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
working-directory: ui-tests-ipw7
130130

131131
- name: Launch JupyterLab
132-
run: yarn run start:detached
132+
run: yarn run start:detached &
133133
working-directory: ui-tests-ipw7
134134

135135
- name: Wait for JupyterLab
@@ -177,7 +177,7 @@ jobs:
177177
working-directory: ui-tests-ipw8
178178

179179
- name: Launch JupyterLab
180-
run: yarn run start:detached
180+
run: yarn run start:detached &
181181
working-directory: ui-tests-ipw8
182182

183183
- name: Wait for JupyterLab

.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nodeLinker: node-modules
2+
pnpMode: "loose"

package.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@
3333
"url": "https://github.com/Bloomberg/ipydatagrid"
3434
},
3535
"scripts": {
36-
"build": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension",
37-
"build:dev": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension:dev",
36+
"build": "jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension",
37+
"build:dev": "jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension:dev",
3838
"build:labextension": "jupyter labextension build .",
3939
"build:labextension:dev": "jupyter labextension build --development True .",
4040
"build:lib": "tsc",
4141
"build:nbextension": "webpack --mode=production --no-devtool",
4242
"build:widget-examples": "cd widget-examples/basic && webpack --mode=production",
43-
"build:all": "yarn run build:labextension && yarn run build:nbextension && yarn run build:widget-examples",
44-
"clean": "rimraf dist && yarn run clean:lib && yarn run clean:labextension && yarn run clean:nbextension",
43+
"build:all": "jlpm run build:labextension && jlpm run build:nbextension && jlpm run build:widget-examples",
44+
"clean": "rimraf dist && jlpm run clean:lib && jlpm run clean:labextension && jlpm run clean:nbextension",
4545
"clean:lib": "rimraf lib",
4646
"clean:labextension": "rimraf ipydatagrid/labextension",
4747
"clean:nbextension": "rimraf ipydatagrid/nbextension/index.*",
4848
"lint": "eslint 'js/**/*.{js,ts}' --quiet --fix",
49-
"prepack": "yarn run build:labextension && yarn run build:nbextension",
49+
"prepack": "jlpm run build:labextension && jlpm run build:nbextension",
5050
"test": "jest --verbose",
5151
"watch": "npm-run-all -p watch:*",
5252
"watch:lib": "tsc -w",
@@ -57,23 +57,28 @@
5757
"@jupyter-widgets/base": "^2 || ^3 || ^4 || ^6.0.0",
5858
"@jupyterlab/apputils": "^3.0.2",
5959
"@lumino/algorithm": "^1.9.0",
60+
"@lumino/application": "^1.27.0",
6061
"@lumino/commands": "^1.20.0",
6162
"@lumino/coreutils": "^1.12.0",
6263
"@lumino/datagrid": "^0.36.0",
6364
"@lumino/default-theme": "^0.19.0",
6465
"@lumino/domutils": "^1.8.0",
6566
"@lumino/messaging": "^1.9.0",
67+
"@lumino/signaling": "^1.10",
6668
"@lumino/virtualdom": "^1.13.0",
6769
"@lumino/widgets": "^1.28.0",
6870
"bqplot": "^0.5",
71+
"core-js-pure": "^3.30.2",
6972
"d3-array": "^2.2.0",
7073
"d3-color": "^3.1.0",
7174
"d3-format": "^1.3.2",
7275
"d3-scale": "^3.0.0",
7376
"d3-time-format": "^2.1.3",
7477
"jest-environment-jsdom": "^28.1.3",
7578
"moment": "^2.24.0",
79+
"underscore": "^1.13.6",
7680
"vega-expression": "^2.6.0",
81+
"vega-format": "^1.1.1",
7782
"vega-functions": "^5.3.0"
7883
},
7984
"devDependencies": {
@@ -84,6 +89,7 @@
8489
"@jupyterlab/builder": "^3.0.1",
8590
"@types/jest": "^27.4.1",
8691
"@types/node": "^10.11.6",
92+
"@types/underscore": "^1.11.4",
8793
"@types/webpack-env": "^1.13.6",
8894
"@typescript-eslint/eslint-plugin": "^3.5.0",
8995
"@typescript-eslint/parser": "^3.5.0",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ build-function = "hatch_jupyter_builder.npm_builder"
9696
path = "."
9797
build_cmd = "build"
9898
npm = [
99-
"yarn",
99+
"jlpm",
100100
]
101101

102102
[tool.isort]

test-environment-ipyw7.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies:
1313
- pandas >=1.0.0,<2.0.0
1414
- bqplot
1515
- scipy
16-
- jupyterlab
16+
- jupyterlab < 4
1717
- jupyter-packaging
1818
- pytest
1919
- nbval

test-environment-ipyw8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies:
1313
- pandas >=1.0.0,<2.0.0
1414
- bqplot
1515
- scipy
16-
- jupyterlab
16+
- jupyterlab < 4
1717
- jupyter-packaging
1818
- pytest
1919
- nbval

test-environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies:
1313
- pandas >=1.0.0,<2.0.0
1414
- bqplot
1515
- scipy
16-
- jupyterlab
16+
- jupyterlab < 4
1717
- jupyter-packaging
1818
- pytest
1919
- nbval

ui-tests-ipw7/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
"@jupyterlab/galata": "~4.5.0",
1818
"klaw-sync": "^6.0.0",
1919
"rimraf": "^3.0.2"
20+
},
21+
"devDependencies": {
22+
"@playwright/test": "^1.16.2"
2023
}
2124
}

0 commit comments

Comments
 (0)