Skip to content

Commit 8a73fd7

Browse files
authored
[breaking] drop Node 12 support (#2604)
1 parent 0811641 commit 8a73fd7

File tree

11 files changed

+17
-14
lines changed

11 files changed

+17
-14
lines changed

Diff for: .changeset/nice-otters-boil.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@sveltejs/adapter-node': patch
3+
'create-svelte': patch
4+
'@sveltejs/kit': patch
5+
---
6+
7+
[breaking] drop Node 12 support

Diff for: .github/workflows/ci.yml

-4
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ jobs:
3838
node-version: [14]
3939
os: [ubuntu-latest, macOS-latest, windows-latest]
4040
include:
41-
- node-version: 12
42-
os: ubuntu-latest
4341
- node-version: 16
4442
os: ubuntu-latest
4543
steps:
@@ -79,8 +77,6 @@ jobs:
7977
node-version: [14]
8078
os: [ubuntu-latest, macOS-latest, windows-latest]
8179
include:
82-
- node-version: 12
83-
os: ubuntu-latest
8480
- node-version: 16
8581
os: ubuntu-latest
8682
steps:

Diff for: packages/adapter-netlify/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is very experimental; the adapter API isn't at all fleshed out, and things
88

99
> ⚠️ For the time being, the latest version of adapter-netlify is at the @next tag. If you get the error `config.kit.adapter should be an object with an "adapt" method.`, this is a sign that you are using the wrong version (eg `1.0.0-next.0` instead of `1.0.0-next.9`).
1010
11-
> ⚠️ Netlify defaults to Node 12.16. SvelteKit requires Node v12.20 to build. You can pin the Node version with a `.node-version` or [`.nvmrc`](https://github.com/nvm-sh/nvm#nvmrc) file: `echo "14" > .nvmrc` or [set the `NODE_ENV` environment variable](https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-and-javascript).
11+
> ⚠️ Netlify defaults to Node 12.16. SvelteKit requires Node v14.13 to build. You can pin the Node version with a `.node-version` or [`.nvmrc`](https://github.com/nvm-sh/nvm#nvmrc) file: `echo "14" > .nvmrc` or [set the `NODE_ENV` environment variable](https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-and-javascript).
1212
1313
```bash
1414
npm i -D @sveltejs/adapter-netlify@next

Diff for: packages/adapter-node/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ The default options for this version are as follows:
109109
external: allProductionDependencies, // from package.json
110110
format: 'esm',
111111
platform: 'node',
112-
target: 'node12',
112+
target: 'node14',
113113
inject: ['pathTo/shims.js'],
114114
define: {
115115
esbuild_app_dir: `"${config.kit.appDir}"`

Diff for: packages/adapter-node/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default function ({
6666
external: Object.keys(JSON.parse(readFileSync('package.json', 'utf8')).dependencies || {}),
6767
format: 'esm',
6868
platform: 'node',
69-
target: 'node12',
69+
target: 'node14',
7070
inject: [join(files, 'shims.js')],
7171
define: {
7272
APP_DIR: `"/${config.kit.appDir}/"`
@@ -83,7 +83,7 @@ export default function ({
8383
bundle: true,
8484
format: 'esm',
8585
platform: 'node',
86-
target: 'node12',
86+
target: 'node14',
8787
// external exclude workaround, see https://github.com/evanw/esbuild/issues/514
8888
plugins: [
8989
{

Diff for: packages/create-svelte/shared/+typescript/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"moduleResolution": "node",
44
"module": "es2020",
55
"lib": ["es2020", "DOM"],
6-
"target": "es2019",
6+
"target": "es2020",
77
/**
88
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
99
to enforce using \`import type\` instead of \`import\` for Types.

Diff for: packages/create-svelte/templates/default/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"moduleResolution": "node",
44
"module": "es2020",
55
"lib": ["es2020"],
6-
"target": "es2019",
6+
"target": "es2020",
77
/**
88
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
99
to enforce using \`import type\` instead of \`import\` for Types.

Diff for: packages/kit/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@
8686
},
8787
"types": "types/index.d.ts",
8888
"engines": {
89-
"node": "^12.20 || >=14.13"
89+
"node": ">=14.13"
9090
}
9191
}

Diff for: packages/kit/src/core/build/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ async function build_server(
460460
root: cwd,
461461
base: assets_base,
462462
build: {
463-
target: 'es2018',
463+
target: 'es2020',
464464
ssr: true,
465465
outDir: `${output_dir}/server`,
466466
polyfillDynamicImport: false,

Diff for: packages/kit/src/packaging/test/fixtures/resolve-alias/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"moduleResolution": "node",
44
"module": "es2020",
55
"lib": ["es2020", "DOM"],
6-
"target": "es2019",
6+
"target": "es2020",
77
/**
88
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
99
to enforce using \`import type\` instead of \`import\` for Types.

Diff for: packages/kit/src/packaging/test/fixtures/typescript/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"moduleResolution": "node",
44
"module": "es2020",
55
"lib": ["es2020", "DOM"],
6-
"target": "es2019",
6+
"target": "es2020",
77
/**
88
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
99
to enforce using \`import type\` instead of \`import\` for Types.

0 commit comments

Comments
 (0)