fix: stop upgrading release workflows to broken npm 12#221
Merged
Conversation
npm 12.0.0 (latest since 2026-07-08) self-installs without sigstore because the tarball ships it under node_modules without declaring it in bundleDependencies, so "npm install -g npm@latest" prunes it as extraneous. Every npm publish, including --dry-run, then fails with "Cannot find module 'sigstore'" in libnpmpublish provenance loading (npm/cli#9722). This broke the MCP release validation on main and silently broke both publish paths. The upgrade step existed only because trusted publishing requires npm 11.5.1+, but the pinned .node-version (24.15.0) bundles npm 11.12.1, which already satisfies it. Remove the step from release.yml and both mcp-release.yml jobs and document why npm@latest must not be reintroduced. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
MCP Package Releasevalidation job onmainfailed with:Root cause
npm 12.0.0 (dist-tag
latestsince 2026-07-08) has a packaging bug (npm/cli#9722): its tarball shipssigstoreundernode_modules/but does not declare it in npm's owndependencies/bundleDependencies.npm install -g npm@latesttherefore prunes it as extraneous ("removed 18 packages" in the run log), and every subsequentnpm publish— including--dry-run— crashes loadinglibnpmpublish/lib/provenance.js. Reproduced locally with a temp-prefix install of npm 12.0.0.It surfaced only now because earlier runs since July 8 skipped the publish/dry-run paths (versions already published). Both
release.ymlandmcp-release.ymlpublish steps were broken; the root workflow simply hadn't been exercised.Fix
Remove the
Update npm(npm install -g npm@latest) steps fromrelease.ymland bothmcp-release.ymljobs. The step existed only because trusted publishing requires npm ≥ 11.5.1, but the pinned.node-version(24.15.0) bundles npm 11.12.1, which already satisfies it. Comments now document the requirement and warn against reintroducingnpm@latest.Verification
bun run validate:packages:mcp-publishpasses locally on bundled npm 11.12.1 (same version CI will now use;ci.ymlalready runs this path without the npm upgrade and passes).mcp-release.yml, so theMCP package validationjob runs on the PR and exercises the exactnpm publish --dry-runpath with the bundled npm.🤖 Generated with Claude Code