Skip to content

Commit 4ce3d75

Browse files
authored
Drop support for old Nodes (#17)
Node 18 is the earliest version that we support across our ecosystem, and anything earlier is EOL, so it doesn't make sense to continue to support it. Using old Nodes is also preventing us from upgrading dependencies to address security vulnerabilities. Also update the lint-build-test GitHub workflow by running `npm ci` instead of just `npm i`. This ensures that the lockfile is not updated, which is not the case with just `npm i`.
1 parent ade673f commit 4ce3d75

File tree

4 files changed

+6277
-3886
lines changed

4 files changed

+6277
-3886
lines changed

.github/workflows/build-lint-test.yml

+42-23
Original file line numberDiff line numberDiff line change
@@ -4,67 +4,86 @@ on:
44
workflow_call:
55

66
jobs:
7+
prepare:
8+
name: Prepare
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [18.x, 20.x, 22.x]
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version-file: '.nvmrc'
19+
- name: Install dependencies
20+
run: npm ci
21+
722
build:
823
name: Build
24+
needs: prepare
925
runs-on: ubuntu-latest
1026
strategy:
1127
matrix:
12-
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
28+
node-version: [22.x]
1329
steps:
14-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
1531
- name: Use Node.js ${{ matrix.node-version }}
16-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
1733
with:
18-
node-version: ${{ matrix.node-version }}
19-
cache: 'npm'
20-
- run: npm i -g npm@6
21-
- run: npm i
34+
node-version-file: '.nvmrc'
35+
- run: npm ci
2236
- run: npm run build
2337
- name: Require clean working directory
2438
shell: bash
2539
run: |
26-
if ! git diff --exit-code -- . ':!dist/*.map'; then
40+
if ! git diff --exit-code; then
2741
echo "Working tree dirty at end of job"
2842
exit 1
2943
fi
3044
3145
lint:
3246
name: Lint
47+
needs: prepare
3348
runs-on: ubuntu-latest
3449
strategy:
3550
matrix:
36-
node-version: [12.x]
51+
node-version: [22.x]
3752
steps:
38-
- uses: actions/checkout@v3
53+
- uses: actions/checkout@v4
3954
- name: Use Node.js ${{ matrix.node-version }}
40-
uses: actions/setup-node@v3
55+
uses: actions/setup-node@v4
4156
with:
42-
node-version: ${{ matrix.node-version }}
43-
cache: 'npm'
44-
- run: npm i -g npm@6
45-
- run: npm i
57+
node-version-file: '.nvmrc'
58+
- run: npm ci
4659
- run: npm run lint
60+
- name: Require clean working directory
61+
shell: bash
62+
run: |
63+
if ! git diff --exit-code; then
64+
echo "Working tree dirty at end of job"
65+
exit 1
66+
fi
4767
4868
test:
4969
name: Test
70+
needs: prepare
5071
runs-on: ubuntu-latest
5172
strategy:
5273
matrix:
53-
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
74+
node-version: [18.x, 20.x, 22.x]
5475
steps:
55-
- uses: actions/checkout@v3
76+
- uses: actions/checkout@v4
5677
- name: Use Node.js ${{ matrix.node-version }}
57-
uses: actions/setup-node@v3
78+
uses: actions/setup-node@v4
5879
with:
59-
node-version: ${{ matrix.node-version }}
60-
cache: 'npm'
61-
- run: npm i -g npm@6
62-
- run: npm i
80+
node-version-file: '.nvmrc'
81+
- run: npm ci
6382
- run: npm run test
6483
- name: Require clean working directory
6584
shell: bash
6685
run: |
67-
if ! git diff --exit-code -- . ':!dist/*.map' ':!package-lock.json' ; then
86+
if ! git diff --exit-code; then
6887
echo "Working tree dirty at end of job"
6988
exit 1
7089
fi

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12
1+
lts/*

0 commit comments

Comments
 (0)