Skip to content

Conversation

@alex35mil
Copy link
Member

@alex35mil alex35mil commented Jan 7, 2026

Summary by CodeRabbit

  • Chores
    • Upgraded package to version 8.0.0
    • Updated ReScript to v12
    • Updated Node.js runtime support to 24.x
    • Modernized build scripts with simplified commands
    • Updated build workflow cache and runtime configurations
    • Refactored Jest configuration for improved test setup

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Walkthrough

The pull request upgrades the project to version 8.0.0, updating Rescript to v12, Node.js runtime to 24.x, and modernizing Jest configuration by migrating from JavaScript to CommonJS format. Related package dependencies and build configuration are updated accordingly.

Changes

Cohort / File(s) Summary
CI/Workflow Configuration
.github/workflows/build.yml
Updated Node.js matrix from 18.x to 24.x; upgraded yarn cache action from v1 to v4
Release Documentation
HISTORY.md
Added version 8.0.0 release notes documenting Rescript upgrade to v12
Rescript Source Updates
benchmarks/Benchmark.res, benchmarks/ClassnamesJs.res
Added @scope("default") annotation to Benchmark.Suite's external make declaration; updated ClassnamesJs module annotation from bare @module to @module("classnames") with export label changed to "default"
Jest Configuration
jest.config.cjs, jest.config.js
Migrated Jest configuration from ES module (jest.config.js) to CommonJS format (jest.config.cjs) with testEnvironment "node", testRegex for .res.js files, and transformIgnorePatterns excluding specified packages
Package Metadata & Build Config
package.json, rescript.json
Bumped version to 8.0.0, added "type": "module", updated devDependencies including Rescript to 12.0.2, removed @rescript/core dependency, simplified build scripts, added preversion hook; replaced bs-dependencies/bs-dev-dependencies with dev-dependencies in rescript.json and removed bsc-flags RescriptCore open directive

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Version eight hops into view,
With Rescript twelve and Node fresh new,
Jest config modernized with care,
Dependencies trimmed with flair—
A major leap, through and through! 🚀

🚥 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 'Rescript 12' directly corresponds to the main change: upgrading Rescript from v11 to v12, which is reflected across multiple files including package.json, HISTORY.md, benchmarks, and configuration updates.
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 docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rescript-12

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.

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: 0

🧹 Nitpick comments (1)
.github/workflows/build.yml (1)

14-14: Consider upgrading other GitHub Actions for consistency.

While actions/cache has been upgraded to v4, other actions remain on older versions (actions/setup-node@v1, actions/checkout@v2). Consider upgrading these as well for consistency and to benefit from bug fixes and new features.

♻️ Suggested action upgrades
-      - name: Use Node.js ${{ matrix.node-version }}
-        uses: actions/setup-node@v1
+      - name: Use Node.js ${{ matrix.node-version }}
+        uses: actions/setup-node@v4
         with:
           node-version: ${{ matrix.node-version }}

-      - name: Checkout
-        uses: actions/checkout@v2
+      - name: Checkout
+        uses: actions/checkout@v4

Also applies to: 32-32

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c0fe09e and 81faaef.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (9)
  • .github/workflows/build.yml
  • HISTORY.md
  • babel.config.cjs
  • benchmarks/Benchmark.res
  • benchmarks/ClassnamesJs.res
  • jest.config.cjs
  • jest.config.js
  • package.json
  • rescript.json
💤 Files with no reviewable changes (1)
  • jest.config.js
🔇 Additional comments (12)
HISTORY.md (1)

3-5: LGTM!

The changelog entry correctly documents the ReScript v12 upgrade and follows the established format.

rescript.json (2)

14-16: LGTM! Configuration modernized for ReScript v12.

The migration from bs-dependencies to dev-dependencies aligns with ReScript v12's modernized naming conventions.


1-25: The removal of the -open RescriptCore flag is safe and compatible with your codebase.

Your project uses ReScript 12.0.2, which automatically opens RescriptCore by default. The code uses Array stdlib methods (Array.length, Array.getUnsafe) which are part of RescriptCore, and they work without requiring an explicit open statement or the bsc-flags configuration. No changes to your source files are needed.

jest.config.cjs (1)

1-5: LGTM! Jest configuration properly migrated to CommonJS format.

The use of .cjs extension is correct for CommonJS configuration when package.json specifies "type": "module". The configuration correctly:

  • Sets the test environment to Node.js
  • Targets ReScript-generated .res.js files
  • Excludes ReScript-related packages from transform ignoring
.github/workflows/build.yml (1)

14-14: No action required — Node.js 24.x is stable and appropriate for CI.

Node.js 24.x (codename "Krypton") was released on May 6, 2025, and is currently in Active LTS status as of January 2026, with support continuing through October 2026. It is the recommended stable LTS line for production and CI environments.

Likely an incorrect or invalid review comment.

benchmarks/ClassnamesJs.res (1)

1-1: Binding is correct — classnames exports a default export.

The classnames npm package (v2.5.1, used in this project) is a CommonJS module that exports a single/default export. The binding correctly references this with @module("classnames") and the default export handling.

package.json (5)

10-11: LGTM! Script simplification aligns with Rescript 12.

The removal of -with-deps flags is consistent with Rescript 12's improved dependency handling.


15-15: LGTM! Good practice to validate before versioning.

The preversion hook ensures code quality before publishing.


45-45: @rescript/core removal is safe and verified.

All verification checks confirm that removing the @rescript/core dependency is intentional and safe:

  • No code in the project imports from @rescript/core (checked 6 .res files)
  • No RescriptCore opens in the codebase
  • rescript.json contains no RescriptCore configuration or dependencies

3-4: No action needed—ES module compatibility is already properly configured.

The "type": "module" addition is compatible with your setup. ReScript is configured to output ES modules ("module": "esmodule" in rescript.json), and Jest/Babel configurations correctly use .cjs files, which remain CommonJS even when the package declares "type": "module". The transformIgnorePatterns in jest.config.cjs already handles rescript and @rescript/runtime modules appropriately.


37-43: Dependency versions verified and are compatible.

All specified versions exist on npm and are compatible with Rescript 12 and Node 24.x (Rescript 12.0.2 requires Node ≥20.11.0). No direct security vulnerabilities found for the primary packages (@babel/core 7.28.5, @babel/preset-env 7.28.5, babel-jest 30.2.0). Note that babel-jest may have transitive dependency vulnerabilities (e.g., in glob or js-yaml) which are tracked in the Jest repository and flagged by npm audit.

benchmarks/Benchmark.res (1)

11-11: LGTM! Correct binding for ES module interop.

The addition of @scope("default") aligns with the ES module changes in package.json. This ensures proper interop with the benchmark library's default export when the package is treated as an ES module.

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