fix(ci): upgrade npm publish jobs to Node.js LTS - #139
Conversation
Node 22.22.2 (the latest node:22 image) ships with a broken bundled npm (missing promise-retry) that causes npm install -g npm@11 to fail before publishing. Switch to lts/* so both publish-npm and canary-publish-npm always run on the latest LTS (currently Node 24), which bundles npm 11 and no longer needs the manual upgrade step.
|
Stack: npm-publishing-fixes Part of a stacked PR chain. Do not merge manually. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated GitHub Actions workflows to use Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Same broken npm issue as release.yml — node:22 resolved to 22.22.2 with a broken bundled npm. Switch to lts/* and drop the manual upgrade step, which Node 24 LTS makes unnecessary.
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "22" | ||
| node-version: "lts/*" |
There was a problem hiding this comment.
Isn't "lts/krypton" safer, since this will just resolve to whatever is the newest LTS, but eventually that will be Node 26 or whatever.
There was a problem hiding this comment.
This is just to enable the npm publish flow, so getting the latest LTS version of that should be ok I'd think!
Summary
node-versionfrom"22"to"lts/*"in bothpublish-npmandcanary-publish-npmjobsnpm install -g npm@11upgrade step (Node 24 LTS ships npm 11 already)Why
node:22resolved to Node 22.22.2, which ships with a broken bundled npm (missingpromise-retryin its internal dependency tree). This caused the upgrade step to fail before any publishing could happen. Node 24 LTS (lts/*) does not have this issue and already includes npm 11.