fix(dev): pin the web toolchain to Node 20/22

jsdom-based web unit tests silently break on Node 25 (window.localStorage
degrades to a plain object, see #991) while CI stays green on its pinned
Node 20 — a confusing failure mode for new contributors on bleeding-edge
Node. Pins the local default via .nvmrc, declares engines in
web/package.json, and spells out the supported versions in CONTRIBUTING.

Signed-off-by: zjncs <18910855655@163.com>
This commit is contained in:
zjncs 2026-10-21 13:57:18 +08:00
parent 90c5834269
commit 737ff48b2f
3 changed files with 5 additions and 1 deletions

1
.nvmrc Normal file
View file

@ -0,0 +1 @@
20

View file

@ -24,7 +24,7 @@ Prerequisites:
- Docker and Docker Compose
- Java 21
- Node.js and `pnpm`
- Node.js 20 or 22 (see `.nvmrc`; Node 25+ currently breaks jsdom-based web tests — #991) and `pnpm`
Start the local stack:

View file

@ -92,5 +92,8 @@
"typescript": "^5.7.0",
"vite": "^6.4.3",
"vitest": "^4.1.11"
},
"engines": {
"node": ">=20 <25"
}
}