Skip to content

ci: publish on Node 24 with a pinned npm - #101

Merged
JohnMcLear merged 1 commit into
mainfrom
ci/fix-publish-node
Sep 21, 2026
Merged

JohnMcLear merged 1 commit into
mainfrom
ci/fix-publish-node

Conversation

@JohnMcLear

Copy link
Copy Markdown
Member

The bug

.github/workflows/npmpublish.yml ran the publish job on Node 25 and then
upgraded npm with npm install -g npm@latest. npm 12 requires
^22.22.2 || ^24.15.0 || >=26.0.0 — Node 25 is not in that range — so as soon
as npm 12 shipped, that step started dying:

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

Every plugin's publish has been failing since.

The fix

  • node-version: 25node-version: 24 — an LTS line that every npm 11.x
    and 12.x supports.
  • npm@latestnpm@^11.5.1 — 11.5.1 is the floor OIDC trusted publishing
    needs. Pinning to a range rather than @latest means the next npm major
    dropping this Node line cannot silently break publishing fleet-wide again.
  • Replaced the stale comment that still described Node 20.x.

No other change. Mirrors the merged pilot, ether/ep_align#227.

🤖 Generated with Claude Code

https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw

The publish workflow ran on Node 25 and then did
`npm install -g npm@latest`. npm 12 requires
`^22.22.2 || ^24.15.0 || >=26.0.0`, which excludes Node 25, so that
step died with EBADENGINE as soon as npm 12 shipped and the package
could no longer publish:

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

Move to Node 24 — an LTS line every npm 11.x and 12.x supports — and
pin the upgrade to `npm@^11.5.1` (the floor OIDC trusted publishing
needs) rather than `@latest`, so the next npm major dropping this Node
line cannot silently break publishing fleet-wide again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Fix npm publishing with Node 24 and pinned npm 11

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 5 minutes

Grey Divider

AI Description

• Runs npm publishing on the supported Node 24 LTS release.
• Restricts npm upgrades to version 11, preventing future engine incompatibilities.
• Restores OIDC trusted publishing after npm 12 caused EBADENGINE failures.
High-Level Assessment

Using Node 24 LTS with npm constrained to the OIDC-capable 11.x line is the safest minimal fix. An exact npm pin would improve reproducibility but omit compatible security and patch updates, while npm@latest would reintroduce the original major-version compatibility risk.

Files changed (1) +9 / -5

Bug fix (1) +9 / -5
npmpublish.ymlUse Node 24 with a bounded npm 11 upgrade +9/-5

Use Node 24 with a bounded npm 11 upgrade

• Changes the publishing runtime from unsupported Node 25 to Node 24 LTS and constrains npm installation to '^11.5.1'. Comments now document the OIDC minimum version and explain how the bounded range prevents future npm majors from breaking publishing.

.github/workflows/npmpublish.yml

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Sep 21, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Publishing can break unnoticed again 📘 Rule violation ▣ Testability
Description
.github/workflows/npmpublish.yml changes the runtime to Node 24 and replaces npm@latest with
npm@^11.5.1, but this bug-fix changeset adds or modifies no automated test. A later edit that
restores an incompatible Node and npm pairing will not be caught before the publish workflow runs
and can again prevent every plugin from publishing.
Code

.github/workflows/npmpublish.yml[33]

+        run: npm install -g npm@^11.5.1
Evidence
PR Compliance ID 565662 requires every bug fix to include a regression test in the same changeset.
The cited workflow lines contain the production fix, while the supplied PR diff contains no new or
modified automated test covering the incompatible Node and npm combination.

Rule 565662: Require regression test in same changeset for every bug fix
.github/workflows/npmpublish.yml[28-33]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The publish workflow fixes an incompatible Node and npm combination without adding an automated regression test that fails against the prior configuration.
## Fix Focus Areas
- .github/workflows/npmpublish.yml[28-33]
## Recommended Fix
Add an automated test in this changeset that parses or validates the publish workflow and rejects incompatible Node and npm combinations. Ensure it fails for Node 25 with `npm@latest`, passes for Node 24 with the bounded npm 11 range, and runs in the repository's normal continuous-integration checks.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

# 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Publishing can break unnoticed again 📘 Rule violation ▣ Testability

.github/workflows/npmpublish.yml changes the runtime to Node 24 and replaces npm@latest with
npm@^11.5.1, but this bug-fix changeset adds or modifies no automated test. A later edit that
restores an incompatible Node and npm pairing will not be caught before the publish workflow runs
and can again prevent every plugin from publishing.
Agent Prompt
## Issue description
The publish workflow fixes an incompatible Node and npm combination without adding an automated regression test that fails against the prior configuration.

## Fix Focus Areas
- .github/workflows/npmpublish.yml[28-33]

## Recommended Fix
Add an automated test in this changeset that parses or validates the publish workflow and rejects incompatible Node and npm combinations. Ensure it fails for Node 25 with `npm@latest`, passes for Node 24 with the bounded npm 11 range, and runs in the repository's normal continuous-integration checks.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@JohnMcLear
JohnMcLear merged commit c7f6140 into main Sep 21, 2026
4 checks passed
@JohnMcLear
JohnMcLear deleted the ci/fix-publish-node branch September 21, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant