mirror of
https://github.com/iflytek/skillhub.git
synced 2026-11-16 09:21:18 +00:00
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:
parent
90c5834269
commit
737ff48b2f
3 changed files with 5 additions and 1 deletions
1
.nvmrc
Normal file
1
.nvmrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
20
|
||||
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -92,5 +92,8 @@
|
|||
"typescript": "^5.7.0",
|
||||
"vite": "^6.4.3",
|
||||
"vitest": "^4.1.11"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20 <25"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue