Repository navigation
Develop and test with Node.js 26 - #9059
Conversation
The Temporal bindings (#9044) need the `Temporal` global, which Node.js 22 lacks and Node.js 26 provides, so their tests and doc examples can run in CI only on Node.js 26. `.nvmrc` now names 26. The build, coverage and publish jobs read it through the setup-node action and pkg-pr-new reads it directly; the changelog check now reads it too instead of naming 22. The dev container and CONTRIBUTING.md move to 26 as well. The installation tests keep Node.js 22, the oldest version the packages support (`engines` `>=22`). build-compiler no longer runs the stdlib tests on 22, so both installation jobs now run them there. They copy the compiled tests in `tests/tests/src/stdlib` next to the installed packages, install `@babel/code-frame`, which `Test.mjs` imports, at the version `tests/tests` declares, and run `Stdlib_TestSuite.mjs` and `Stdlib_TempTests.mjs` against the runtime from pkg.pr.new. Node.js 25 stopped bundling corepack. The dev container's Node feature enables corepack where Node.js bundles it and installs yarn with npm otherwise, so `postCreate.sh` no longer runs `corepack enable`, which would fail on 26. Review: Do any tests behave differently on 26? The runtime doc examples for `RegExp.escape` and `DataView.getFloat16`/`setFloat16`, which `DocTest.res` skips below Node.js 24, now run in CI. They pass on 26.12.1, as does the rest of `make test`. Review: Do the copied stdlib tests need anything else from the repository? No. Apart from `@babel/code-frame` they import only each other, `./Test.mjs`, `@rescript/runtime/lib/es6` and Node.js built-ins. `Test.mjs` reads the `.res` source next to it only to print a failure, and the copy includes the sources. Review: Where do tests of APIs that Node.js 22 lacks go? Not into `Stdlib_TestSuite` or `Stdlib_TempTests`, which now also run on 22. Comments on the workflow step and in `Stdlib_TestSuite.res` say so. The Temporal tests will need an entry point that only `scripts/test.js` runs. Review: Does the new step work on Windows? It copies with the same Git Bash `cp` as the existing `installation_test` copy, and the tests find the runtime through `node_modules`. `Test.mjs` takes its directory from the pathname of `import.meta.url`, which starts with `/C:/` on Windows, so a failing assertion there reports a missing `.res` file instead of a code frame. The step still fails, just as the stdlib tests in the Windows build-compiler job do today. Review: Does anything else rely on corepack? No. Only `postCreate.sh` ran it; the workflows never do. Signed-off-by: mununki <woonki.moon@gmail.com>
Changelog🏠 Internal
Semantic Diff1 commit · Full page Develop and test with Node.js 268ba10b3 · mununki · Oct 26, 2026, 14:43 UTC The Temporal bindings (#9044) need the The installation tests keep Node.js 22, the oldest version the packages support ( Node.js 25 stopped bundling corepack. The dev container's Node feature enables corepack where Node.js bundles it and installs yarn with npm otherwise, so Review
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9059 +/- ##
==========================================
+ Coverage 81.39% 81.42% +0.02%
==========================================
Files 459 459
Lines 64548 64547 -1
==========================================
+ Hits 52542 52558 +16
+ Misses 12006 11989 -17 🚀 New features to boost your workflow:
|
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-9059 |
A prerequisite for the Temporal bindings proposed in #9044. As requested there, this bumps the Node.js version we develop and test with from 22 to 26, so the Temporal tests and doc examples can run in CI without being skipped. No Temporal code here.
.nvmrc: 22 → 26. The build and test matrix, coverage, publish andpkg-pr-newuse it, and the changelog check now reads it too.test-installation-npmandtest-installation-pnpmstay on Node.js 22, the oldest supported version, and now also run the compiled stdlib tests against the installed runtime. SoStdlib_TestSuiteandStdlib_TempTestsmust pass on 22; tests of newer APIs such as Temporal need a separate entry point.postCreate.shdropscorepack enable, since Node.js 25 and later don't bundle corepack.Locally,
make testpasses on Node.js 26, and the new installation steps pass on Node.js 22 with npm and pnpm. Windows, pnpm 10 and the dev container are left to CI.Checklist
changes/README.md), or no release notes are needed and a maintainer should applychangelog:skip.git commit -s).