Skip to content

ci(release): pin npm and raise .nvmrc so trusted publishing installs - #25

Merged
pbennett merged 1 commit into
mainfrom
ci/fix-release-npm-engine
Aug 28, 2026
Merged

ci(release): pin npm and raise .nvmrc so trusted publishing installs#25
pbennett merged 1 commit into
mainfrom
ci/fix-release-npm-engine

Conversation

@pbennett

Copy link
Copy Markdown
Contributor

The 2.0.0 release failed before semantic-release ran (run 33133278023). Nothing was published — npm is still on 1.1.0 and there is no v2.0.0 tag.

What broke

release.yml installs a floating npm@latest. npm 12.0.2 raised its Node floor above the 22.14.0 pinned in .nvmrc:

npm error code EBADENGINE
npm error Not compatible with your version of node/npm: npm@12.0.2
npm error notsup Required: {"node":"^22.22.2 || ^24.15.0 || >=26.0.0"}
npm error notsup Actual:   {"npm":"10.9.2","node":"v22.14.0"}

Pre-existing rot rather than a regression from #24 — it would have fired on the next release regardless of what was in it.

The fix

The step cannot simply be dropped: Node 22 bundles npm 10.9.x, which predates OIDC trusted publishing, so @semantic-release/npm would have no way to authenticate.

  • Pin the npm major (npm@^11.5.1) instead of tracking latest, so a future npm floor bump cannot break a release.
  • Raise .nvmrc to 22.23.2, the current Node 22 LTS — same major line, and it also picks up 18 months of security patches. CI and contributor environments read the same file, so nvm install may be needed locally.

Also adds the failure to PUBLISHING.md's troubleshooting section and corrects the Node version in CLAUDE.md.

After merge

This is a ci: commit, so it produces no bump of its own. Merging it pushes to main, which triggers release.yml, which will then see the feat/fix commits already on main from #24 and publish 2.0.0.

The 2.0.0 release failed before semantic-release ran. The "Update npm to
latest" step installs a floating npm@latest, and npm 12.0.2 raised its Node
floor to ^22.22.2 || ^24.15.0 || >=26.0.0, above the 22.14.0 pinned in
.nvmrc:

  npm error code EBADENGINE
  npm error Not compatible with your version of node/npm: npm@12.0.2
  npm error notsup Actual: {"npm":"10.9.2","node":"v22.14.0"}

The step cannot just be removed. Node 22 bundles npm 10.9.x, which predates
OIDC trusted publishing, so without it @semantic-release/npm has no way to
authenticate.

Pins the npm major instead of tracking latest, so the next time npm raises
its floor it cannot break a release, and moves .nvmrc to 22.23.2 — the
current Node 22 LTS, same major line.

Nothing was published by the failed run: npm is still on 1.1.0 and no v2.0.0
tag exists.
@pbennett
pbennett merged commit e6a7107 into main Aug 28, 2026
1 check passed
@pbennett
pbennett deleted the ci/fix-release-npm-engine branch August 28, 2026 01:45
@txnlab-release-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant