Skip to content

Commit 32b824b

Browse files
committed
minor #11 [CI] Test the suite against Node.js 22, 24 and 26 (Kocal)
This PR was merged into the main branch. Discussion ---------- [CI] Test the suite against Node.js 22, 24 and 26 | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT The `test` job used to run on a single Node version pinned by `.nvmrc` (Node 22). This PR adds a version matrix instead, testing Node 22, 24 and 26 across the three OSes we already cover (ubuntu, windows, macos), with readable job names like "Node 24 on ubuntu-latest". The `lint` job keeps using `.nvmrc`, no need to matrix that one. - CI now runs the test suite on Node 22 x 24 x 26 x {ubuntu, windows, macos}. - `engines.node` in both the root `package.json` and `assets/package.json` (the published ``@symfony`/reprise`) now declares the same support, using the enumerated form Webpack Encore uses: `^22.18.0 || ^24.11.0 || >=26.0`. This is stricter than the previous `>=22.18` on the published package since it excludes the odd, non-LTS majors (23, 25). The root `package.json` had no `engines` field at all before. This mirrors how `symfony/webpack-encore` declares and tests its supported Node versions. Ran the suite locally on Node 22.18.0 (the floor of the range) and it passes. Commits ------- a80e43e [CI] Test the suite against Node.js 22, 24 and 26
2 parents 0fe1df4 + a80e43e commit 32b824b

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,15 @@ jobs:
4040
run: pnpm run fmt:check
4141

4242
test:
43+
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
4344
runs-on: ${{ matrix.os }}
4445
permissions:
4546
contents: read
4647
strategy:
4748
fail-fast: false
4849
matrix:
4950
os: [ubuntu-latest, windows-latest, macos-latest]
51+
node-version: ['22', '24', '26']
5052
steps:
5153
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
5254
with:
@@ -55,7 +57,7 @@ jobs:
5557
- name: Set node
5658
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
5759
with:
58-
node-version-file: .nvmrc
60+
node-version: ${{ matrix.node-version }}
5961
cache: pnpm
6062
cache-dependency-path: pnpm-lock.yaml
6163
- name: Install

assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"dist"
4848
],
4949
"engines": {
50-
"node": ">=22.18"
50+
"node": "^22.18.0 || ^24.11.0 || >=26.0"
5151
},
5252
"scripts": {
5353
"build": "tsdown",

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"type": "module",
44
"private": true,
55
"packageManager": "pnpm@11.10.0+sha512.0b7f8b98060031904c017e3a41eb187a16d40eeb829b95c4f8cb03681761fc4ab53dd219115b9b447f4dce1a05a214764461e7d3703392a9f32f9511ce8c86c8",
6+
"engines": {
7+
"node": "^22.18.0 || ^24.11.0 || >=26.0"
8+
},
69
"scripts": {
710
"build": "pnpm -C assets run build",
811
"dev": "pnpm -C assets run dev",

0 commit comments

Comments
 (0)