Skip to content

fix(npm): bump Node to 24 so OIDC trusted publishing works#221

Merged
tkrugg merged 1 commit into
mainfrom
fix/npm-oidc-no-registry-url
May 19, 2026
Merged

fix(npm): bump Node to 24 so OIDC trusted publishing works#221
tkrugg merged 1 commit into
mainfrom
fix/npm-oidc-no-registry-url

Conversation

@tkrugg
Copy link
Copy Markdown
Collaborator

@tkrugg tkrugg commented May 19, 2026

Summary

v1.10.3 and v1.10.4 releases failed at the npm publish step with:

npm notice publish Provenance statement published to transparency log
npm error 404 Not Found - PUT https://registry.npmjs.org/@algolia%2fcli-darwin-x64

The provenance step succeeded (uses OIDC directly), but the package upload failed despite trusted publishers being configured for all 7 packages.

Root cause: npm 10.x (shipped with Node 22) has an incomplete OIDC trusted-publishing implementation — it can sign provenance attestations using the GitHub Actions OIDC token, but doesn't fall through to OIDC for authenticating the actual package PUT. npm 11.6+ (shipped with Node 24) handles the flow end-to-end.

Reference: npm/cli#8730 (comment) — Jason3S confirms Node 22 doesn't work, Node 24 with npm 11.6.2 does.

Change

Single-line bump: node-version: "22""24".

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 19, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes registry-url from the release workflow’s actions/setup-node@v4 step to prevent setup-node from writing an .npmrc that forces broken token auth, allowing npm to fall through to OIDC trusted publishing as intended.

Changes:

  • Drop registry-url: https://registry.npmjs.org from the Node setup step so setup-node doesn’t generate an auth-bearing .npmrc that blocks OIDC publishing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

npm 10.x (Node 22) ships an OIDC trusted-publishing implementation that
signs provenance attestations but does not fall through to OIDC for the
package PUT, resulting in 404s when no token auth is configured.
npm 11.6+ (Node 24) handles the flow correctly. Reference:
npm/cli#8730 (comment)
@tkrugg tkrugg force-pushed the fix/npm-oidc-no-registry-url branch from e39a5bb to 5a7e37e Compare May 19, 2026 20:00
@tkrugg tkrugg changed the title fix(npm): drop registry-url so OIDC trusted publishing works fix(npm): bump Node to 24 so OIDC trusted publishing works May 19, 2026
@tkrugg tkrugg requested a review from Copilot May 19, 2026 20:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@tkrugg tkrugg merged commit 77f3afb into main May 19, 2026
7 checks passed
@tkrugg tkrugg deleted the fix/npm-oidc-no-registry-url branch May 19, 2026 20:08
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.

2 participants