Skip to content

Commit a0e9458

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`. `.github/workflows/build.yml` requires changes to install latest `npm` for previous `node` LTS.
1 parent 6c5d827 commit a0e9458

1 file changed

Lines changed: 23 additions & 32 deletions

File tree

.github/workflows/build.yml

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,43 @@ env:
88
NPM_VERSION: 11
99

1010
jobs:
11-
prepare_env:
12-
name: Prepare environment
11+
build_on_node_previous_lts:
12+
name: Build distribution CSS and JS (${{ env.NODE_PREVIOUS_LTS_VERSION }})
1313
runs-on: ubuntu-24.04
14-
outputs:
15-
NODE_ACTIVE_LTS_VERSION: ${{ env.NODE_ACTIVE_LTS_VERSION }}
16-
NODE_PREVIOUS_LTS_VERSION: ${{ env.NODE_PREVIOUS_LTS_VERSION }}
17-
NPM_VERSION: ${{ env.NPM_VERSION }}
18-
steps:
19-
- name: Compute outputs
20-
run: |
21-
echo "NODE_ACTIVE_LTS_VERSION=${{ env.NODE_ACTIVE_LTS_VERSION }}" >> $GITHUB_OUTPUT
22-
echo "NODE_PREVIOUS_LTS_VERSION=${{ env.NODE_PREVIOUS_LTS_VERSION }}" >> $GITHUB_OUTPUT
23-
echo "NPM_VERSION=${{ env.NPM_VERSION }}" >> $GITHUB_OUTPUT
24-
build:
25-
name: Build distribution CSS and JS
26-
runs-on: ubuntu-24.04
27-
needs: prepare_env
28-
strategy:
29-
matrix:
30-
node:
31-
- ${{ needs.prepare_env.outputs.NODE_ACTIVE_LTS_VERSION }}
32-
- ${{ needs.prepare_env.outputs.NODE_PREVIOUS_LTS_VERSION }}
3314
steps:
3415
- name: Clone repository
3516
uses: actions/checkout@v6
3617

37-
# Perform this step for Node.js active LTS version
38-
- name: Set up Node.js ${{ matrix.node }}
18+
- name: Set up Node.js
3919
uses: actions/setup-node@v6
4020
with:
41-
node-version: ${{ matrix.node }}
21+
node-version: ${{ env.NODE_PREVIOUS_LTS_VERSION }}
4222
cache: npm
43-
if: matrix.node == env.NODE_ACTIVE_LTS_VERSION
4423

45-
# Perform this step for Node.js previous LTS version
46-
# Continue on error to avoid failing the whole job if npm version is incompatible
47-
- name: Set up Node.js ${{ matrix.node }}
24+
- name: Print Node.js and npm version
25+
run: node --version && npm --version
26+
27+
- name: Install
28+
run: npm ci
29+
30+
- name: Build
31+
run: npm run build
32+
33+
build_on_node_active_lts:
34+
name: Build distribution CSS and JS (${{ env.NODE_ACTIVE_LTS_VERSION }})
35+
runs-on: ubuntu-24.04
36+
steps:
37+
- name: Clone repository
38+
uses: actions/checkout@v6
39+
40+
- name: Set up Node.js
4841
uses: actions/setup-node@v6
4942
with:
50-
node-version: ${{ matrix.node }}
43+
node-version: ${{ env.NODE_ACTIVE_LTS_VERSION }}
5144
cache: npm
52-
if: matrix.node == env.NODE_PREVIOUS_LTS_VERSION
5345
continue-on-error: true
5446

55-
# Perform this step for Node.js previous LTS version
56-
- name: Install npm@${{ env.NPM_VERSION }} for Node.js ${{ matrix.node }}
47+
- name: Install npm@${{ env.NPM_VERSION }}
5748
run: npm install -g npm@${{ env.NPM_VERSION }}
5849

5950
- name: Print Node.js and npm version

0 commit comments

Comments
 (0)