Skip to content

Run on Node 24 LTS and current dependencies, with one Node version everywhere - #18

Merged
rvegajr merged 3 commits into
developfrom
chore/node-24
Oct 1, 2026
Merged

rvegajr merged 3 commits into
developfrom
chore/node-24

Conversation

@rvegajr

@rvegajr rvegajr commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Stacked on #17. Merge order: #15 → #16 → #17 → this.

One Node version, read everywhere

Reads it From Value
nvm (local, auto-switching on cd) .nvmrc 24
CI's required CI check .nvmrc (node-version-file) 24
Railway (Railpack) RAILPACK_NODE_VERSION variable first (currently 22 in every environment), then engines 22 until the variable changes; #19 sets it from .nvmrc
npm ci engines + .npmrc engine-strict=true refuses older Node (EBADENGINE, checked on 22)
  • test/toolchain.test.ts fails if .nvmrc and engines name different lines, if the line is odd (non-LTS), if CI stops reading .nvmrc, or if the tests themselves run on an older Node.
  • Production stays on Node 22 when this merges. railway ssh reads 22.23.2 in production, uat and development. A RAILPACK_NODE_VERSION=22 variable that Railpack reads before engines pins it (I missed that variable at first). Move Railway from railway.json to Infrastructure as Code #19 makes .railway/railway.ts set it from .nvmrc. The server now logs Node vX at boot, so railway logs shows what a deploy actually runs.
  • Reacting to what's next: a non-blocking Next Node job runs lts/* and latest. When Node 26 becomes LTS, the lts/* job tests it automatically. Moving production is then one edit to .nvmrc and engines, which the toolchain test keeps together. The required check is still named CI, matching branch protection on develop, main and staging.

Dependencies

Before After
express (+ types) 4.22 5.2
@electric-sql/pglite 0.2 0.5
typescript 5.9 6.0.3 (7.0 is out, but typescript-eslint supports <6.1)
eslint 9 10.11
@types/node 22 24
pg, typescript-eslint, tsx — latest minors
compiler target / lib ES2022 ES2024

No source changes were needed beyond the boot log. Express 5 also means a rejected async handler now reaches the error handler; under Express 4 such a request never got a response.

npm 12 (which ships with Node 24) blocks install scripts unless allowed. allowScripts permits esbuild's and fsevents', which npm 10 always ran. Older npm ignores the field, and I confirmed the lockfile installs cleanly with npm 10.

Checks (Node 24.21.0)

npm test 100/100 with 0 failures over 20 full runs, plus typecheck, lint (0 errors, the 2 existing warnings) and build.

Railway config migration

Done in #19, which is stacked on this PR.

🤖 Generated with Claude Code

rvegajr and others added 2 commits October 1, 2026 10:24
…erywhere.

.nvmrc and package.json engines name Node 24; a test keeps them and CI in
step, CI's required check reads .nvmrc, and a non-blocking job runs the
newest LTS and Current. Railway reads engines, so production moves from
22 to 24 on the next deploy. Express 5, PGlite 0.5, TypeScript 6.0,
ESLint 10, @types/node 24; npm ci refuses an older Node.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A RAILPACK_NODE_VERSION=22 variable, which Railpack reads before engines,
pins all three environments; merging this alone leaves production on 22.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@rvegajr
rvegajr changed the base branch from feat/sms-ceilings to develop October 1, 2026 19:55
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.

1 participant