From 4f4a7d2d0e9a01fdeecd0167b44101226f02e5e0 Mon Sep 17 00:00:00 2001 From: Konstantin Taletskiy Date: Tue, 23 Jan 2024 13:52:01 -0800 Subject: [PATCH 1/6] feat: replace yarn with jlpm --- {{cookiecutter.github_project_name}}/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/{{cookiecutter.github_project_name}}/package.json b/{{cookiecutter.github_project_name}}/package.json index e0053c7..228e7e2 100644 --- a/{{cookiecutter.github_project_name}}/package.json +++ b/{{cookiecutter.github_project_name}}/package.json @@ -29,19 +29,19 @@ "url": "https://github.com/{{ cookiecutter.github_organization_name }}/{{ cookiecutter.github_project_name }}" }, "scripts": { - "build": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension:dev", - "build:prod": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension", + "build": "jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension:dev", + "build:prod": "jlpm run build:lib && jlpm run build:nbextension && jlpm run build:labextension", "build:labextension": "jupyter labextension build .", "build:labextension:dev": "jupyter labextension build --development True .", "build:lib": "tsc", "build:nbextension": "webpack", - "clean": "yarn run clean:lib && yarn run clean:nbextension && yarn run clean:labextension", + "clean": "jlpm run clean:lib && jlpm run clean:nbextension && jlpm run clean:labextension", "clean:lib": "rimraf lib", "clean:labextension": "rimraf {{ cookiecutter.python_package_name }}/labextension", "clean:nbextension": "rimraf {{ cookiecutter.python_package_name }}/nbextension/static/index.js", "lint": "eslint . --ext .ts,.tsx --fix", "lint:check": "eslint . --ext .ts,.tsx", - "prepack": "yarn run build:lib", + "prepack": "jlpm run build:lib", "test": "jest", "watch": "npm-run-all -p watch:*", "watch:lib": "tsc -w", From d9d4bfcad18e45f7c04aaa8c76d4611e00bd8a61 Mon Sep 17 00:00:00 2001 From: Konstantin Taletskiy Date: Tue, 23 Jan 2024 21:05:03 -0800 Subject: [PATCH 2/6] feat: update typescript and jest --- {{cookiecutter.github_project_name}}/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.github_project_name}}/package.json b/{{cookiecutter.github_project_name}}/package.json index 228e7e2..1111fc1 100644 --- a/{{cookiecutter.github_project_name}}/package.json +++ b/{{cookiecutter.github_project_name}}/package.json @@ -58,7 +58,7 @@ "@jupyterlab/builder": "^3.0.0", "@lumino/application": "^1.6.0", "@lumino/widgets": "^1.6.0", - "@types/jest": "^26.0.0", + "@types/jest": "^29.0.0", "@types/webpack-env": "^1.13.6", "@typescript-eslint/eslint-plugin": "^3.6.0", "@typescript-eslint/parser": "^3.6.0", @@ -69,14 +69,14 @@ "eslint-plugin-prettier": "^3.1.4", "fs-extra": "^7.0.0", "identity-obj-proxy": "^3.0.0", - "jest": "^26.0.0", + "jest": "^29.0.0", "mkdirp": "^0.5.1", "npm-run-all": "^4.1.3", "prettier": "^2.0.5", "rimraf": "^2.6.2", "source-map-loader": "^1.1.3", "style-loader": "^1.0.0", - "ts-jest": "^26.0.0", + "ts-jest": "^29.0.0", "ts-loader": "^8.0.0", "typescript": "~4.1.3", "webpack": "^5.61.0", From 11b4ee695a555f2d666ae0539c2429036a56bb9a Mon Sep 17 00:00:00 2001 From: Konstantin Taletskiy Date: Tue, 23 Jan 2024 22:08:34 -0800 Subject: [PATCH 3/6] feat: update typescript, lumino and jupyterlab packages --- {{cookiecutter.github_project_name}}/package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.github_project_name}}/package.json b/{{cookiecutter.github_project_name}}/package.json index 1111fc1..f0ea62c 100644 --- a/{{cookiecutter.github_project_name}}/package.json +++ b/{{cookiecutter.github_project_name}}/package.json @@ -54,10 +54,10 @@ "devDependencies": { "@babel/core": "^7.5.0", "@babel/preset-env": "^7.5.0", - "@jupyter-widgets/base-manager": "^1.0.2", - "@jupyterlab/builder": "^3.0.0", - "@lumino/application": "^1.6.0", - "@lumino/widgets": "^1.6.0", + "@jupyter-widgets/base-manager": "^1.0.7", + "@jupyterlab/builder": "^3.6.7", + "@lumino/application": "^1.31.4", + "@lumino/widgets": "^1.37.2", "@types/jest": "^29.0.0", "@types/webpack-env": "^1.13.6", "@typescript-eslint/eslint-plugin": "^3.6.0", @@ -78,7 +78,7 @@ "style-loader": "^1.0.0", "ts-jest": "^29.0.0", "ts-loader": "^8.0.0", - "typescript": "~4.1.3", + "typescript": "~5.3.3", "webpack": "^5.61.0", "webpack-cli": "^4.0.0" }, From 42269f5307cb867e52e3657362da072cc9a39c40 Mon Sep 17 00:00:00 2001 From: Konstantin Taletskiy Date: Tue, 23 Jan 2024 22:13:22 -0800 Subject: [PATCH 4/6] docs: remove yarn references and pin jupyterlab --- {{cookiecutter.github_project_name}}/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.github_project_name}}/README.md b/{{cookiecutter.github_project_name}}/README.md index f85ca0f..8dbd685 100644 --- a/{{cookiecutter.github_project_name}}/README.md +++ b/{{cookiecutter.github_project_name}}/README.md @@ -25,7 +25,7 @@ jupyter nbextension enable --py [--sys-prefix|--user|--system] {{ cookiecutter.p Create a dev environment: ```bash -conda create -n {{ cookiecutter.python_package_name }}-dev -c conda-forge nodejs yarn python jupyterlab +conda create -n {{ cookiecutter.python_package_name }}-dev -c conda-forge nodejs python jupyterlab=3.6.7 conda activate {{ cookiecutter.python_package_name }}-dev ``` @@ -39,7 +39,7 @@ notebook / lab frontend. For lab, this is done by the command: ``` jupyter labextension develop --overwrite . -yarn run build +jlpm run build ``` For classic notebook, you need to run: @@ -61,7 +61,7 @@ terminals to watch for changes in the extension's source and automatically rebui ```bash # Watch the source directory in one terminal, automatically rebuilding when needed -yarn run watch +jlpm run watch # Run JupyterLab in another terminal jupyter lab ``` From 347dc1040538db4727908840a863240c22e74670 Mon Sep 17 00:00:00 2001 From: Konstantin Taletskiy Date: Wed, 24 Jan 2024 14:27:38 -0800 Subject: [PATCH 5/6] feat: update remaining dependencies and add comments --- .../package.json | 51 ++++++++++--------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/{{cookiecutter.github_project_name}}/package.json b/{{cookiecutter.github_project_name}}/package.json index f0ea62c..85528d3 100644 --- a/{{cookiecutter.github_project_name}}/package.json +++ b/{{cookiecutter.github_project_name}}/package.json @@ -52,35 +52,40 @@ "@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4 || ^5 || ^6" }, "devDependencies": { - "@babel/core": "^7.5.0", - "@babel/preset-env": "^7.5.0", + "@babel/core": "^7.23.7", + "@babel/preset-env": "^7.23.8", "@jupyter-widgets/base-manager": "^1.0.7", "@jupyterlab/builder": "^3.6.7", "@lumino/application": "^1.31.4", "@lumino/widgets": "^1.37.2", - "@types/jest": "^29.0.0", - "@types/webpack-env": "^1.13.6", - "@typescript-eslint/eslint-plugin": "^3.6.0", - "@typescript-eslint/parser": "^3.6.0", - "acorn": "^7.2.0", - "css-loader": "^3.2.0", - "eslint": "^7.4.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-prettier": "^3.1.4", - "fs-extra": "^7.0.0", + "@types/jest": "^29.5.11", + "@types/webpack-env": "^1.18.4", + "@typescript-eslint/eslint-plugin": "^6.19.1", + "@typescript-eslint/parser": "^6.19.1", + "acorn": "^8.11.3", + "css-loader": "^6.9.1", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "fs-extra": "^11.2.0", "identity-obj-proxy": "^3.0.0", - "jest": "^29.0.0", - "mkdirp": "^0.5.1", - "npm-run-all": "^4.1.3", - "prettier": "^2.0.5", - "rimraf": "^2.6.2", - "source-map-loader": "^1.1.3", - "style-loader": "^1.0.0", - "ts-jest": "^29.0.0", - "ts-loader": "^8.0.0", + "jest": "^29.7.0", + "mkdirp": "^3.0.1", + "npm-run-all": "^4.1.5", + "prettier": "^3.2.4", + "rimraf": "^5.0.5", + "source-map-loader": "^5.0.0", + "style-loader": "^3.3.4", + "ts-jest": "^29.1.2", + "ts-loader": "^9.5.1", "typescript": "~5.3.3", - "webpack": "^5.61.0", - "webpack-cli": "^4.0.0" + "webpack": "^5.90.0", + "webpack-cli": "^5.1.4" + }, + "devDependenciesComments": { + "@jupyterlab/builder": "pinned to the latest JupyterLab 3.x release", + "@lumino/application": "pinned to the latest Lumino 1.x release", + "@lumino/widgets": "pinned to the latest Lumino 1.x release" }, "jupyterlab": { "extension": "lib/plugin", From bd8dfd25044100ae01ddf4ecbb219bf94241f5a9 Mon Sep 17 00:00:00 2001 From: Konstantin Taletskiy Date: Mon, 29 Jan 2024 16:19:19 -0800 Subject: [PATCH 6/6] fix: javascript error for project with hyphen --- {{cookiecutter.github_project_name}}/pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.github_project_name}}/pyproject.toml b/{{cookiecutter.github_project_name}}/pyproject.toml index 906333c..7656b33 100644 --- a/{{cookiecutter.github_project_name}}/pyproject.toml +++ b/{{cookiecutter.github_project_name}}/pyproject.toml @@ -66,8 +66,8 @@ artifacts = [ [tool.hatch.build.targets.wheel.shared-data] "{{ cookiecutter.python_package_name }}/nbextension" = "share/jupyter/nbextensions/{{ cookiecutter.python_package_name }}" -"{{ cookiecutter.python_package_name }}/labextension" = "share/jupyter/labextensions/{{ cookiecutter.python_package_name }}" -"./install.json" = "share/jupyter/labextensions/{{ cookiecutter.python_package_name }}/install.json" +"{{ cookiecutter.python_package_name }}/labextension" = "share/jupyter/labextensions/{{ cookiecutter.npm_package_name }}" +"./install.json" = "share/jupyter/labextensions/{{ cookiecutter.npm_package_name }}/install.json" "./{{ cookiecutter.python_package_name }}.json" = "etc/jupyter/nbconfig/notebook.d/{{ cookiecutter.python_package_name }}.json" [tool.hatch.build.targets.sdist]