Skip to content

Conversation

@rhamzeh
Copy link
Member

@rhamzeh rhamzeh commented Aug 12, 2025

Description

Test on recent node versions, 22 (LTS) and 24 (current, upcoming LTS), change base build to node@24.

See: https://nodejs.org/en/about/previous-releases#release-schedule

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
    • Continuous integration now runs against a broader Node.js range (16.x–24.x), improving coverage and compatibility of builds and tests.
    • Node.js version configuration is centralized across jobs to ensure consistent environments during build, test, and publish steps.
    • No user-facing changes; these updates enhance the reliability of release pipelines without altering application behavior.

@rhamzeh rhamzeh requested a review from a team as a code owner August 12, 2025 13:02
@coderabbitai
Copy link

coderabbitai bot commented Aug 12, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Updated the GitHub Actions workflow to introduce a root-level NODE_VERSION env var, expand the Node.js version matrix to include 22.x and 24.x, and standardize setup-node steps to use the env-driven version across build, test, and publish jobs.

Changes

Cohort / File(s) Summary of changes
CI workflow updates
.github/workflows/main.yaml
Added env NODE_VERSION: '24.x'; expanded matrix to [16.x, 18.x, 20.x, 22.x, 24.x]; replaced hard-coded node-version with ${{ env.NODE_VERSION }} in setup steps across jobs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Suggested reviewers

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

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.

@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.45%. Comparing base (36269cd) to head (f6b4929).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #247   +/-   ##
=======================================
  Coverage   89.45%   89.45%           
=======================================
  Files          24       24           
  Lines        1299     1299           
  Branches      234      213   -21     
=======================================
  Hits         1162     1162           
  Misses         81       81           
  Partials       56       56           

☔ 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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2fc7d56 and d20f869.

📒 Files selected for processing (1)
  • .github/workflows/main.yaml (3 hunks)
🔇 Additional comments (2)
.github/workflows/main.yaml (2)

93-93: Publishing on 24.x: make the source of the version explicit after removing the global env.

If you remove the root-level env, this reference will break. Either hardcode the desired publish version or set a job-level env for publish.

Apply one of the following:

Option A — hardcode 24.x here:

-          node-version: ${{ env.NODE_VERSION }}
+          node-version: '24.x'

Option B — set job-level env and keep this line:

# inside `publish:` job
env:
  NODE_VERSION: '24.x'

Note: Consider publishing with the active LTS (22.x) unless you require Node 24 features. Verify your release pipeline (npm, node-gyp, optional native deps) is compatible with Node 24 before switching.


21-21: CI Matrix & Engine Check for Node 16

We’ve verified the engines.node fields in all package.json files:

  • repo root (package.json): ≥16.15.0
  • example1/package.json: ≥16.13.0
  • opentelemetry/package.json: ≥16.13.0

No .nvmrc files were found and no other workflows pin Node 16. Since your packages still support Node 16, it’s safe to keep 16.x in the CI matrix. If you’d rather drop Node 16 to reduce EOL-related flakiness, please:

  • Remove 16.x from the matrix in .github/workflows/main.yaml
  • Update all engines.node entries in your package.json files to >=18.x

@rhamzeh rhamzeh force-pushed the chore/ci-node-versions branch from d20f869 to 461c2b0 Compare August 12, 2025 13:19
@rhamzeh
Copy link
Member Author

rhamzeh commented Aug 12, 2025

Audit failure is fixed by #248

Copilot AI review requested due to automatic review settings November 5, 2025 21:34
@rhamzeh rhamzeh force-pushed the chore/ci-node-versions branch from 461c2b0 to 975a023 Compare November 5, 2025 21:34
Copy link
Contributor

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

This PR fixes a Git URL format issue in package.json and updates the GitHub Actions workflows by adding Node.js versions 22.x and 24.x to the test matrix, centralizing the target Node version configuration, and refactoring dependency auditing into a separate job.

  • Fixed incorrect Git URL format in package.json (colon to slash)
  • Updated Node.js version matrix and centralized version configuration
  • Separated npm audit into dedicated job and added fetch-depth to scorecard workflow

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
package.json Corrected Git URL format from git://github.com: to git://github.com/
.github/workflows/scorecard.yml Added fetch-depth: 0 to checkout action for complete repository history
.github/workflows/main.yaml Added Node 22.x and 24.x to test matrix, introduced TARGET_NODE_VERSION env var, moved audit to separate job, and updated version references

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

ttrzeng
ttrzeng previously approved these changes Nov 5, 2025
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.

5 participants