ci: publish on Node 24 with a pinned npm - #227
Conversation
npm 12 requires Node ^22.22.2 || ^24.15.0 || >=26.0.0, so `npm install -g npm@latest` on Node 25 fails with EBADENGINE and the publish job dies before it can publish. Node 24 is supported by every npm 11.x and 12.x, and pinning the upgrade to ^11.5.1 (the floor for OIDC trusted publishing) stops the next npm major doing this again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoRestore npm publishing with Node 24 and constrained npm 11
AI Description
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Publishing can break again unnoticed
|
| # this Node line would silently break publishing fleet-wide again. | ||
| - name: Upgrade npm to >=11.5.1 (required for trusted publishing) | ||
| run: npm install -g npm@latest | ||
| run: npm install -g npm@^11.5.1 |
There was a problem hiding this comment.
1. Publishing can break again unnoticed 📘 Rule violation ▣ Testability
.github/workflows/npmpublish.yml replaces Node 25 and npm@latest with Node 24 and npm@^11.5.1, but the diff adds no automated test that verifies this compatible version pairing. If either selection is reverted or changed incompatibly, CI has no regression assertion before the publishing path reaches the failing npm upgrade step.
Agent Prompt
## Issue description
The publishing bug fix changes the Node and npm versions without adding an automated regression test for the compatibility requirement that previously caused the upgrade step to fail.
## Fix Focus Areas
- .github/workflows/npmpublish.yml[23-33]
## Recommended Fix
Add an automated workflow configuration test that parses the publishing workflow and asserts the supported Node 24 selection and npm 11 range. Ensure the test fails if the workflow returns to Node 25, `npm@latest`, or another known-incompatible pairing.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Publishing is broken across the whole plugin fleet and this is why.
The publish job runs
npm install -g npm@latestonnode-version: 25. npm 12 (released recently) requires Node^22.22.2 || ^24.15.0 || >=26.0.0— Node 25 is excluded — so the step fails withEBADENGINEand the job dies before publishing anything:I checked all 79 plugin repos: 78 pin Node 25 and 76 use
npm@latest, so npm 12's release broke every plugin's publish at once. (The comment in this file even said it wanted Node 20.x.)Fix
node-version: 24— an LTS line supported by every npm 11.x and 12.x.npm@^11.5.1instead of@latest— 11.5.1 is the floor for OIDC trusted publishing, and a range stops the next npm major silently breaking publishing again.This is the pilot for a fleet-wide sweep; once it's confirmed working the same change goes to the other 78.
🤖 Generated with Claude Code
https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw