Skip to content

chore: declare supported Node version (22) - #130

Open
sergiomaldo wants to merge 1 commit into
LegalQuants:mainfrom
sergiomaldo:chore/pin-node-version
Open

chore: declare supported Node version (22)#130
sergiomaldo wants to merge 1 commit into
LegalQuants:mainfrom
sergiomaldo:chore/pin-node-version

Conversation

@sergiomaldo

Copy link
Copy Markdown

The Dockerfile builds on node:22-alpine (both stages) and desktop-release.yml pins
node-version: 22, but nothing declares the supported version for local development —
there is no .nvmrc and no engines field.

On Node 25 the frontend suite fails 38 tests across 6 files, all with:

TypeError: localStorage.clear is not a function

Node 25 exposes a built-in global localStorage that shadows the jsdom one, and without
a valid --localstorage-file its clear() is undefined. The failures look like a
regression in application code; they are not. On Node 22 the same tree is fully green.

Changes

  • Add .nvmrc (22).
  • Add "engines": { "node": ">=22 <23" } to package.json.

The repo already sets engine-strict=true in .npmrc, so this surfaces at install time
with a clear message rather than later as confusing test failures. Note that makes it a
hard failure rather than a warning — that is the intent, but flagging it explicitly in
case you would prefer a wider range.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SMqm8tGT3ksTtYgqPao6kF

The Dockerfile builds on node:22-alpine and CI pins node-version: 22, but
nothing declared the supported version for local development. On Node 25
the frontend suite fails 38 tests across 6 files with

    TypeError: localStorage.clear is not a function

because Node 25 exposes a built-in global localStorage that shadows the
jsdom one, and without a valid --localstorage-file its clear() is undefined.
The failures look like a regression in application code; they are not.

Add .nvmrc and an engines field so the mismatch surfaces at install time.
The repo already sets engine-strict=true in .npmrc, so this fails fast with
a legible message instead of surfacing later as confusing test failures.
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