From a5e418d87116c6af7ead487daec98f8745564bb8 Mon Sep 17 00:00:00 2001 From: Maarten Breddels Date: Tue, 6 Oct 2026 10:41:32 +0200 Subject: [PATCH] ci: skip the npm dry run when the version is already on npm The release-dry-run job failed on every PR with "You cannot publish over the previously published versions". npm 11 (node 24) checks the registry in a dry run, and between releases js/package.json holds the last released version. ipyvue's dry run still passes because it uses node 20 (npm 10). The job now skips the dry run, with a log line, when that version is already on npm. After the version bump, the dry run checks the package as before. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c564bef..7a7517ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -134,6 +134,13 @@ jobs: - name: Publish the NPM package run: | cd js + # npm 11 refuses a dry run for a version that is already on npm, and between + # releases package.json holds the last released version: nothing to check then + VERSION=$(tar -xOzf *.tgz package/package.json | node -p "JSON.parse(require('fs').readFileSync(0, 'utf8')).version") + if npm view "jupyter-vuetify@$VERSION" version > /dev/null 2>&1; then + echo "jupyter-vuetify $VERSION is already on npm, so the dry run is skipped until the version bump" + exit 0 + fi echo $PRE_RELEASE if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi npm publish --dry-run --tag ${TAG} --access public *.tgz