Skip to content

Commit

Permalink
Bump to Node 8
Browse files Browse the repository at this point in the history
Summary:
Moving to Node 8 in React Native will allow us to be consistent with Facebook, e.g. trailing commas.

As of April 30, Node 4.x is end of life, and Node 6.x entered maintenance mode (see https://medium.com/the-node-js-collection/april-2018-release-updates-from-the-node-js-project-71687e1f7742).

This will require our docs to be updated to require Node 8 as a minimum. This should be done as part of the following PR: facebook/react-native-website#355

Circle CI already runs all JS tests using Node 8, and it has an extra compatibility check that uses Node 6. This workflow is dropped as we no longer need to check for failures when Node 6 is used.

See facebook/react-native#19226

[GENERAL] [BREAKING] [Node] - Bump minimum req. Node version to 8
Closes facebook/react-native#19230

Differential Revision: D7979478

Pulled By: hramos

fbshipit-source-id: c91ec118f0a59c4daae5fcdbfc822ccead591304
  • Loading branch information
hramos authored and facebook-github-bot committed May 12, 2018
1 parent 9df5ea0 commit 21a68b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/checkNodeVersion.js
Expand Up @@ -14,7 +14,7 @@ var formatBanner = require('metro-core/src/formatBanner');
var semver = require('semver');

module.exports = function() {
if (!semver.satisfies(process.version, '>=4')) {
if (!semver.satisfies(process.version, '>=8')) {
var engine = semver.satisfies(process.version, '<1') ? 'Node' : 'io.js';

var message =
Expand All @@ -24,15 +24,15 @@ module.exports = function() {
process.version +
'.\n' +
'\n' +
'React Native runs on Node 4.0 or newer. There are several ways to ' +
'React Native runs on Node 8.0 or newer. There are several ways to ' +
'upgrade Node.js depending on your preference.\n' +
'\n' +
'nvm: nvm install node && nvm alias default node\n' +
'Homebrew: brew unlink iojs; brew install node\n' +
'Installer: download the Mac .pkg from https://nodejs.org/\n' +
'\n' +
'About Node.js: https://nodejs.org\n' +
'Follow along at: https://github.com/facebook/react-native/issues/2545';
'Follow along at: https://github.com/facebook/react-native/issues/19226';
console.log(
formatBanner(message, {
chalkFunction: chalk.green,
Expand Down

0 comments on commit 21a68b8

Please sign in to comment.