diff --git a/.changeset/neat-rabbits-live.md b/.changeset/neat-rabbits-live.md new file mode 100644 index 000000000..b5e38e449 --- /dev/null +++ b/.changeset/neat-rabbits-live.md @@ -0,0 +1,23 @@ +--- +"@vercel/build-utils": major +"vercel": major +"@vercel/client": major +"@vercel/edge": major +"@vercel/error-utils": major +"@vercel/frameworks": major +"@vercel/fs-detectors": major +"@vercel/gatsby-plugin-vercel-builder": major +"@vercel/go": major +"@vercel/hydrogen": major +"@vercel/next": major +"@vercel/node": major +"@vercel/python": major +"@vercel/redwood": major +"@vercel/remix-builder": major +"@vercel/routing-utils": major +"@vercel/ruby": major +"@vercel/static-build": major +"@vercel/static-config": major +--- + +BREAKING CHANGE: Drop Node.js 14, bump minimum to Node.js 16 diff --git a/api/tsconfig.json b/api/tsconfig.json index aa2b08257..a6316fa21 100644 --- a/api/tsconfig.json +++ b/api/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ES2021", "skipLibCheck": true, "strict": false, "forceConsistentCasingInFileNames": true, diff --git a/examples/hydrogen/tsconfig.json b/examples/hydrogen/tsconfig.json index 55ab1a6d1..86cbdbd41 100644 --- a/examples/hydrogen/tsconfig.json +++ b/examples/hydrogen/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { - "target": "es2020", + "target": "es2021", "module": "esnext", "moduleResolution": "node16", - "lib": ["dom", "dom.iterable", "scripthost", "es2020"], + "lib": ["dom", "dom.iterable", "scripthost", "es2021"], "jsx": "react-jsx", "types": ["vite/client", "vitest/globals"], "strict": true, diff --git a/internals/tsconfig/tsconfig.json b/internals/tsconfig/tsconfig.json index 175bb8989..3a39c98b7 100644 --- a/internals/tsconfig/tsconfig.json +++ b/internals/tsconfig/tsconfig.json @@ -4,9 +4,9 @@ "declaration": true, "allowJs": true, "moduleResolution": "node", - "target": "ES2020", + "target": "ES2021", "module": "commonjs", - "lib": ["ES2020"], + "lib": ["ES2021"], "resolveJsonModule": true, "sourceMap": true } diff --git a/packages/build-utils/tsconfig.json b/packages/build-utils/tsconfig.json index 78e5da5b9..dd0888d73 100644 --- a/packages/build-utils/tsconfig.json +++ b/packages/build-utils/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -13,7 +13,7 @@ "outDir": "./dist", "types": ["node", "jest"], "strict": true, - "target": "ES2020" + "target": "ES2021" }, "include": ["src/**/*"], "exclude": ["node_modules"] diff --git a/packages/cli/package.json b/packages/cli/package.json index 35d16ff41..d83346ec7 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -28,7 +28,7 @@ "scripts/preinstall.js" ], "engines": { - "node": ">= 14" + "node": ">= 16" }, "dependencies": { "@vercel/build-utils": "6.8.3", diff --git a/packages/cli/src/util/dev/router.ts b/packages/cli/src/util/dev/router.ts index 3e54ad60d..ec88d7d03 100644 --- a/packages/cli/src/util/dev/router.ts +++ b/packages/cli/src/util/dev/router.ts @@ -58,7 +58,7 @@ export async function devRouter( ): Promise { let result: RouteResult | undefined; let { pathname: reqPathname, search: reqSearch } = url.parse(reqUrl); - reqPathname ??= '/'; + reqPathname = reqPathname || '/'; const reqQuery = parseQueryString(reqSearch); const combinedHeaders: HttpHeadersConfig = { ...previousHeaders }; let status: number | undefined; @@ -132,7 +132,7 @@ export async function devRouter( !isDestUrl ) { let { pathname } = url.parse(destPath); - pathname ??= '/'; + pathname = pathname || '/'; const hasDestFile = await devServer.hasFilesystem( pathname, vercelConfig @@ -190,7 +190,7 @@ export async function devRouter( } let { pathname: destPathname, search: destSearch } = url.parse(destPath); - destPathname ??= '/'; + destPathname = destPathname || '/'; const destQuery = parseQueryString(destSearch); Object.assign(destQuery, reqQuery); result = { diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index 8ada4cc30..656837f7e 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -5,10 +5,10 @@ "noFallthroughCasesInSwitch": true, "moduleResolution": "node", "module": "commonjs", - "target": "ES2020", + "target": "ES2021", "esModuleInterop": true, "allowJs": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "resolveJsonModule": true, "sourceMap": true, "outDir": "./dist", diff --git a/packages/client/package.json b/packages/client/package.json index 149617cc7..7e4d19033 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -20,7 +20,7 @@ "test-unit": "pnpm test tests/unit.*test.*" }, "engines": { - "node": ">= 14" + "node": ">= 16" }, "devDependencies": { "@types/async-retry": "1.4.5", diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index f499ae0c3..78d49a1da 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "outDir": "dist", @@ -12,7 +12,7 @@ "noUnusedLocals": true, "noUnusedParameters": true, "strict": true, - "target": "ES2020", + "target": "ES2021", "skipLibCheck": true }, "include": ["./src"] diff --git a/packages/edge/tsconfig.json b/packages/edge/tsconfig.json index c3dd05f84..48579a10c 100644 --- a/packages/edge/tsconfig.json +++ b/packages/edge/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "target": "ES2020", + "lib": ["ES2021", "DOM", "DOM.Iterable"], + "target": "ES2021", "module": "commonjs", "outDir": "dist", "sourceMap": false, diff --git a/packages/error-utils/tsconfig.json b/packages/error-utils/tsconfig.json index 0bcef8dfb..b1e4285f0 100644 --- a/packages/error-utils/tsconfig.json +++ b/packages/error-utils/tsconfig.json @@ -3,7 +3,7 @@ "declaration": true, "declarationMap": true, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -15,7 +15,7 @@ "types": ["node", "jest"], "strict": true, "sourceMap": true, - "target": "ES2020" + "target": "ES2021" }, "include": ["src/**/*"], "exclude": ["node_modules"] diff --git a/packages/frameworks/tsconfig.json b/packages/frameworks/tsconfig.json index f9dcb8f8d..fcbcf8d4d 100644 --- a/packages/frameworks/tsconfig.json +++ b/packages/frameworks/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -13,7 +13,7 @@ "outDir": "./dist", "types": ["node", "jest"], "strict": true, - "target": "ES2020" + "target": "ES2021" }, "include": ["src/*.ts"], "exclude": ["node_modules"] diff --git a/packages/fs-detectors/tsconfig.json b/packages/fs-detectors/tsconfig.json index 3ee8aafcb..3cfaed4a3 100644 --- a/packages/fs-detectors/tsconfig.json +++ b/packages/fs-detectors/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -13,7 +13,7 @@ "outDir": "dist", "types": ["node", "jest"], "strict": true, - "target": "ES2020", + "target": "ES2021", "sourceMap": true }, "include": ["src/**/*"], diff --git a/packages/gatsby-plugin-vercel-builder/tsconfig.base.json b/packages/gatsby-plugin-vercel-builder/tsconfig.base.json index 99b5bbf6c..ddf7cff14 100644 --- a/packages/gatsby-plugin-vercel-builder/tsconfig.base.json +++ b/packages/gatsby-plugin-vercel-builder/tsconfig.base.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "es2020" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + "target": "ES2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ diff --git a/packages/go/tsconfig.json b/packages/go/tsconfig.json index 9d0bd4bdf..7f7d12334 100644 --- a/packages/go/tsconfig.json +++ b/packages/go/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": false, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -13,6 +13,6 @@ "noImplicitThis": false, "types": ["node", "jest"], "strict": true, - "target": "ES2020" + "target": "ES2021" } } diff --git a/packages/hydrogen/tsconfig.json b/packages/hydrogen/tsconfig.json index c3de57e2b..5f59792c8 100644 --- a/packages/hydrogen/tsconfig.json +++ b/packages/hydrogen/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -13,7 +13,7 @@ "outDir": "./dist", "types": ["node", "jest"], "strict": true, - "target": "ES2020", + "target": "ES2021", "sourceMap": true }, "include": ["src/**/*"], diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json index 62985a54a..568877e5b 100644 --- a/packages/next/tsconfig.json +++ b/packages/next/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": ["ES2020"], - "target": "ES2020", + "lib": ["ES2021"], + "target": "ES2021", "module": "commonjs", "outDir": "dist", "sourceMap": false, diff --git a/packages/node/tsconfig.json b/packages/node/tsconfig.json index af0b50130..e5227547e 100644 --- a/packages/node/tsconfig.json +++ b/packages/node/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": ["ES2020", "DOM"], - "target": "ES2020", + "lib": ["ES2021", "DOM"], + "target": "ES2021", "module": "nodenext", "outDir": "dist", "sourceMap": false, diff --git a/packages/python/tsconfig.json b/packages/python/tsconfig.json index fa8d24ad9..18d61219a 100644 --- a/packages/python/tsconfig.json +++ b/packages/python/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -13,7 +13,7 @@ "outDir": "dist", "types": ["node", "jest"], "strict": true, - "target": "ES2020" + "target": "ES2021" }, "include": ["src/**/*"], "exclude": ["node_modules"] diff --git a/packages/redwood/tsconfig.json b/packages/redwood/tsconfig.json index 9ed3b7367..7862a463e 100644 --- a/packages/redwood/tsconfig.json +++ b/packages/redwood/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": false, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -13,6 +13,6 @@ "outDir": "dist", "types": ["node"], "strict": true, - "target": "ES2020" + "target": "ES2021" } } diff --git a/packages/remix/tsconfig.json b/packages/remix/tsconfig.json index 0c299ce1a..aae4692e6 100644 --- a/packages/remix/tsconfig.json +++ b/packages/remix/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -14,7 +14,7 @@ "types": ["node", "jest"], "skipLibCheck": true, "strict": true, - "target": "ES2020", + "target": "ES2021", "sourceMap": true }, "include": ["src/**/*"], diff --git a/packages/routing-utils/tsconfig.json b/packages/routing-utils/tsconfig.json index bd7cd071d..839c7f4be 100644 --- a/packages/routing-utils/tsconfig.json +++ b/packages/routing-utils/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": ["ES2020"], - "target": "ES2020", + "lib": ["ES2021"], + "target": "ES2021", "module": "commonjs", "outDir": "dist", "sourceMap": false, diff --git a/packages/ruby/tsconfig.json b/packages/ruby/tsconfig.json index dc61dbbf1..d29d24eab 100644 --- a/packages/ruby/tsconfig.json +++ b/packages/ruby/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": true, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -12,6 +12,6 @@ "noUnusedParameters": true, "outDir": "dist", "strict": true, - "target": "ES2020" + "target": "ES2021" } } diff --git a/packages/static-build/tsconfig.json b/packages/static-build/tsconfig.json index 45f910702..ad9565c45 100644 --- a/packages/static-build/tsconfig.json +++ b/packages/static-build/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "declaration": false, "esModuleInterop": true, - "lib": ["ES2020"], + "lib": ["ES2021"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, @@ -13,7 +13,7 @@ "outDir": "dist", "types": ["node", "jest"], "strict": true, - "target": "ES2020" + "target": "ES2021" }, "include": ["src/**/*"], "exclude": ["test/fixtures"] diff --git a/packages/static-config/tsconfig.json b/packages/static-config/tsconfig.json index 8d5b658d6..74ed27628 100644 --- a/packages/static-config/tsconfig.json +++ b/packages/static-config/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { "strict": true, "esModuleInterop": true, - "lib": ["ES2020"], - "target": "ES2020", + "lib": ["ES2021"], + "target": "ES2021", "module": "commonjs", "outDir": "dist", "sourceMap": true, diff --git a/utils/tsconfig.json b/utils/tsconfig.json index 299e0a322..21290babb 100644 --- a/utils/tsconfig.json +++ b/utils/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2020", + "target": "ES2021", "skipLibCheck": true, "strict": false, "forceConsistentCasingInFileNames": true,