Publish on a Node that npm supports - #216
Merged
Merged
Conversation
npx -y npm@latest now resolves npm 12, which requires Node ^22.22.2 || ^24.15.0 || >=26. This job pins Node 20, so npm refuses to run, the trusted-publishing OIDC exchange never happens, and publish fails with ENEEDAUTH. Nothing here changed: 3.28.0 published because npm@latest still supported Node 20 at the time. npm moved, and the next release on this branch would fail. The v4 branch hit exactly this while publishing 4.0.0-alpha.1. Only the Node version moves. This branch's package.json still carries "prepack": "yarn build", so npm publish continues to build on its way out, and the yarn install path is untouched.
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.
npx -y npm@latestnow resolves npm 12, which requires Node^22.22.2 || ^24.15.0 || >=26. This job pins Node 20, so npm refuses to run, the trusted-publishing OIDC exchange never happens, and publish fails:Nothing in this repo changed. 3.28.0 published fine because npm@latest still supported Node 20 then. npm moved, and the next v3 release would fail this way. We hit it for real on the
v4branch while publishing4.0.0-alpha.1— same workflow, same pairing — which is how it surfaced.Scope
Only the Node version moves. This branch's
package.jsonstill carries"prepack": "yarn build", sonpm publishkeeps building on its way out, and the yarn install path is untouched. (The v4 branch additionally needed an explicit build step, because the v4 generator emits noprepack— not applicable here.)Worth considering separately
npx -y npm@latesttracks whatever npm ships. Pinning a known-good npm would stop a future npm major breaking publishing again, but that's a deliberate choice rather than part of this fix.