Skip to content

Commit

Permalink
Update compilation target for Node 16 (#6213)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Princesseuh authored Mar 6, 2023
1 parent 18acae3 commit afbbc4d
Show file tree
Hide file tree
Showing 29 changed files with 85 additions and 55 deletions.
30 changes: 30 additions & 0 deletions .changeset/wicked-pumpkins-punch.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"packages/astro/test/fixtures/static build/pkg"
],
"engines": {
"node": "^14.18.0 || >=16.12.0",
"node": ">=16.12.0",
"pnpm": ">=7.9.5"
},
"packageManager": "pnpm@7.12.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/astro-prism/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"target": "ES2020",
"module": "ES2020",
"target": "ES2021",
"module": "ES2022",
"outDir": "./dist"
}
}
4 changes: 2 additions & 2 deletions packages/astro-rss/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020",
"target": "ES2021",
"strictNullChecks": true
}
}
4 changes: 2 additions & 2 deletions packages/astro/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"compilerOptions": {
"allowJs": true,
"declarationDir": "./dist",
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/create-astro/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"allowJs": true,
"emitDeclarationOnly": false,
"noEmit": true,
"target": "ES2020",
"module": "ES2020",
"target": "ES2021",
"module": "ES2022",
"outDir": "./dist",
"declarationDir": "./dist/types"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/integrations/alpinejs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/cloudflare/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/deno/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/image/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"include": ["src", "types.d.ts"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020",
"target": "ES2021",
"typeRoots": ["node_modules/@types", "node_modules/@netlify"]
}
}
4 changes: 2 additions & 2 deletions packages/integrations/lit/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/mdx/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/netlify/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020",
"target": "ES2021",
"typeRoots": ["node_modules/@types", "node_modules/@netlify"]
}
}
4 changes: 2 additions & 2 deletions packages/integrations/node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/partytown/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/preact/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/prefetch/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src", "@types"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/react/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/sitemap/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/solid/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/svelte/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/tailwind/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/turbolinks/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/vercel/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/integrations/vue/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"module": "ES2020",
"module": "ES2022",
"outDir": "./dist",
"target": "ES2020"
"target": "ES2021"
}
}
4 changes: 2 additions & 2 deletions packages/markdown/remark/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"target": "ES2020",
"module": "ES2020",
"target": "ES2021",
"module": "ES2022",
"outDir": "./dist"
}
}
4 changes: 2 additions & 2 deletions packages/telemetry/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"target": "ES2020",
"module": "ES2020",
"target": "ES2021",
"module": "ES2022",
"outDir": "./dist",
"declarationDir": "./dist/types"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/webapi/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"exclude": ["node_modules"],
"compilerOptions": {
"target": "ES2021",
"module": "ES2020",
"module": "ES2022",
"moduleResolution": "node",
"esModuleInterop": true,
"declaration": true,
Expand Down
6 changes: 3 additions & 3 deletions scripts/cmd/build.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import esbuild from 'esbuild';
import svelte from '../utils/svelte-plugin.js';
import { deleteAsync } from 'del';
import esbuild from 'esbuild';
import { promises as fs } from 'fs';
import { dim, green, red, yellow } from 'kleur/colors';
import glob from 'tiny-glob';
import svelte from '../utils/svelte-plugin.js';
import prebuild from './prebuild.js';

/** @type {import('esbuild').BuildOptions} */
const defaultConfig = {
minify: false,
format: 'esm',
platform: 'node',
target: 'node14',
target: 'node16',
sourcemap: false,
sourcesContent: false,
};
Expand Down

0 comments on commit afbbc4d

Please sign in to comment.