fix(release): run npm publish job on Node 22 - #316
Merged
Conversation
The publish-npm job pinned Node 20 and then ran `npm install -g npm@latest`. npm@12 dropped Node 20 support (requires Node ^22.22 || ^24.15 || >=26), so the upgrade aborts with EBADENGINE before `npm publish` runs — which is why v2.3.0 built and released everywhere (GitHub artifacts, Homebrew, Scoop, Docker) but was never published to npm. `npm publish --provenance` needs a recent npm, so the fix is to run this job on Node 22.x rather than downgrade npm. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016QCuRsTPjpi6hbu9WSaE5J
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
v2.3.0release workflow failed to publish to npm. GoReleaser succeeded (GitHub artifacts, Homebrew, Scoop, Docker), but thepublish-npmjob failed at "Upgrade npm to latest version":The job pins Node 20;
npm install -g npm@latestnow resolves to npm@12, which dropped Node 20 support, so the upgrade aborts beforenpm publishruns.Fix
Run the
publish-npmjob on Node 22.x.npm publish --provenance(OIDC trusted publishing) needs a recent npm, so bumping Node is the right fix rather than pinning npm to an older version.Impact
Fixes npm publishing for all future releases. Does not by itself re-publish
v2.3.0to npm — that needs a separate remediation (re-tag or manual publish), tracked separately.🤖 Generated with Claude Code