Skip to content

Commit 9021334

Browse files
chore: use node 20 (LTS) & drop 14, 16 (#142)
Node 20 enters LTS tomorrow - build and test on it as the main version. Node 14 and 16 are both EoL already, drop support for them BREAKING CHANGE: Drops support for EoL Node 14 and 16
1 parent db82caa commit 9021334

File tree

5 files changed

+1081
-1009
lines changed

5 files changed

+1081
-1009
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-18
1+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-20

.github/workflows/build.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
- uses: actions/checkout@v3
88
- uses: actions/setup-node@v3
99
with:
10-
node-version: 18
10+
node-version: 20
1111
cache: yarn
1212
- run: yarn install --frozen-lockfile
1313
- run: yarn format:check
@@ -16,7 +16,7 @@ jobs:
1616
- run: yarn build
1717
- run: yarn test
1818

19-
- name: test built package
19+
- name: test built package on node@20
2020
run: |
2121
mkdir ../foo
2222
cd ../foo
@@ -32,4 +32,18 @@ jobs:
3232
assert.strictEqual(esbuildPluginBrowserslist().name, 'esbuild-plugin-browserslist');
3333
assert.strictEqual(resolveToEsbuildTarget(['chrome 90'])[0], 'chrome90');
3434
" > test.js
35+
36+
node -v
37+
node test.js
38+
39+
# Not using a matrix here since it's simpler
40+
# to just duplicate it and not spawn new instances
41+
- uses: actions/setup-node@v3
42+
with:
43+
node-version: 18
44+
- name: test build package on node@18
45+
run: |
46+
cd ../foo
47+
48+
node -v
3549
node test.js

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
fetch-depth: 0
4646
- uses: actions/setup-node@v3
4747
with:
48-
node-version: 18
48+
node-version: 20
4949
registry-url: 'https://registry.npmjs.org'
5050
cache: 'yarn'
5151
- run: yarn install --frozen-lockfile

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"main": "./dist/index.js",
1212
"types": "./dist/index.d.ts",
1313
"engines": {
14-
"node": ">=14"
14+
"node": ">=18"
1515
},
1616
"files": [
1717
"dist"
@@ -34,8 +34,8 @@
3434
"zod": "^3.21.4"
3535
},
3636
"devDependencies": {
37-
"@commitlint/cli": "^17.6.6",
38-
"@commitlint/config-conventional": "^17.6.6",
37+
"@commitlint/cli": "^18.0.0",
38+
"@commitlint/config-conventional": "^18.0.0",
3939
"@nihalgonsalves/esconfig": "^0.6.0",
4040
"@types/debug": "^4.1.8",
4141
"@types/node": "18",

0 commit comments

Comments
 (0)