Skip to content

chore(ci): ensure latest npm is installed for verified publishing#319

Merged
SoulPancake merged 1 commit into
mainfrom
chore/fix-publishing
Feb 10, 2026
Merged

chore(ci): ensure latest npm is installed for verified publishing#319
SoulPancake merged 1 commit into
mainfrom
chore/fix-publishing

Conversation

@rhamzeh

@rhamzeh rhamzeh commented Feb 10, 2026

Copy link
Copy Markdown
Member

Description

What problem is being solved?

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflow to ensure the latest npm version is used during the publish process.

Copilot AI review requested due to automatic review settings February 10, 2026 14:21
@rhamzeh
rhamzeh requested a review from a team as a code owner February 10, 2026 14:21
@dosubot

dosubot Bot commented Feb 10, 2026

Copy link
Copy Markdown

Related Documentation

Checked 7 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@coderabbitai

coderabbitai Bot commented Feb 10, 2026

Copy link
Copy Markdown

Walkthrough

Added a new step to the publish job in the CI/CD workflow to install the latest npm version before executing the publish command. This ensures a recent npm is available during the publication process.

Changes

Cohort / File(s) Summary
CI/CD Workflow Configuration
.github/workflows/main.yaml
Added a step to run npm install -g npm@latest in the publish job prior to publishing to ensure the latest npm version is installed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • ewanharris
  • SoulPancake
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: adding a step to ensure the latest npm is installed in the CI workflow for publishing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/fix-publishing

Tip

We've launched Issue Planner and it is currently in beta. Please try it out and share your feedback on Discord!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/main.yaml (1)

110-110: ⚠️ Potential issue | 🟠 Major

Bug: env.NODE_VERSION is undefined — should be env.TARGET_NODE_VERSION.

The workflow defines TARGET_NODE_VERSION (line 13), but this line references NODE_VERSION, which doesn't exist. This causes the publish job to fall back to the runner's default Node.js version instead of the intended 24.x. Other jobs (test, audit) correctly use TARGET_NODE_VERSION.

Pre-existing issue, but directly relevant since this PR touches the publish job.

Proposed fix
-          node-version: ${{ env.NODE_VERSION }}
+          node-version: ${{ env.TARGET_NODE_VERSION }}
🧹 Nitpick comments (1)
.github/workflows/main.yaml (1)

147-148: Consider pinning to a major version range instead of @latest.

Using npm@latest is fine for now, but a future major-version bump could introduce breaking changes mid-release. Pinning to a major range (e.g., npm@^11) would still get you the latest compatible version while guarding against surprise breakage.

That said, the change achieves its goal and this is a common CI pattern.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.55%. Comparing base (4f924d6) to head (c754b87).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #319   +/-   ##
=======================================
  Coverage   89.55%   89.55%           
=======================================
  Files          25       25           
  Lines        1475     1475           
  Branches      254      277   +23     
=======================================
  Hits         1321     1321           
  Misses         93       93           
  Partials       61       61           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SoulPancake
SoulPancake added this pull request to the merge queue Feb 10, 2026
Merged via the queue into main with commit b74ce11 Feb 10, 2026
30 checks passed
@SoulPancake
SoulPancake deleted the chore/fix-publishing branch February 10, 2026 14:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the release publishing workflow to install the latest npm before running npm publish, aiming to support “verified/trusted” npm publishing behavior in CI.

Changes:

  • Adds a workflow step in the publish job to install npm@latest globally prior to publishing.

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

Comment thread .github/workflows/main.yaml
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.

4 participants