Skip to content

Commit 0980dd0

Browse files
Tighten engines and devEngines
`engines` requires `node` version `>=22.11.0` instead of `>=22`, while `22.11.0` is first long term support minor version of this major version. `devEngines` requires `node` version `^22.11.0 || ^24.11.0` instead of `22.x || 24.x`, while `22.11.0` and `24.11.0` are first long term support minor versions of those major versions. `devEngines` now requires `npm` version `^11.6.1` as it is first `npm` version delivered by `node` in version `24.11.0`. We require single major version of `npm` to generate `package-lock.json` of compatible structure. This would not be possible without requiring specific version of `npm`.
1 parent 32c6c9b commit 0980dd0

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,41 @@ name: Build
22

33
on: [ pull_request ]
44

5+
env:
6+
NODE_ACTIVE_LTS_VERSION: 24
7+
NODE_PREVIOUS_LTS_VERSION: 22
8+
59
jobs:
610
build:
711
name: Build distribution CSS and JS
812
runs-on: ubuntu-24.04
913
strategy:
1014
matrix:
11-
node: [ 22, 24 ]
15+
node:
16+
- $NODE_ACTIVE_LTS_VERSION
17+
- $NODE_PREVIOUS_LTS_VERSION
1218
steps:
1319
- name: Clone repository
1420
uses: actions/checkout@v6
1521

1622
- name: Set up Node.js ${{ matrix.node }}
17-
uses: actions/setup-node@v6
23+
uses: actions/setup-node@v4
1824
with:
1925
node-version: ${{ matrix.node }}
2026
cache: npm
21-
if: matrix.node != 22
27+
if: matrix.node != $NODE_ACTIVE_LTS_VERSION
2228

2329
- name: Set up Node.js ${{ matrix.node }}
2430
uses: actions/setup-node@v4
2531
with:
2632
node-version: ${{ matrix.node }}
2733
cache: npm
28-
if: matrix.node == 22
34+
if: matrix.node == $NODE_PREVIOUS_LTS_VERSION
2935
continue-on-error: true
3036

3137
- name: Install npm@11 for Node.js ${{ matrix.node }}
32-
run: npm install npm@11
33-
if: matrix.node == 22
38+
run: npm install -g npm@11
39+
if: matrix.node == $NODE_PREVIOUS_LTS_VERSION
3440

3541
- name: Print Node.js and npm version
3642
run: node --version && npm --version

0 commit comments

Comments
 (0)