Bump minimum Node version to 8.3 (#20236)
Summary: Node rest/spread syntax started working without the harmony flag in 8.3 (https://github.com/facebook/react-native/pull/20178#issuecomment-404961149). Release Notes: [GENERAL] [BREAKING] [Node] - Bump minimum req. Node version to 8.3 Pull Request resolved: https://github.com/facebook/react-native/pull/20236 Differential Revision: D8876357 Pulled By: hramos fbshipit-source-id: 1f5f791ef318e70c6be8b23d887a1d650a68e594
This commit is contained in:
parent
2d1fabbab2
commit
e64e13fce3
|
@ -14,7 +14,7 @@ var formatBanner = require('metro-core/src/formatBanner');
|
||||||
var semver = require('semver');
|
var semver = require('semver');
|
||||||
|
|
||||||
module.exports = function() {
|
module.exports = function() {
|
||||||
if (!semver.satisfies(process.version, '>=8')) {
|
if (!semver.satisfies(process.version, '>=8.3')) {
|
||||||
var engine = semver.satisfies(process.version, '<1') ? 'Node' : 'io.js';
|
var engine = semver.satisfies(process.version, '<1') ? 'Node' : 'io.js';
|
||||||
|
|
||||||
var message =
|
var message =
|
||||||
|
@ -24,15 +24,12 @@ module.exports = function() {
|
||||||
process.version +
|
process.version +
|
||||||
'.\n' +
|
'.\n' +
|
||||||
'\n' +
|
'\n' +
|
||||||
'React Native runs on Node 8.0 or newer. There are several ways to ' +
|
'React Native runs on Node 8.3 or newer. There are several ways to ' +
|
||||||
'upgrade Node.js depending on your preference.\n' +
|
'upgrade Node.js depending on your preference.\n' +
|
||||||
'\n' +
|
'\n' +
|
||||||
'nvm: nvm install node && nvm alias default node\n' +
|
'nvm: nvm install 8.3 --reinstall-packages-from=node\n' +
|
||||||
'Homebrew: brew unlink iojs; brew install node\n' +
|
'Homebrew: brew update && brew upgrade node\n' +
|
||||||
'Installer: download the Mac .pkg from https://nodejs.org/\n' +
|
'Installer: download from https://nodejs.org/\n';
|
||||||
'\n' +
|
|
||||||
'About Node.js: https://nodejs.org\n' +
|
|
||||||
'Follow along at: https://github.com/facebook/react-native/issues/19226';
|
|
||||||
console.log(
|
console.log(
|
||||||
formatBanner(message, {
|
formatBanner(message, {
|
||||||
chalkFunction: chalk.green,
|
chalkFunction: chalk.green,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"url": "git@github.com:facebook/react-native.git"
|
"url": "git@github.com:facebook/react-native.git"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8.3"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"requirePragma": true,
|
"requirePragma": true,
|
||||||
|
|
Loading…
Reference in New Issue