Skip to content

Commit

Permalink
[breaking] drop Node 14 support (#4922)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored May 14, 2022
1 parent fb407a2 commit 3d34924
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .changeset/lemon-oranges-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@sveltejs/adapter-vercel': patch
'@sveltejs/kit': patch
---

[breaking] drop Node 14 support
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: pnpm/[email protected]
- uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version: '16.x'
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm turbo run lint check
Expand All @@ -28,11 +28,9 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [14]
node-version: [16]
os: [ubuntu-latest, macOS-latest, windows-2019]
include:
- node-version: 16
os: ubuntu-latest
- node-version: 18
os: ubuntu-latest
env:
Expand Down
4 changes: 2 additions & 2 deletions packages/adapter-vercel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ function get_node_version() {
const full = process.version.slice(1); // 'v16.5.0' --> '16.5.0'
const major = parseInt(full.split('.')[0]); // '16.5.0' --> 16

if (major < 14) {
throw new Error(`SvelteKit only support Node.js version 14 or greater (currently using v${full}). Consult the documentation: https://vercel.com/docs/runtimes#official-runtimes/node-js/node-js-version`)
if (major < 16) {
throw new Error(`SvelteKit only supports Node.js version 16 or greater (currently using v${full}). Consult the documentation: https://vercel.com/docs/runtimes#official-runtimes/node-js/node-js-version`)
}

return { major, full };
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@
},
"types": "types/index.d.ts",
"engines": {
"node": ">=14.13"
"node": ">=16"
}
}

0 comments on commit 3d34924

Please sign in to comment.