mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
Update compilation target for Node 16 (#6213)
* config(esbuild): Update esbuild target to node16 * config(package): Update root package.json node engine * config(tsconfig): Update all the tsconfigs module and targets * chore: changeset * chore: remove unneeded file
This commit is contained in:
parent
18acae3edc
commit
afbbc4d5bf
29 changed files with 85 additions and 55 deletions
30
.changeset/wicked-pumpkins-punch.md
Normal file
30
.changeset/wicked-pumpkins-punch.md
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
---
|
||||||
|
'astro': minor
|
||||||
|
'@astrojs/prism': minor
|
||||||
|
'@astrojs/rss': minor
|
||||||
|
'create-astro': minor
|
||||||
|
'@astrojs/alpinejs': minor
|
||||||
|
'@astrojs/cloudflare': minor
|
||||||
|
'@astrojs/deno': minor
|
||||||
|
'@astrojs/image': minor
|
||||||
|
'@astrojs/lit': minor
|
||||||
|
'@astrojs/mdx': minor
|
||||||
|
'@astrojs/netlify': minor
|
||||||
|
'@astrojs/node': minor
|
||||||
|
'@astrojs/partytown': minor
|
||||||
|
'@astrojs/preact': minor
|
||||||
|
'@astrojs/prefetch': minor
|
||||||
|
'@astrojs/react': minor
|
||||||
|
'@astrojs/sitemap': minor
|
||||||
|
'@astrojs/solid-js': minor
|
||||||
|
'@astrojs/svelte': minor
|
||||||
|
'@astrojs/tailwind': minor
|
||||||
|
'@astrojs/turbolinks': minor
|
||||||
|
'@astrojs/vercel': minor
|
||||||
|
'@astrojs/vue': minor
|
||||||
|
'@astrojs/markdown-remark': minor
|
||||||
|
'@astrojs/telemetry': minor
|
||||||
|
'@astrojs/webapi': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Updated compilation settings to disable downlevelling for Node 14
|
|
@ -40,7 +40,7 @@
|
||||||
"packages/astro/test/fixtures/static build/pkg"
|
"packages/astro/test/fixtures/static build/pkg"
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^14.18.0 || >=16.12.0",
|
"node": ">=16.12.0",
|
||||||
"pnpm": ">=7.9.5"
|
"pnpm": ">=7.9.5"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@7.12.2",
|
"packageManager": "pnpm@7.12.2",
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"target": "ES2020",
|
"target": "ES2021",
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist"
|
"outDir": "./dist"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020",
|
"target": "ES2021",
|
||||||
"strictNullChecks": true
|
"strictNullChecks": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"declarationDir": "./dist",
|
"declarationDir": "./dist",
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"emitDeclarationOnly": false,
|
"emitDeclarationOnly": false,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"target": "ES2020",
|
"target": "ES2021",
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"declarationDir": "./dist/types"
|
"declarationDir": "./dist/types"
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
"include": ["src", "types.d.ts"],
|
"include": ["src", "types.d.ts"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020",
|
"target": "ES2021",
|
||||||
"typeRoots": ["node_modules/@types", "node_modules/@netlify"]
|
"typeRoots": ["node_modules/@types", "node_modules/@netlify"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020",
|
"target": "ES2021",
|
||||||
"typeRoots": ["node_modules/@types", "node_modules/@netlify"]
|
"typeRoots": ["node_modules/@types", "node_modules/@netlify"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src", "@types"],
|
"include": ["src", "@types"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"target": "ES2020"
|
"target": "ES2021"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"target": "ES2020",
|
"target": "ES2021",
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist"
|
"outDir": "./dist"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"target": "ES2020",
|
"target": "ES2021",
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"declarationDir": "./dist/types"
|
"declarationDir": "./dist/types"
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"exclude": ["node_modules"],
|
"exclude": ["node_modules"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2021",
|
"target": "ES2021",
|
||||||
"module": "ES2020",
|
"module": "ES2022",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import esbuild from 'esbuild';
|
|
||||||
import svelte from '../utils/svelte-plugin.js';
|
|
||||||
import { deleteAsync } from 'del';
|
import { deleteAsync } from 'del';
|
||||||
|
import esbuild from 'esbuild';
|
||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import { dim, green, red, yellow } from 'kleur/colors';
|
import { dim, green, red, yellow } from 'kleur/colors';
|
||||||
import glob from 'tiny-glob';
|
import glob from 'tiny-glob';
|
||||||
|
import svelte from '../utils/svelte-plugin.js';
|
||||||
import prebuild from './prebuild.js';
|
import prebuild from './prebuild.js';
|
||||||
|
|
||||||
/** @type {import('esbuild').BuildOptions} */
|
/** @type {import('esbuild').BuildOptions} */
|
||||||
|
@ -11,7 +11,7 @@ const defaultConfig = {
|
||||||
minify: false,
|
minify: false,
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
platform: 'node',
|
platform: 'node',
|
||||||
target: 'node14',
|
target: 'node16',
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
sourcesContent: false,
|
sourcesContent: false,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue