Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yosriady
Copy link
Contributor

@yosriady yosriady commented Nov 6, 2025

Note

Updates GitHub Actions release workflow for npm trusted publishing, tweaks CI, updates Node version, and adjusts package configuration.

  • Workflows:
    • Update /.github/workflows/release.yml to use npm trusted publishing.
    • Tweak CI in /.github/workflows/ci.yml.
  • Node:
    • Update Node version in /.nvmrc.
  • Package config:
    • Adjust package.json (publishing/config/scripts).

Written by Cursor Bugbot for commit f41f0d5. This will update automatically on new commits. Configure here.

@yosriady yosriady changed the title Qa/npm fix: npm trusted publishing Nov 6, 2025
@yosriady yosriady marked this pull request as ready for review November 6, 2025 09:04
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.

Greptile Overview

Greptile Summary

This PR configures npm trusted publishing with provenance attestations for the @formo/analytics package. The changes pin Node.js to version 22.14.0 across CI and release workflows, upgrade @semantic-release/npm to v13.1.1 (which supports provenance), and add .nvmrc for version consistency.

Key changes:

  • Pinned Node.js to 22.14.0 in both workflows and new .nvmrc file
  • Upgraded @semantic-release/npm from 12.0.1 to 13.1.1 to support provenance publishing
  • Upgraded @types/node to v22.0.0 to match Node version
  • package.json already has provenance: true in publishConfig
  • Release workflow already has id-token: write permission for OIDC tokens

The configuration correctly implements npm's trusted publishing requirements: OIDC authentication via GitHub Actions, provenance flag in package.json, and a semantic-release plugin version that supports provenance.

Confidence Score: 5/5

  • This PR is safe to merge with no issues - it correctly implements npm trusted publishing
  • All changes are configuration updates that correctly implement npm trusted publishing. The Node.js version upgrade to 22.14.0 is stable, the semantic-release/npm v13.1.1 supports provenance, and all required permissions and settings are properly configured. No code logic changes or potential runtime issues.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
.github/workflows/release.yml 5/5 Updated Node.js version from "20" to "22.14.0" for npm trusted publishing support; workflow correctly configured with id-token permission
.nvmrc 5/5 New file pinning Node.js version to 22.14.0 for consistency across environments
package.json 5/5 Upgraded @semantic-release/npm to v13.1.1 (adds provenance support) and @types/node to v22.0.0; provenance: true already configured

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub Actions
    participant Node as Node.js 22.14.0
    participant SR as semantic-release
    participant NPM as npm Registry
    
    Dev->>GH: Push to main branch
    GH->>GH: Checkout code
    GH->>Node: Setup Node 22.14.0
    GH->>Node: Update npm to latest
    GH->>Node: Install dependencies (yarn)
    GH->>Node: Build SDK
    GH->>SR: Run semantic-release
    SR->>SR: Analyze commits
    SR->>SR: Generate release notes
    SR->>NPM: Publish with --provenance flag
    Note over NPM: OIDC token from id-token permission
    NPM->>NPM: Generate provenance attestation
    NPM-->>SR: Publish success
    SR->>GH: Create GitHub release
    SR->>GH: Comment on PRs
    SR-->>GH: Release complete
Loading

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@yosriady yosriady merged commit 690fee3 into main Nov 7, 2025
7 checks passed
@yosriady yosriady deleted the qa/npm branch November 7, 2025 02:26
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