Skip to content

Commit c1e6f27

Browse files
hramosfacebook-github-bot
authored andcommitted
Bump to Node 8
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 #19226 [GENERAL] [BREAKING] [Node] - Bump minimum req. Node version to 8 Closes #19230 Differential Revision: D7979478 Pulled By: hramos fbshipit-source-id: c91ec118f0a59c4daae5fcdbfc822ccead591304
1 parent 75ff136 commit c1e6f27

File tree

3 files changed

+4
-26
lines changed

3 files changed

+4
-26
lines changed

.circleci/config.yml

-22
Original file line numberDiff line numberDiff line change
@@ -365,24 +365,6 @@ jobs:
365365
- store_test_results:
366366
path: ~/react-native/reports/junit
367367

368-
# Runs JavaScript tests on Node 6
369-
test_javascript_node6_compatibility:
370-
<<: *defaults
371-
docker:
372-
- image: circleci/node:6
373-
steps:
374-
- checkout
375-
- run: *setup-artifacts
376-
377-
- restore-cache: *restore-cache-yarn
378-
- run: *yarn
379-
- save-cache: *save-cache-yarn
380-
381-
- run: *run-js-tests
382-
383-
- store_test_results:
384-
path: ~/react-native/reports/junit
385-
386368
# Runs unit tests on iOS devices
387369
test_ios:
388370
<<: *macos_defaults
@@ -624,10 +606,6 @@ workflows:
624606
requires:
625607
- checkout_code
626608

627-
# Test JavaScript using Node 6, the minimum supported version
628-
- test_javascript_node6_compatibility:
629-
filters: *filter-ignore-gh-pages
630-
631609
# Test Android
632610
- test_android:
633611
filters: *filter-ignore-gh-pages

local-cli/server/checkNodeVersion.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var formatBanner = require('metro-core/src/formatBanner');
1414
var semver = require('semver');
1515

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

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

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"url": "[email protected]:facebook/react-native.git"
99
},
1010
"engines": {
11-
"node": ">=4"
11+
"node": ">=8"
1212
},
1313
"prettier": {
1414
"requirePragma": true,

0 commit comments

Comments
 (0)