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

[breaking] drop Node 12 support #2604

Merged
merged 2 commits into from
Oct 14, 2021
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
7 changes: 7 additions & 0 deletions .changeset/nice-otters-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@sveltejs/adapter-node': patch
'create-svelte': patch
'@sveltejs/kit': patch
---

[breaking] drop Node 12 support
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
node-version: [14]
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
- node-version: 12
os: ubuntu-latest
- node-version: 16
os: ubuntu-latest
steps:
Expand Down Expand Up @@ -79,8 +77,6 @@ jobs:
node-version: [14]
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
- node-version: 12
os: ubuntu-latest
- node-version: 16
os: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-netlify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is very experimental; the adapter API isn't at all fleshed out, and things

> ⚠️ 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`).

> ⚠️ 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).
> ⚠️ 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).

```bash
npm i -D @sveltejs/adapter-netlify@next
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The default options for this version are as follows:
external: allProductionDependencies, // from package.json
format: 'esm',
platform: 'node',
target: 'node12',
target: 'node14',
inject: ['pathTo/shims.js'],
define: {
esbuild_app_dir: `"${config.kit.appDir}"`
Expand Down
4 changes: 2 additions & 2 deletions packages/adapter-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function ({
external: Object.keys(JSON.parse(readFileSync('package.json', 'utf8')).dependencies || {}),
format: 'esm',
platform: 'node',
target: 'node12',
target: 'node14',
inject: [join(files, 'shims.js')],
define: {
APP_DIR: `"/${config.kit.appDir}/"`
Expand All @@ -83,7 +83,7 @@ export default function ({
bundle: true,
format: 'esm',
platform: 'node',
target: 'node12',
target: 'node14',
// external exclude workaround, see https://github.com/evanw/esbuild/issues/514
plugins: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/create-svelte/shared/+typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"moduleResolution": "node",
"module": "es2020",
"lib": ["es2020", "DOM"],
"target": "es2019",
"target": "es2020",
/**
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
to enforce using \`import type\` instead of \`import\` for Types.
Expand Down
2 changes: 1 addition & 1 deletion packages/create-svelte/templates/default/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"moduleResolution": "node",
"module": "es2020",
"lib": ["es2020"],
"target": "es2019",
"target": "es2020",
/**
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
to enforce using \`import type\` instead of \`import\` for Types.
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@
},
"types": "types/index.d.ts",
"engines": {
"node": "^12.20 || >=14.13"
"node": ">=14.13"
}
}
2 changes: 1 addition & 1 deletion packages/kit/src/core/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ async function build_server(
root: cwd,
base: assets_base,
build: {
target: 'es2018',
target: 'es2020',
ssr: true,
outDir: `${output_dir}/server`,
polyfillDynamicImport: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"moduleResolution": "node",
"module": "es2020",
"lib": ["es2020", "DOM"],
"target": "es2019",
"target": "es2020",
/**
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
to enforce using \`import type\` instead of \`import\` for Types.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"moduleResolution": "node",
"module": "es2020",
"lib": ["es2020", "DOM"],
"target": "es2019",
"target": "es2020",
/**
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
to enforce using \`import type\` instead of \`import\` for Types.
Expand Down