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:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,5 +24,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^9.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.18.0 <25.0.0",
|
||||
"npm": ">=10.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user