diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 500f0b5..c392276 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -39,7 +39,7 @@ jobs: cache: yarn node-version: "lts/*" registry-url: https://registry.npmjs.org - cache-dependency-path: yarn.lock + cache-dependency-path: labextension/yarn.lock - name: Update root build packages run: | @@ -60,7 +60,7 @@ jobs: run: | mkdir jsdist cd jsdist - npm pack ../jupyter_launcher_shortcuts/labextension + npm pack ../labextension sha256sum * | tee SHA256SUMS - name: Upload Python artifact diff --git a/RELEASE.md b/RELEASE.md index 59c9aa5..3d2cc04 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -9,7 +9,7 @@ instructions on how to make a release. ## Steps to make a release -1. Create a PR updating `yarn.lock` and continue only when its merged. +1. Create a PR updating `labextension/yarn.lock` and continue only when its merged. This helps us avoid leaving known vulnerabilities are unfixed. To do this, delete the file and manually perform the the `build dist` step in the @@ -18,7 +18,7 @@ instructions on how to make a release. ```shell # git clean -xfd can be needed to ensure yarn.lock # gets re-created during pyproject-build - rm yarn.lock + rm labextension/yarn.lock pip install --upgrade pip build pyproject-build diff --git a/.yarnrc.yml b/labextension/.yarnrc.yml similarity index 100% rename from .yarnrc.yml rename to labextension/.yarnrc.yml diff --git a/install.json b/labextension/install.json similarity index 100% rename from install.json rename to labextension/install.json diff --git a/package.json b/labextension/package.json similarity index 98% rename from package.json rename to labextension/package.json index a651043..7641583 100644 --- a/package.json +++ b/labextension/package.json @@ -87,7 +87,7 @@ }, "jupyterlab": { "extension": true, - "outputDir": "jupyter_launcher_shortcuts/labextension" + "outputDir": "../jupyter_launcher_shortcuts/labextension" }, "eslintIgnore": [ "node_modules", diff --git a/src/index.ts b/labextension/src/index.ts similarity index 100% rename from src/index.ts rename to labextension/src/index.ts diff --git a/style/index.css b/labextension/style/index.css similarity index 100% rename from style/index.css rename to labextension/style/index.css diff --git a/tsconfig.json b/labextension/tsconfig.json similarity index 100% rename from tsconfig.json rename to labextension/tsconfig.json diff --git a/yarn.lock b/labextension/yarn.lock similarity index 100% rename from yarn.lock rename to labextension/yarn.lock diff --git a/pyproject.toml b/pyproject.toml index 7953e8f..bcdbb63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ exclude = [".github"] [tool.hatch.build.targets.wheel.shared-data] "jupyter_launcher_shortcuts/labextension" = "share/jupyter/labextensions/jupyter_launcher_shortcuts" -"install.json" = "share/jupyter/labextensions/jupyter_launcher_shortcuts/install.json" +"labextension/install.json" = "share/jupyter/labextensions/jupyter_launcher_shortcuts/install.json" "jupyter_launcher_shortcuts/etc/serverextension.json" = "etc/jupyter/jupyter_server_config.d/jupyter_launcher_shortcuts.json" @@ -48,6 +48,7 @@ exclude = [".github"] # [tool.hatch.metadata.hooks.nodejs] fields = ["description", "authors", "urls"] +path = "labextension/package.json" # jupyter-builder is used to ensure we build the jupyterlab extension when the @@ -62,16 +63,18 @@ ensured-targets = [ "jupyter_launcher_shortcuts/labextension/static/style.js", "jupyter_launcher_shortcuts/labextension/package.json", ] -skip-if-exists = ["jupyter_launcher_shortcuts/labextension/static/style.js"] +skip-if-exists = ["jupyter_launcher_shortcuts/labextension/package.json"] [tool.hatch.build.hooks.jupyter-builder.build-kwargs] +path = "labextension" build_cmd = "build:prod" npm = ["jlpm"] [tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs] +path = "labextension" build_cmd = "install:extension" npm = ["jlpm"] -source_dir = "src" +source_dir = "labextension/src" build_dir = "jupyter_launcher_shortcuts/labextension"