Skip to content

Commit 92e2933

Browse files
authored
feat!: Require Node.js ^20.19.0 || ^22.13.0 || >=24 (#121)
1 parent 8e8df13 commit 92e2933

File tree

3 files changed

+25
-40
lines changed

3 files changed

+25
-40
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,93 +2,78 @@ name: Build
22

33
on:
44
push:
5+
branches: [main]
56
pull_request:
7+
branches: [main]
68

79
env:
8-
PRIMARY_NODEJS_VERSION: 20
10+
PRIMARY_NODEJS_VERSION: 24.x
911

1012
jobs:
1113
lint:
1214
name: Lint
1315
runs-on: ubuntu-latest
1416
steps:
15-
- uses: actions/checkout@v4
16-
- name: Setup node ${{ env.PRIMARY_NODEJS_VERSION }}
17-
uses: actions/setup-node@v4
17+
- uses: actions/checkout@v6
18+
- name: Setup Node.js ${{ env.PRIMARY_NODEJS_VERSION }}
19+
uses: actions/setup-node@v6
1820
with:
1921
node-version: ${{ env.PRIMARY_NODEJS_VERSION }}
20-
cache: "npm"
2122
- run: npm ci
2223
- run: npm run lint
2324

2425
test-bundle:
2526
name: Test bundle
26-
runs-on: ${{ matrix.os }}
2727
strategy:
2828
matrix:
2929
os: [ubuntu-latest, windows-latest]
30+
runs-on: ${{ matrix.os }}
3031
steps:
31-
- uses: actions/checkout@v4
32-
- name: Setup node ${{ env.PRIMARY_NODEJS_VERSION }}
33-
uses: actions/setup-node@v4
32+
- uses: actions/checkout@v6
33+
- name: Setup Node.js ${{ env.PRIMARY_NODEJS_VERSION }}
34+
uses: actions/setup-node@v6
3435
with:
3536
node-version: ${{ env.PRIMARY_NODEJS_VERSION }}
36-
cache: "npm"
3737
- run: npm ci
3838
- run: npm run bundle-and-test -- -- --reporter min
3939

4040
unit-tests:
4141
name: Unit tests
42-
runs-on: ${{ matrix.os }}
43-
4442
strategy:
4543
matrix:
4644
os: [ubuntu-latest]
47-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
48-
node_version:
49-
- 10
50-
- 12.20.0
51-
- 14.13.0
52-
- 16
53-
- 18
54-
- 20
55-
- 22
56-
- 24
57-
- 25.6.1
45+
node: ["25.6.1", 24.x, 22.x, 20.x, "20.19.0"]
5846
include:
5947
- os: windows-latest
60-
node: 10
61-
- os: windows-latest
62-
node: 22
63-
48+
node: "lts/*"
49+
- os: macOS-latest
50+
node: "lts/*"
51+
runs-on: ${{ matrix.os }}
6452
steps:
65-
- uses: actions/checkout@v4
66-
- name: Setup node ${{ matrix.node_version }}
67-
uses: actions/setup-node@v4
53+
- uses: actions/checkout@v6
54+
- uses: actions/setup-node@v6
6855
with:
69-
node-version: ${{ matrix.node_version }}
70-
cache: "npm"
56+
node-version: ${{ matrix.node }}
7157
- run: npm ci
7258
- run: npm run test -- --reporter min
73-
if: ${{ matrix.node_version != '10' }}
7459
- run: npm run esm-to-cjs-and-test -- -- --reporter min
7560
- run: npm run coverage
76-
if: ${{ matrix.node_version == env.PRIMARY_NODEJS_VERSION }}
61+
if: ${{ matrix.node == env.PRIMARY_NODEJS_VERSION }}
7762
- name: Coveralls parallel
78-
if: ${{ matrix.node_version == env.PRIMARY_NODEJS_VERSION }}
63+
if: ${{ matrix.node == env.PRIMARY_NODEJS_VERSION }}
7964
uses: coverallsapp/github-action@1.1.3
8065
with:
8166
github-token: ${{ secrets.GITHUB_TOKEN }}
82-
flag-name: node-${{ matrix.node_version }}
67+
flag-name: node-${{ matrix.node }}
8368
parallel: true
8469

8570
test_types:
8671
name: Test Types
8772
runs-on: ubuntu-latest
8873
steps:
89-
- uses: actions/checkout@v4
74+
- uses: actions/checkout@v6
9075
- name: Setup Node.js
91-
uses: actions/setup-node@v4
76+
uses: actions/setup-node@v6
9277
with:
9378
node-version: "lts/*"
9479
- name: Install dependencies

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"typescript": "^5.7.3"
122122
},
123123
"engines": {
124-
"node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
124+
"node": "^20.19.0 || ^22.13.0 || >=24"
125125
},
126126
"files": [
127127
"data",

0 commit comments

Comments
 (0)