Skip to content

Commit f90afac

Browse files
tepeumutclaude
andcommitted
chore: pin npm to 11.5.1 with retry and sync lockfile
The bundled npm on Node 22 crashes mid self-upgrade (`Cannot find module 'promise-retry'`); a second run completes the install cleanly. Pin 11.5.1 (first version with OIDC Trusted Publishing) so the build is reproducible. Also regenerate package-lock.json to pick up version 0.1.1 and engines.node >=20.0.0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e2bd5fd commit f90afac

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,14 @@ jobs:
5757
# Node 22 ships with npm 10.x, which silently publishes unauthenticated
5858
# and fails with a 404 on first publish. Upgrade before `npm ci` so the
5959
# lockfile install also runs on the new npm.
60+
#
61+
# The `|| npm install -g npm@...` retry works around a known self-upgrade
62+
# bug where the bundled npm drops `promise-retry` mid-reify and crashes;
63+
# a second run completes the upgrade cleanly.
6064
- name: Upgrade npm for OIDC Trusted Publishing
61-
run: npm install -g npm@latest
65+
run: |
66+
npm install -g npm@11.5.1 || npm install -g npm@11.5.1
67+
npm --version
6268
6369
- name: Install dependencies
6470
run: npm ci

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)