Skip to content

Commit b90d4bd

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 b90d4bd

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/build.yml

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

33
on: [ pull_request ]
44

5+
env:
6+
NODE_ACTIVE_LTS_VERSION: 24
7+
NODE_PREVIOUS_LTS_VERSION: 22
8+
NPM_VERSION: 1
9+
510
jobs:
611
build:
712
name: Build distribution CSS and JS
813
runs-on: ubuntu-24.04
914
strategy:
1015
matrix:
11-
node: [ 22, 24 ]
16+
node:
17+
- ${{ env.NODE_ACTIVE_LTS_VERSION }}
18+
- ${{ env.NODE_PREVIOUS_LTS_VERSION }}
1219
steps:
1320
- name: Clone repository
1421
uses: actions/checkout@v6
1522

1623
- name: Set up Node.js ${{ matrix.node }}
17-
uses: actions/setup-node@v6
24+
uses: actions/setup-node@v4
1825
with:
1926
node-version: ${{ matrix.node }}
2027
cache: npm
21-
if: matrix.node != 22
28+
if: matrix.node != env.NODE_ACTIVE_LTS_VERSION
2229

2330
- name: Set up Node.js ${{ matrix.node }}
2431
uses: actions/setup-node@v4
2532
with:
2633
node-version: ${{ matrix.node }}
2734
cache: npm
28-
if: matrix.node == 22
35+
if: matrix.node == env.NODE_ACTIVE_LTS_VERSION
2936
continue-on-error: true
3037

3138
- name: Install npm@11 for Node.js ${{ matrix.node }}
32-
run: npm install npm@11
33-
if: matrix.node == 22
39+
run: npm install -g npm@${{ env.NPM_VERSION }}
40+
if: matrix.node == env.NODE_ACTIVE_LTS_VERSION
3441

3542
- name: Print Node.js and npm version
3643
run: node --version && npm --version

0 commit comments

Comments
 (0)