Skip to content

Commit 5c91f00

Browse files
tianzhouclaude
andcommitted
fix: pin npm@11 in publish workflow to avoid self-upgrade corruption
npm install -g npm@latest can fail when the latest version has broken internal dependencies (e.g., missing promise-retry module). Pinning to npm@11 avoids pulling broken releases while still meeting the npm 11.5+ requirement for OIDC trusted publishing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7d6d5bb commit 5c91f00

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ jobs:
5757
with:
5858
node-version: "22"
5959

60-
# Upgrade npm to latest for OIDC trusted publishing support (requires npm 11.5+)
60+
# Upgrade npm for OIDC trusted publishing support (requires npm 11.5+)
6161
- name: Upgrade npm
6262
run: |
63-
npm install -g npm@latest
63+
npm install -g npm@11
6464
echo "npm version: $(npm --version)"
6565
6666
# Install pnpm for faster and more reliable package management

0 commit comments

Comments
 (0)