Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
/.changelog
yarn.lock

@ajwann ajwann Nov 15, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, but why add yarn.lock to gitignore? Why not commit it?

13 changes: 0 additions & 13 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,6 @@ function createApp(name, verbose, version, useNpm, usePnp, template) {
process.exit(1);
}

if (!semver.satisfies(process.version, '>=6.0.0')) {
console.log(
chalk.yellow(
`You are using Node ${
process.version
} so the project will be bootstrapped with an old unsupported version of tools.\n\n` +
`Please update to Node 6 or higher for a better, fully supported experience.\n`
)
);
// Fall back to latest supported react-scripts on Node 4
version = 'react-scripts@0.9.x';
}

if (!useYarn) {
const npmInfo = checkNpmVersion();
if (!npmInfo.hasMinNpm) {
Expand Down
19 changes: 7 additions & 12 deletions packages/create-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,18 @@

'use strict';

var chalk = require('chalk');
const chalk = require('chalk');
const semver = require('semver');

var currentNodeVersion = process.versions.node;
var semver = currentNodeVersion.split('.');
var major = semver[0];

if (major < 8) {
console.error(
if (!semver.satisfies(process.version, '>=8.9.0')) {
console.log(
chalk.red(
'You are running Node ' +
currentNodeVersion +
'.\n' +
'Create React App requires Node 8 or higher. \n' +
'You are using Node ' +
process.version +
'Create React App requires Node 8.9.0 or higher. \n' +
'Please update your version of Node.'
)
);
process.exit(1);
}

require('./createReactApp');
2 changes: 1 addition & 1 deletion packages/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"repository": "facebook/create-react-app",
"license": "MIT",
"engines": {
"node": ">=4"
"node": ">=8.9.0"
},
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
3 changes: 2 additions & 1 deletion packages/react-scripts/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ module.exports = {
}),
// Inlines the webpack runtime script. This script is too small to warrant
// a network request.
shouldInlineRuntimeChunk && new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
shouldInlineRuntimeChunk &&
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime~.+[.]js/]),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
Expand Down