Skip to content

Develop and test with Node.js 26 - #9059

Merged
mununki merged 1 commit into
masterfrom
ci-node-26
Oct 26, 2026
Merged

mununki merged 1 commit into
masterfrom
ci-node-26

Conversation

@mununki

@mununki mununki commented Oct 26, 2026

Copy link
Copy Markdown
Member

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 and pkg-pr-new use it, and the changelog check now reads it too.
  • test-installation-npm and test-installation-pnpm stay on Node.js 22, the oldest supported version, and now also run the compiled stdlib tests against the installed runtime. So Stdlib_TestSuite and Stdlib_TempTests must pass on 22; tests of newer APIs such as Temporal need a separate entry point.
  • The dev container and CONTRIBUTING.md move to 26. postCreate.sh drops corepack enable, since Node.js 25 and later don't bundle corepack.

Locally, make test passes 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

  • Added a changelog fragment (see changes/README.md), or no release notes are needed and a maintainer should apply changelog:skip.
  • Added tests for the fix or feature.
  • Signed off every commit for the DCO (git commit -s).

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>
@github-actions

Copy link
Copy Markdown

Changelog

🏠 Internal

  • Develop and test with Node.js 26, and run the stdlib tests in the installation tests on Node.js 22, the oldest supported version.

Semantic Diff

1 commit · Full page

Develop and test with Node.js 26

8ba10b3 · mununki · Oct 26, 2026, 14:43 UTC

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.
  • 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.
  • 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.
  • 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.
  • Does anything else rely on corepack? No. Only postCreate.sh ran it; the workflows never do.

@mununki

mununki commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T19:32:06.640777Z 8ba10b3 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 8ba10b3e81

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.42%. Comparing base (230405f) to head (8ba10b3).
⚠️ Report is 5 commits behind head on master.

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     

see 22 files with indirect coverage changes

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@9059

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@9059

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@9059

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@9059

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@9059

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@9059

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@9059

commit: 8ba10b3

@github-actions

Copy link
Copy Markdown

@mununki
mununki marked this pull request as ready for review October 26, 2026 23:27
@mununki
mununki merged commit 1a49d91 into master Oct 26, 2026
26 checks passed
@mununki
mununki deleted the ci-node-26 branch October 26, 2026 23:28
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