From ebaf27ab49eb8b9394107bd7a796b24bc342c483 Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Thu, 22 Jun 2023 09:53:21 -0700 Subject: [PATCH] Increase minimum Node version from 16 to 18 (#1004) Summary: Pull Request resolved: https://github.com/facebook/metro/pull/1004 Following the same change in React Native (facebook/react-native#36217), increase minimum supported Node.js version for all Metro packages to >=18. Changelog: [Breaking] Increase minimum Node version from 16 to 18 Reviewed By: NickGerleman Differential Revision: D46584012 fbshipit-source-id: fde63f748667eb30e00577f6fe0dc472fa06121a --- .circleci/config.yml | 4 ++-- package.json | 4 ++-- packages/buck-worker-tool/package.json | 2 +- packages/metro-babel-register/package.json | 2 +- packages/metro-babel-transformer/package.json | 2 +- packages/metro-cache-key/package.json | 2 +- packages/metro-cache/package.json | 2 +- packages/metro-config/package.json | 2 +- packages/metro-core/package.json | 2 +- packages/metro-file-map/package.json | 2 +- packages/metro-inspector-proxy/package.json | 2 +- packages/metro-memory-fs/package.json | 2 +- packages/metro-minify-terser/package.json | 2 +- packages/metro-minify-uglify/package.json | 2 +- packages/metro-react-native-babel-preset/package.json | 2 +- packages/metro-react-native-babel-transformer/package.json | 2 +- packages/metro-react-native-interop-tools/package.json | 2 +- packages/metro-resolver/package.json | 2 +- packages/metro-runtime/package.json | 2 +- packages/metro-source-map/package.json | 2 +- packages/metro-symbolicate/package.json | 2 +- packages/metro-transform-plugins/package.json | 2 +- packages/metro-transform-worker/package.json | 2 +- packages/metro/package.json | 2 +- packages/ob1/package.json | 2 +- tsconfig.json | 2 +- yarn.lock | 6 +++--- 27 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6f37d323c9..2f098745e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,8 +10,8 @@ references: # For stability, Node.js versions we run against in CI are defined explicitly # (the "lts" alias may bring in a future version before we support it) node_supported_lts_versions: &node_supported_lts_versions - - &node_min_supported_version "16.18" - - "18.12" + - &node_min_supported_version "18.12" + - "20.2" node_lts_image: &node_lts_image cimg/node:18.12 secure_unset_publish_token: &secure_unset_publish_token diff --git a/package.json b/package.json index 421a1f062b..fdc9e2e07a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "@babel/plugin-syntax-class-properties": "^7.0.0", "@babel/plugin-transform-flow-strip-types": "^7.20.0", "@babel/plugin-transform-modules-commonjs": "^7.0.0", - "@tsconfig/node16": "1.0.1", + "@tsconfig/node18": "1.0.1", "@typescript-eslint/eslint-plugin": "^5.57.1", "@typescript-eslint/parser": "^5.57.1", "acorn": "^8.7.1", @@ -89,6 +89,6 @@ "license": "MIT", "dependencies": {}, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/buck-worker-tool/package.json b/packages/buck-worker-tool/package.json index a19867fc88..2743b0167f 100644 --- a/packages/buck-worker-tool/package.json +++ b/packages/buck-worker-tool/package.json @@ -19,6 +19,6 @@ "cleanup-release": "test ! -e build && mv src build && mv src.real src" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-babel-register/package.json b/packages/metro-babel-register/package.json index b1ebcbacef..f984cac92b 100644 --- a/packages/metro-babel-register/package.json +++ b/packages/metro-babel-register/package.json @@ -22,6 +22,6 @@ }, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-babel-transformer/package.json b/packages/metro-babel-transformer/package.json index 6b9e10ee38..cb2638f4eb 100644 --- a/packages/metro-babel-transformer/package.json +++ b/packages/metro-babel-transformer/package.json @@ -22,6 +22,6 @@ "nullthrows": "^1.1.1" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-cache-key/package.json b/packages/metro-cache-key/package.json index 08102d193a..17f5f660dd 100644 --- a/packages/metro-cache-key/package.json +++ b/packages/metro-cache-key/package.json @@ -16,6 +16,6 @@ "metro-memory-fs": "0.76.7" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-cache/package.json b/packages/metro-cache/package.json index c8225b3a88..a5184bdf6e 100644 --- a/packages/metro-cache/package.json +++ b/packages/metro-cache/package.json @@ -20,6 +20,6 @@ }, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index d906cfad76..e181d42f91 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -27,6 +27,6 @@ "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-core/package.json b/packages/metro-core/package.json index f764c3d2d3..8d6fbc8766 100644 --- a/packages/metro-core/package.json +++ b/packages/metro-core/package.json @@ -17,6 +17,6 @@ }, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-file-map/package.json b/packages/metro-file-map/package.json index 9602e16723..b4516d6262 100644 --- a/packages/metro-file-map/package.json +++ b/packages/metro-file-map/package.json @@ -33,6 +33,6 @@ "fsevents": "^2.3.2" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-inspector-proxy/package.json b/packages/metro-inspector-proxy/package.json index 30e25df31a..5c54acf66b 100644 --- a/packages/metro-inspector-proxy/package.json +++ b/packages/metro-inspector-proxy/package.json @@ -24,6 +24,6 @@ "node-fetch": "^2.2.0" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-memory-fs/package.json b/packages/metro-memory-fs/package.json index 1a93c08de7..b009cd0755 100644 --- a/packages/metro-memory-fs/package.json +++ b/packages/metro-memory-fs/package.json @@ -13,6 +13,6 @@ }, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-minify-terser/package.json b/packages/metro-minify-terser/package.json index 51a8749c0d..7673a177c5 100644 --- a/packages/metro-minify-terser/package.json +++ b/packages/metro-minify-terser/package.json @@ -16,6 +16,6 @@ "terser": "^5.15.0" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-minify-uglify/package.json b/packages/metro-minify-uglify/package.json index fb70307087..3d7bf3c494 100644 --- a/packages/metro-minify-uglify/package.json +++ b/packages/metro-minify-uglify/package.json @@ -16,6 +16,6 @@ "uglify-es": "^3.1.9" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-react-native-babel-preset/package.json b/packages/metro-react-native-babel-preset/package.json index f5ff1aff80..fbd204ac02 100644 --- a/packages/metro-react-native-babel-preset/package.json +++ b/packages/metro-react-native-babel-preset/package.json @@ -62,6 +62,6 @@ "@babel/core": "*" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-react-native-babel-transformer/package.json b/packages/metro-react-native-babel-transformer/package.json index 72db7f5fe7..6d7fa124e2 100644 --- a/packages/metro-react-native-babel-transformer/package.json +++ b/packages/metro-react-native-babel-transformer/package.json @@ -28,6 +28,6 @@ "@babel/core": "*" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-react-native-interop-tools/package.json b/packages/metro-react-native-interop-tools/package.json index 44c083c38d..2dd79ed8d8 100644 --- a/packages/metro-react-native-interop-tools/package.json +++ b/packages/metro-react-native-interop-tools/package.json @@ -19,6 +19,6 @@ }, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-resolver/package.json b/packages/metro-resolver/package.json index 503fff4d71..3664b74497 100644 --- a/packages/metro-resolver/package.json +++ b/packages/metro-resolver/package.json @@ -13,6 +13,6 @@ }, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-runtime/package.json b/packages/metro-runtime/package.json index c6f9a4b103..7e1d08758f 100644 --- a/packages/metro-runtime/package.json +++ b/packages/metro-runtime/package.json @@ -22,6 +22,6 @@ "react-test-renderer": "^18.2.0" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-source-map/package.json b/packages/metro-source-map/package.json index cdd4a5528f..4e4aa7fd83 100644 --- a/packages/metro-source-map/package.json +++ b/packages/metro-source-map/package.json @@ -28,6 +28,6 @@ "terser": "^5.15.0" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-symbolicate/package.json b/packages/metro-symbolicate/package.json index 7ca6d759ca..e23fa86050 100644 --- a/packages/metro-symbolicate/package.json +++ b/packages/metro-symbolicate/package.json @@ -25,6 +25,6 @@ "vlq": "^1.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-transform-plugins/package.json b/packages/metro-transform-plugins/package.json index 506f819de6..d0ae55e147 100644 --- a/packages/metro-transform-plugins/package.json +++ b/packages/metro-transform-plugins/package.json @@ -27,6 +27,6 @@ "metro": "0.76.7" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro-transform-worker/package.json b/packages/metro-transform-worker/package.json index f818210a06..b09ad01175 100644 --- a/packages/metro-transform-worker/package.json +++ b/packages/metro-transform-worker/package.json @@ -32,6 +32,6 @@ "metro-react-native-babel-transformer": "0.76.7" }, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/metro/package.json b/packages/metro/package.json index 40650453b3..5200f0d479 100644 --- a/packages/metro/package.json +++ b/packages/metro/package.json @@ -78,6 +78,6 @@ }, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/packages/ob1/package.json b/packages/ob1/package.json index d663c9126b..5e36f53c9b 100644 --- a/packages/ob1/package.json +++ b/packages/ob1/package.json @@ -17,6 +17,6 @@ "license": "MIT", "dependencies": {}, "engines": { - "node": ">=16" + "node": ">=18" } } diff --git a/tsconfig.json b/tsconfig.json index f5f62b4c9c..aa99487b73 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@tsconfig/node16/tsconfig.json", + "extends": "@tsconfig/node18/tsconfig.json", "include": ["./packages/*/types/**/*.d.ts"], "compilerOptions": { "noEmit": true, diff --git a/yarn.lock b/yarn.lock index 1917ead884..fbd541ab2b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1226,10 +1226,10 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@tsconfig/node16@1.0.1": +"@tsconfig/node18@1.0.1": version "1.0.1" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.1.tgz#a6ca6a9a0ff366af433f42f5f0e124794ff6b8f1" - integrity sha512-FTgBI767POY/lKNDNbIzgAX6miIDBs6NTCbdlDb8TrWovHsSvaVIZDlTqym29C6UqhzwcJx4CYr+AlrMywA0cA== + resolved "https://registry.yarnpkg.com/@tsconfig/node18/-/node18-1.0.1.tgz#ea5b375a9ead6b09ccbd70c3894ea069829ea1bb" + integrity sha512-sNFeK6X2ATlhlvzyH4kKYQlfHXE2f2/wxtB9ClvYXevWpmwkUT7VaSrjIN9E76Qebz8qP5JOJJ9jD3QoD/Z9TA== "@types/babel__core@^7.1.14": version "7.1.19"