mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
afc91de79a
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36217 ## Bump minimum Node JS version to 16 via `react-native/package.json#engines` In https://github.com/facebook/react-native/pull/35443 we stopped running CI in Node 14 - this follows up by formally making Node 16 the minimum supported version ahead of the 0.72 cut. Node 14 [ends maintenance releases in April](https://github.com/nodejs/release#release-schedule), and bumping this minimum will allow other associated Node JS tools (CLI, Metro, Jest) to reduce their support burden. ## Insert `engines` into `template/package.json` The constraint at `react-native/package.json#engines` ensures the minimum at install/init time, with package managers providing an actionable error or warning if the constraint is not met. However, it doesn't help guide users to a supported version if on an existing project they run (e.g.) `yarn start`. Adding a constraint to the template helps prevent accidental use of an older version, as well as providing a clear reference for the current minimum. Insertion of `engines` below existing `package.json` fields is consistent with [`sort-package-json`](https://github.com/keithamus/sort-package-json/blob/main/defaultRules.md) and [`prettier-package-json`](https://github.com/cameronhunter/prettier-package-json/blob/main/src/defaultOptions.ts) - and keeps it out of the way of fields RN developers are likely to be more concerned about. ## Docs PR https://github.com/facebook/react-native-website/pull/3580 ## Changelog: [General][Breaking] Bump minimum Node JS version to 16 Reviewed By: jacdebug Differential Revision: D43436883 fbshipit-source-id: 0b369487fe44fe777e6fedc2299973a5fddd06b2
36 lines
867 B
JSON
36 lines
867 B
JSON
{
|
|
"name": "HelloWorld",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"scripts": {
|
|
"android": "react-native run-android",
|
|
"ios": "react-native run-ios",
|
|
"lint": "eslint .",
|
|
"start": "react-native start",
|
|
"test": "jest"
|
|
},
|
|
"dependencies": {
|
|
"react": "18.2.0",
|
|
"react-native": "1000.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.20.0",
|
|
"@babel/preset-env": "^7.20.0",
|
|
"@babel/runtime": "^7.12.5",
|
|
"@react-native/eslint-config": "^0.72.1",
|
|
"@tsconfig/react-native": "^2.0.2",
|
|
"@types/react": "^18.0.24",
|
|
"@types/react-test-renderer": "^18.0.0",
|
|
"babel-jest": "^29.2.1",
|
|
"eslint": "^8.19.0",
|
|
"jest": "^29.2.1",
|
|
"metro-react-native-babel-preset": "0.73.5",
|
|
"prettier": "^2.4.1",
|
|
"react-test-renderer": "18.2.0",
|
|
"typescript": "4.8.4"
|
|
},
|
|
"engines": {
|
|
"node": ">=16"
|
|
}
|
|
}
|