Skip to content

Commit 0f70994

Browse files
authored
fix(ci): publish on Node 24 (#652)
Fixes #650. `npm install -g npm@latest` now resolves npm 12, which requires Node `^22.22.2 || ^24.15.0 || >=26.0.0`. The workflow pins Node 20, so the step fails before `pnpm publish` runs: ``` npm error notsup Required: {"node":"^22.22.2 || ^24.15.0 || >=26.0.0"} npm error notsup Actual: {"npm":"10.8.2","node":"v20.20.2"} ``` Every publish since 2026-07-13 failed this way (runs 296–299), so `swc_core` v73–v76 never reached npm. Node 24 bundles npm 11.17.0, already above the 11.5.1 floor trusted publishing needs, so the step is removed rather than re-pinned — that drops `npm@latest` as a recurring break. Node 20 is also deprecated on GHA runners. Not covered here: the four missed versions (`@swc/plugin-styled-jsx` 13.16.0–13.19.0 and siblings) still need publishing. Re-running the failed runs replays the Node 20 workflow, and the `publish` environment is restricted to `main`, so that needs a maintainer decision. Overlaps with #651, which fixes the same root cause via Node 22; that one keeps the `npm@latest` step and adds `NPM_TOKEN` auth, which would sidestep the OIDC trusted publishing added in #528.
1 parent 10e65ec commit 0f70994

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424

25+
# Node 24 bundles npm 11.17.0, satisfying the npm >= 11.5.1 requirement
26+
# for trusted publishing.
2527
- name: Setup node
2628
uses: actions/setup-node@v4
2729
with:
28-
node-version: 20
30+
node-version: 24
2931
registry-url: "https://registry.npmjs.org"
3032

3133
- run: |
@@ -36,9 +38,5 @@ jobs:
3638
pnpm --version
3739
pnpm i
3840
39-
# Ensure npm 11.5.1 or later is installed
40-
- name: Update npm
41-
run: npm install -g npm@latest
42-
4341
- name: Publish to npm
4442
run: pnpm publish -r --access public

0 commit comments

Comments
 (0)