Skip to content

Commit 5948593

Browse files
tylerwillisclaude
andcommitted
ci: pin release npm to 11.x, not @latest
npm 12 changed install-time defaults: dependency lifecycle scripts no longer run unless explicitly allowed. This tree needs esbuild's postinstall to link its platform binary, so npm@latest would have broken the first real release run. 11.x still satisfies trusted publishing (>= 11.5.1). Moving to 12 should be a deliberate migration with a committed approve-scripts allowlist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8e8Z9cZQrK2rjEmifWTF8
1 parent b07c583 commit 5948593

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ jobs:
3535
node-version: "22"
3636
registry-url: "https://registry.npmjs.org"
3737

38-
# Trusted publishing needs npm >= 11.5.1; Node 22 ships npm 10.x.
39-
- run: npm install --global npm@latest
38+
# Trusted publishing needs npm >= 11.5.1; Node 22 ships npm 10.x. Pinned to 11.x on
39+
# purpose: npm 12 changed install-time defaults so dependency lifecycle scripts no longer
40+
# run unless explicitly allowed, and this package's tree needs esbuild's postinstall to
41+
# link its platform binary. Moving to 12 is a deliberate migration (npm approve-scripts
42+
# --allow-scripts-pending, committed allowlist), not something to inherit from @latest.
43+
- run: npm install --global npm@11
4044

4145
- run: npm ci
4246

0 commit comments

Comments
 (0)