From f41ba9f76eb44a7510d08f35e83e582b1be7218f Mon Sep 17 00:00:00 2001 From: Pranav Yadav Date: Mon, 24 Apr 2023 23:38:51 +0530 Subject: [PATCH] Update Node.js to v16 in all RN packages - Enforce minimum Node.js v16 in all RN packages under 'packages/' dir **NOTE: This is a BREAKING change**. --- packages/assets/package.json | 5 ++++- packages/babel-plugin-codegen/package.json | 3 +++ packages/eslint-config-react-native-community/package.json | 3 +++ packages/eslint-plugin-react-native-community/package.json | 5 ++++- packages/eslint-plugin-specs/package.json | 3 +++ packages/hermes-inspector-msggen/package.json | 3 +++ packages/metro-config/package.json | 3 +++ packages/normalize-color/package.json | 5 ++++- packages/polyfills/package.json | 5 ++++- packages/react-native-bots/package.json | 3 +++ packages/react-native-codegen-typescript-test/package.json | 3 +++ packages/react-native-codegen/package.json | 3 +++ packages/react-native-gradle-plugin/package.json | 3 +++ packages/rn-tester/package.json | 3 +++ packages/virtualized-lists/package.json | 3 +++ 15 files changed, 49 insertions(+), 4 deletions(-) diff --git a/packages/assets/package.json b/packages/assets/package.json index 1d52c415a5b..d0e755dc894 100644 --- a/packages/assets/package.json +++ b/packages/assets/package.json @@ -7,5 +7,8 @@ "url": "git@github.com:facebook/react-native.git", "directory": "packages/assets" }, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=16" + } } diff --git a/packages/babel-plugin-codegen/package.json b/packages/babel-plugin-codegen/package.json index 5954d420159..7054377c039 100644 --- a/packages/babel-plugin-codegen/package.json +++ b/packages/babel-plugin-codegen/package.json @@ -7,6 +7,9 @@ "url": "git@github.com:facebook/react-native.git", "directory": "packages/babel-plugin-codegen" }, + "engines": { + "node": ">=16" + }, "files": [ "index.js" ], diff --git a/packages/eslint-config-react-native-community/package.json b/packages/eslint-config-react-native-community/package.json index bb97ff34d9a..91894a92846 100644 --- a/packages/eslint-config-react-native-community/package.json +++ b/packages/eslint-config-react-native-community/package.json @@ -10,6 +10,9 @@ "directory": "packages/eslint-config-react-native-community" }, "homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/eslint-config-react-native-community#readme", + "engines": { + "node": ">=16" + }, "dependencies": { "@babel/core": "^7.20.0", "@babel/eslint-parser": "^7.19.0", diff --git a/packages/eslint-plugin-react-native-community/package.json b/packages/eslint-plugin-react-native-community/package.json index f6b8de3cd41..202a4dfb771 100644 --- a/packages/eslint-plugin-react-native-community/package.json +++ b/packages/eslint-plugin-react-native-community/package.json @@ -8,5 +8,8 @@ "url": "git@github.com:facebook/react-native.git", "directory": "packages/eslint-plugin-react-native-community" }, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=16" + } } diff --git a/packages/eslint-plugin-specs/package.json b/packages/eslint-plugin-specs/package.json index 4255aa43ac2..76a91ea4b96 100644 --- a/packages/eslint-plugin-specs/package.json +++ b/packages/eslint-plugin-specs/package.json @@ -8,6 +8,9 @@ "url": "git@github.com:facebook/react-native.git", "directory": "packages/eslint-plugin-specs" }, + "engines": { + "node": ">=16" + }, "scripts": { "prepack": "node prepack.js", "postpack": "node postpack.js" diff --git a/packages/hermes-inspector-msggen/package.json b/packages/hermes-inspector-msggen/package.json index f39c077005d..ea8978f7810 100644 --- a/packages/hermes-inspector-msggen/package.json +++ b/packages/hermes-inspector-msggen/package.json @@ -6,6 +6,9 @@ "bin": { "msggen": "./bin/index.js" }, + "engines": { + "node": ">=16" + }, "scripts": { "flow": "flow", "build": "babel src --out-dir bin --source-maps", diff --git a/packages/metro-config/package.json b/packages/metro-config/package.json index c95528acb92..fdb73502127 100644 --- a/packages/metro-config/package.json +++ b/packages/metro-config/package.json @@ -8,6 +8,9 @@ "directory": "packages/metro-config" }, "license": "MIT", + "engines": { + "node": ">=16" + }, "exports": "./index.js", "dependencies": { "@react-native/js-polyfills": "^0.73.0", diff --git a/packages/normalize-color/package.json b/packages/normalize-color/package.json index 71c6740121a..d3319212203 100644 --- a/packages/normalize-color/package.json +++ b/packages/normalize-color/package.json @@ -7,5 +7,8 @@ "url": "git@github.com:facebook/react-native.git", "directory": "packages/normalize-color" }, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=16" + } } diff --git a/packages/polyfills/package.json b/packages/polyfills/package.json index 1694345b4b2..79b644495b5 100644 --- a/packages/polyfills/package.json +++ b/packages/polyfills/package.json @@ -7,5 +7,8 @@ "url": "git@github.com:facebook/react-native.git", "directory": "packages/polyfills" }, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=16" + } } diff --git a/packages/react-native-bots/package.json b/packages/react-native-bots/package.json index ff5485e29f2..43bbff5cbc2 100644 --- a/packages/react-native-bots/package.json +++ b/packages/react-native-bots/package.json @@ -2,6 +2,9 @@ "name": "@react-native/bots", "version": "0.0.0", "private": true, + "engines": { + "node": ">=16" + }, "devDependencies": { "@rnx-kit/rn-changelog-generator": "^0.4.0", "@seadub/danger-plugin-eslint": "^3.0.2", diff --git a/packages/react-native-codegen-typescript-test/package.json b/packages/react-native-codegen-typescript-test/package.json index 7966c5e443a..d023ab9435c 100644 --- a/packages/react-native-codegen-typescript-test/package.json +++ b/packages/react-native-codegen-typescript-test/package.json @@ -8,6 +8,9 @@ "url": "git@github.com:facebook/react-native.git", "directory": "packages/react-native-codegen-typescript-test" }, + "engines": { + "node": ">=16" + }, "scripts": { "build": "yarn clean && node scripts/build.js --verbose && tsc", "clean": "rimraf lib && rimraf __generated__/*.ts", diff --git a/packages/react-native-codegen/package.json b/packages/react-native-codegen/package.json index d2eeade5d93..4afe3082e0a 100644 --- a/packages/react-native-codegen/package.json +++ b/packages/react-native-codegen/package.json @@ -8,6 +8,9 @@ "url": "git@github.com:facebook/react-native.git", "directory": "packages/react-native-codegen" }, + "engines": { + "node": ">=16" + }, "scripts": { "build": "yarn clean && node scripts/build.js --verbose", "clean": "rimraf lib", diff --git a/packages/react-native-gradle-plugin/package.json b/packages/react-native-gradle-plugin/package.json index 9bf18596fc6..f7fe5796df6 100644 --- a/packages/react-native-gradle-plugin/package.json +++ b/packages/react-native-gradle-plugin/package.json @@ -8,6 +8,9 @@ "url": "git@github.com:facebook/react-native.git", "directory": "packages/react-native-gradle-plugin" }, + "engines": { + "node": ">=16" + }, "scripts": { "build": "./gradlew build", "clean": "./gradlew clean", diff --git a/packages/rn-tester/package.json b/packages/rn-tester/package.json index 36e39e0697a..5ac1f9a3950 100644 --- a/packages/rn-tester/package.json +++ b/packages/rn-tester/package.json @@ -10,6 +10,9 @@ "url": "git@github.com:facebook/react-native.git", "directory": "packages/rn-tester" }, + "engines": { + "node": ">=16" + }, "scripts": { "start": "react-native start", "install-android-jsc": "../../gradlew :packages:rn-tester:android:app:installJscDebug", diff --git a/packages/virtualized-lists/package.json b/packages/virtualized-lists/package.json index b8315f86b5e..021635f292d 100644 --- a/packages/virtualized-lists/package.json +++ b/packages/virtualized-lists/package.json @@ -8,6 +8,9 @@ "directory": "packages/virtualized-lists" }, "license": "MIT", + "engines": { + "node": ">=16" + }, "dependencies": { "invariant": "^2.2.4", "nullthrows": "^1.1.1"