Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use node 20 (LTS) & drop 14, 16 #142

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-18
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-20
18 changes: 16 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn format:check
Expand All @@ -16,7 +16,7 @@ jobs:
- run: yarn build
- run: yarn test

- name: test built package
- name: test built package on node@20
run: |
mkdir ../foo
cd ../foo
Expand All @@ -32,4 +32,18 @@ jobs:
assert.strictEqual(esbuildPluginBrowserslist().name, 'esbuild-plugin-browserslist');
assert.strictEqual(resolveToEsbuildTarget(['chrome 90'])[0], 'chrome90');
" > test.js
node -v
node test.js
# Not using a matrix here since it's simpler
# to just duplicate it and not spawn new instances
- uses: actions/setup-node@v3
with:
node-version: 18
- name: test build package on node@18
run: |
cd ../foo
node -v
node test.js
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- run: yarn install --frozen-lockfile
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"dist"
Expand All @@ -34,8 +34,8 @@
"zod": "^3.21.4"
},
"devDependencies": {
"@commitlint/cli": "^17.6.6",
"@commitlint/config-conventional": "^17.6.6",
"@commitlint/cli": "^18.0.0",
"@commitlint/config-conventional": "^18.0.0",
"@nihalgonsalves/esconfig": "^0.6.0",
"@types/debug": "^4.1.8",
"@types/node": "18",
Expand Down
Loading