Skip to content

Commit

Permalink
Update Node.js to v16 in all RN packages (#37073)
Browse files Browse the repository at this point in the history
Summary:
**NOTE**: This is a **BREAKING** change.
TLDR; Enforce minimum Node.js v16 in all RN packages.

This diff **Updates Node.js to v16** across all RN packages.

#### Context:

- For RN development and new project created; bump to node 16 was in #36217
- Recently `react-native-windows` also; updated node to v16, microsoft/react-native-windows#11500

#### Changes:

- [BREAKING] Update Node.js to v16 across all RN packages under 'packages/' dir

## Changelog:

[GENERAL][BREAKING] - Update Node.js to v16 in all RN packages

Pull Request resolved: #37073

Test Plan: - `yarn lint && yarn flow && yarn test-ci` --> _should be green_

Reviewed By: cipolleschi

Differential Revision: D45306108

Pulled By: jacdebug

fbshipit-source-id: e3ba7d0151b86a6a0a3d63fb29c2bd887e1ac1e7
  • Loading branch information
Pranav-yadav authored and facebook-github-bot committed Apr 26, 2023
1 parent 51ff259 commit a58dea1
Show file tree
Hide file tree
Showing 15 changed files with 49 additions and 4 deletions.
5 changes: 4 additions & 1 deletion packages/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"url": "[email protected]:facebook/react-native.git",
"directory": "packages/assets"
},
"license": "MIT"
"license": "MIT",
"engines": {
"node": ">=16"
}
}
3 changes: 3 additions & 0 deletions packages/babel-plugin-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"url": "[email protected]:facebook/react-native.git",
"directory": "packages/babel-plugin-codegen"
},
"engines": {
"node": ">=16"
},
"files": [
"index.js"
],
Expand Down
3 changes: 3 additions & 0 deletions packages/eslint-config-react-native-community/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 4 additions & 1 deletion packages/eslint-plugin-react-native-community/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"url": "[email protected]:facebook/react-native.git",
"directory": "packages/eslint-plugin-react-native-community"
},
"license": "MIT"
"license": "MIT",
"engines": {
"node": ">=16"
}
}
3 changes: 3 additions & 0 deletions packages/eslint-plugin-specs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"url": "[email protected]:facebook/react-native.git",
"directory": "packages/eslint-plugin-specs"
},
"engines": {
"node": ">=16"
},
"scripts": {
"prepack": "node prepack.js",
"postpack": "node postpack.js"
Expand Down
3 changes: 3 additions & 0 deletions packages/hermes-inspector-msggen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"bin": {
"msggen": "./bin/index.js"
},
"engines": {
"node": ">=16"
},
"scripts": {
"flow": "flow",
"build": "babel src --out-dir bin --source-maps",
Expand Down
3 changes: 3 additions & 0 deletions packages/metro-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"directory": "packages/metro-config"
},
"license": "MIT",
"engines": {
"node": ">=16"
},
"exports": "./index.js",
"dependencies": {
"@react-native/js-polyfills": "^0.73.0",
Expand Down
5 changes: 4 additions & 1 deletion packages/normalize-color/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"url": "[email protected]:facebook/react-native.git",
"directory": "packages/normalize-color"
},
"license": "MIT"
"license": "MIT",
"engines": {
"node": ">=16"
}
}
5 changes: 4 additions & 1 deletion packages/polyfills/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"url": "[email protected]:facebook/react-native.git",
"directory": "packages/polyfills"
},
"license": "MIT"
"license": "MIT",
"engines": {
"node": ">=16"
}
}
3 changes: 3 additions & 0 deletions packages/react-native-bots/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions packages/react-native-codegen-typescript-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"url": "[email protected]: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",
Expand Down
3 changes: 3 additions & 0 deletions packages/react-native-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"url": "[email protected]:facebook/react-native.git",
"directory": "packages/react-native-codegen"
},
"engines": {
"node": ">=16"
},
"scripts": {
"build": "yarn clean && node scripts/build.js --verbose",
"clean": "rimraf lib",
Expand Down
3 changes: 3 additions & 0 deletions packages/react-native-gradle-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"url": "[email protected]:facebook/react-native.git",
"directory": "packages/react-native-gradle-plugin"
},
"engines": {
"node": ">=16"
},
"scripts": {
"build": "./gradlew build",
"clean": "./gradlew clean",
Expand Down
3 changes: 3 additions & 0 deletions packages/rn-tester/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"url": "[email protected]: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",
Expand Down
3 changes: 3 additions & 0 deletions packages/virtualized-lists/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"directory": "packages/virtualized-lists"
},
"license": "MIT",
"engines": {
"node": ">=16"
},
"dependencies": {
"invariant": "^2.2.4",
"nullthrows": "^1.1.1"
Expand Down

0 comments on commit a58dea1

Please sign in to comment.