Skip to content

fix: use Node 24 for npm 11+ (required by Trusted Publishers)#39

Merged
nicknisi merged 2 commits intomainfrom
nicknisi/fix-npm-version-for-oidc
Dec 18, 2025
Merged

fix: use Node 24 for npm 11+ (required by Trusted Publishers)#39
nicknisi merged 2 commits intomainfrom
nicknisi/fix-npm-version-for-oidc

Conversation

@nicknisi
Copy link
Member

Summary

  • Use Node.js 24 LTS instead of Node.js 22
  • Node 24 ships with npm 11.6.2, meeting the npm 11.5.1+ requirement for OIDC Trusted Publishers

Why

The previous release failed because npm 10.9.x (bundled with Node 22) doesn't support OIDC authentication for Trusted Publishers.

Node.js 24 LTS ships with npm 11.6.2, meeting the npm 11.5.1+
requirement for OIDC Trusted Publishers.
@greptile-apps
Copy link

greptile-apps bot commented Dec 18, 2025

Greptile Summary

This PR upgrades the Node.js version from 22 to 24 in the release workflow to fix a failed release. Node.js 24 includes npm 11.6.2, which meets the npm 11.5.1+ requirement for OIDC-based Trusted Publishers (introduced in PR #37).

Key Changes:

  • Changed node-version from 22 to 24 in .github/workflows/release.yml:28

Impact:

  • Enables successful npm publishing with --provenance flag using OIDC authentication
  • Node.js 24 LTS is already tested in CI workflow alongside versions 20 and 22
  • Package.json specifies node >= 20.0.0 so this change is within supported range

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Single-line change that directly addresses a concrete failure. Node 24 is LTS, already tested in CI matrix, and within package.json engine requirements. The change enables the required npm 11+ functionality for Trusted Publishers without introducing breaking changes or new features.
  • No files require special attention

Important Files Changed

Filename Overview
.github/workflows/release.yml Updated Node.js from version 22 to 24 to support npm 11+ requirement for OIDC Trusted Publishers

Sequence Diagram

sequenceDiagram
    participant Release as GitHub Release
    participant Workflow as Release Workflow
    participant Setup as Environment Setup
    participant Build as Build Process
    participant NPM as NPM Registry
    
    Release->>Workflow: Trigger (release published)
    Workflow->>Setup: Checkout code
    Setup->>Setup: Install pnpm 10
    Setup->>Setup: Setup Node 24 (npm 11.6.2)
    Setup->>Setup: Configure npm registry
    Setup->>Build: pnpm install
    Build->>Build: pnpm run build
    
    alt Regular Release
        Build->>NPM: pnpm publish --tag latest --provenance
        NPM->>NPM: Verify OIDC token (requires npm 11.5.1+)
        NPM->>NPM: Generate provenance attestation
        NPM-->>Workflow: ✓ Published with provenance
    else Pre-release
        Build->>NPM: pnpm publish --tag next --provenance
        NPM->>NPM: Verify OIDC token (requires npm 11.5.1+)
        NPM->>NPM: Generate provenance attestation
        NPM-->>Workflow: ✓ Published with provenance
    end
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@nicknisi nicknisi merged commit 7f1e93e into main Dec 18, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants