Repository navigation
Support Node 24 #1497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Support Node 24 #1497
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
|
|
||
| The `riverqueue` command runs River's database migrations and a throughput | ||
| benchmark, and upgrades code written for `riverqueue@0.1`. It requires | ||
| Node.js 26 or newer and mirrors the commands of River's Go CLI. | ||
| Node.js 24 or newer and mirrors the commands of River's Go CLI. | ||
|
|
||
| ```sh | ||
| npm install --save-dev @riverqueue/cli | ||
|
|
@@ -142,9 +142,9 @@ process.exitCode = await run(process.argv.slice(2), { | |
|
|
||
| ## Requirements | ||
|
|
||
| Node.js 26 or newer with native `Temporal`: `node -p "typeof Temporal"` must | ||
| print `object`. Official Node.js binaries include it; some builds compiled from | ||
| source, including some distribution and Homebrew packages, do not. | ||
|
Comment on lines
-145
to
-147
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, I think this pulled in Node 26 originally as part of my push to use the temporal stuff for non-terrible datetime handling. |
||
| Node.js 24 or newer. River automatically installs a global `Temporal` | ||
| polyfill when the runtime has no native implementation; Node.js 26 uses | ||
| native `Temporal`. | ||
|
|
||
| The CLI installs its own matching `riverqueue` and database packages. | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,15 +7,12 @@ Go and Rust implementations. Run the `pnpm` commands below from `js/`, or use | |
| River's top-level `make` targets (`make lint/js`, `make test/js`, and so on), | ||
| which delegate to `pnpm -C js`. | ||
|
|
||
| Use an official Node.js 26 build, which includes native Temporal. The | ||
| workspace's `.node-version` selects Node 26 for version managers such as fnm, | ||
| nvm (`nvm use $(cat .node-version)`), and `actions/setup-node`. Some Node.js | ||
| builds compiled from source, including some distribution and Homebrew | ||
| packages, lack Temporal, and most unit tests then fail with | ||
| `ReferenceError: Temporal is not defined`. Check before installing, then use | ||
| the pnpm version pinned by `packageManager` in `package.json`: | ||
|
|
||
| node -p "typeof Temporal" # must print "object" | ||
| Use Node.js 24 or newer. The workspace's `.node-version` selects Node 26 for | ||
| version managers such as fnm, nvm (`nvm use $(cat .node-version)`), and | ||
| `actions/setup-node`. River installs a global Temporal polyfill when the | ||
| runtime has no native implementation; the tests use the same initialization. | ||
| Use the pnpm version pinned by `packageManager` in `package.json`: | ||
|
|
||
| pnpm install | ||
|
|
||
| TypeScript 6.0 is the minimum compiler for the published declarations, which | ||
|
|
@@ -190,13 +187,15 @@ to benchmark against a disposable database: | |
|
|
||
| River's `.github/workflows/js.yaml` runs on pull requests and pushes to | ||
| `master` that change `js/`, River's migrations or SQL, or the workflow itself, | ||
| and on `js/v*` release tags. Each job installs the official Node.js build from | ||
| `js/.node-version` and fails unless `typeof Temporal` is `object`. The jobs | ||
| and on `js/v*` release tags. Each job installs an official Node.js build from | ||
| `js/.node-version` or its version matrix. The jobs | ||
| cover build, both type-check lanes, generated migrations (compared with | ||
| River's sources), API reports, TypeDoc, README snippets, the 0.1 fixture, lint, | ||
| formatting, licenses, packed archives and examples, unit tests on Node 26.0.0 | ||
| and the current Node 26 release, and integration tests on Postgres 14 | ||
| through 18. | ||
| formatting, licenses, packed archives and examples. Unit tests run on Node | ||
| 24.0.0, 26.0.0, and the current releases of both lines. Packed packages run on | ||
| Node 24 and 26, including CommonJS consumers and TypeScript consumers with | ||
| `@types/node` 24. Integration tests cover Postgres 14 through 18 on Node 26 | ||
| and Postgres 18 on Node 24. | ||
|
Comment on lines
+194
to
+198
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Excessive detail in here IMO and likely to drift, no need to mention the exact releases we run unit tests against. |
||
|
|
||
| Unit tests compare unique keys, protocol values, notification dispatch, | ||
| retry timing, cron schedules, and snooze counting with fixtures that | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |
| } | ||
| }, | ||
| "engines": { | ||
| "node": ">=26" | ||
| "node": ">=24" | ||
| }, | ||
| "files": [ | ||
| "dist", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |
| } | ||
| }, | ||
| "engines": { | ||
| "node": ">=26" | ||
| "node": ">=24" | ||
| }, | ||
| "files": [ | ||
| "dist", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we pin to specific patch releases like this or do you think we should just stick with
"24"and"26"to pull in the latest from each as we do in Go?