chore(package): pin supported Node range + CI matrix (#432) (#445)

No engines field existed anywhere, and npm install failing on Node 24 has
bitten users before (closed #11). Newer local Node has also hidden crashes
that the CI Node-20 baseline caught.

- engines: node >=20.18.0 <25.0.0, npm >=10 in root + server + client
- .nvmrc pinned to 22 (current LTS) so 'nvm use' picks a supported line
- CI now runs the test+build matrix on Node 20 and 22 (fail-fast off)

No .npmrc engine-strict, so the engines field stays advisory and does not
break installs for anyone already on a working version.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Tashfeen
2026-07-02 12:22:31 +01:00
committed by GitHub
parent 34948eece7
commit 44cd355f97
5 changed files with 22 additions and 2 deletions
+9 -2
View File
@@ -8,14 +8,21 @@ on:
jobs:
test:
name: Test & build
name: Test & build (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Both ends of the supported engines range (package.json: >=20.18 <25).
# 20 is the CI baseline that has historically caught crashes newer local
# Node versions hid; 22 is the current LTS most contributors run.
node-version: ['20', '22']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
+1
View File
@@ -0,0 +1 @@
22
+4
View File
@@ -45,5 +45,9 @@
"typescript": "~6.0.2",
"typescript-eslint": "^8.58.0",
"vite": "^8.0.4"
},
"engines": {
"node": ">=20.18.0 <25.0.0",
"npm": ">=10.0.0"
}
}
+4
View File
@@ -24,5 +24,9 @@
},
"devDependencies": {
"concurrently": "^9.1.2"
},
"engines": {
"node": ">=20.18.0 <25.0.0",
"npm": ">=10.0.0"
}
}
+4
View File
@@ -40,5 +40,9 @@
"tsx": "^4.19.4",
"typescript": "^5.8.3",
"vitest": "^3.1.3"
},
"engines": {
"node": ">=20.18.0 <25.0.0",
"npm": ">=10.0.0"
}
}