Skip to content

Commit 2d109b1

Browse files
feat: adding support for node 18, dropping node 12 (#406)
* feat: adding support for node 18, dropping node 12 * chore: bump the root lockfile * ci: installing the latest npm 8 in most environmnets * ci: install npm8 everywhere in ci * ci: debugging * fix: add --ignore-scripts to `npm ci` in github action I think we were reliant on buggy behaviour in npm@7 where `npm ci` wasn't running some of the lifecycle hooks: npm/cli#1905 (comment) This got fixed in npm@8 but now our CI process breaks: npm/cli@d825e90 Decided to follow the recommendations from husky's docs to do this so it doesnt run the `prepare` step: ```sh npm ci --ignore-scripts ``` https://github.com/typicode/husky/blob/0bcdac6b4dad6eedecc49cf3837ecc05b321db2e/docs/README.md#disable-husky-in-cidockerprod= Co-authored-by: Dom Harrington <[email protected]>
1 parent 284a420 commit 2d109b1

File tree

6 files changed

+744
-1414
lines changed

6 files changed

+744
-1414
lines changed

.github/workflows/nodejs.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,22 @@ jobs:
1414
# node 16.14.2 ships with a buggy version of npm 🤷‍♂️
1515
# https://github.com/nodejs/node/issues/42397
1616
# TODO revert this back to 16.x when node pushes a new version
17-
node-version: [12.x, 14.x, 16.14.0]
17+
node-version:
18+
- 14
19+
- 16.14.0
20+
- 18
1821

1922
steps:
2023
- uses: actions/checkout@v3
21-
2224
- uses: actions/setup-node@v3
2325
with:
2426
node-version: ${{ matrix.node-version }}
25-
26-
- name: Install npm@7
27-
run: npm install -g npm@7
28-
29-
- name: Install deps
30-
run: npm ci
3127

32-
- name: Run tests
33-
run: npm test
28+
# Node 14 still ships with npm@6 so for compatibility reasons we're upping
29+
# this to match everything else.
30+
- name: Install npm@8
31+
if: matrix.node-version == '14'
32+
run: npm install -g npm@8
3433

35-
env:
36-
CI: true
34+
- run: npm ci --ignore-scripts
35+
- run: npm test

0 commit comments

Comments
 (0)