From fba86b07023592addf4242507aa865acac4f0463 Mon Sep 17 00:00:00 2001 From: Ville Immonen Date: Sun, 4 Sep 2016 19:08:02 +0300 Subject: [PATCH 1/3] Warn about unsupported Node.js versions Add the `engines` field to package.json so users of old Node.js versions will at least get a warning when trying to install create-react-app or react-scripts, e.g.: npm WARN engine create-react-app@0.3.0: wanted: {"node":">=6"} (current: {"node":"4.2.3","npm":"2.14.7"}) --- global-cli/package.json | 3 +++ package.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/global-cli/package.json b/global-cli/package.json index 91f86bea133..a06c0bf07be 100644 --- a/global-cli/package.json +++ b/global-cli/package.json @@ -16,6 +16,9 @@ "bin": { "create-react-app": "./index.js" }, + "engines": { + "node" : ">=6" + }, "dependencies": { "chalk": "^1.1.1", "cross-spawn": "^4.0.0", diff --git a/package.json b/package.json index a6bf6f384ab..7a65d5fdeab 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,9 @@ "bin": { "react-scripts": "./bin/react-scripts.js" }, + "engines": { + "node" : ">=6" + }, "dependencies": { "autoprefixer": "6.4.0", "babel-core": "6.14.0", From b90f6d960d1fc3bdae6112128c90ca81eeac7de6 Mon Sep 17 00:00:00 2001 From: Ville Immonen Date: Sun, 4 Sep 2016 19:11:28 +0300 Subject: [PATCH 2/3] Remove duplicated field and extra whitespace --- global-cli/package.json | 2 +- package.json | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/global-cli/package.json b/global-cli/package.json index a06c0bf07be..be8ab181172 100644 --- a/global-cli/package.json +++ b/global-cli/package.json @@ -17,7 +17,7 @@ "create-react-app": "./index.js" }, "engines": { - "node" : ">=6" + "node": ">=6" }, "dependencies": { "chalk": "^1.1.1", diff --git a/package.json b/package.json index 7a65d5fdeab..75f2ba220ff 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", "engines": { - "node": ">=4" + "node": ">=6" }, "bugs": { "url": "https://github.com/facebookincubator/create-react-app/issues" @@ -27,9 +27,6 @@ "bin": { "react-scripts": "./bin/react-scripts.js" }, - "engines": { - "node" : ">=6" - }, "dependencies": { "autoprefixer": "6.4.0", "babel-core": "6.14.0", From 8b9b8fc89be30ebc39578440b5df1fcbee558bf7 Mon Sep 17 00:00:00 2001 From: Ville Immonen Date: Sun, 4 Sep 2016 19:15:22 +0300 Subject: [PATCH 3/3] Change the engine version back to 4 --- global-cli/package.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/global-cli/package.json b/global-cli/package.json index be8ab181172..cd4008feff9 100644 --- a/global-cli/package.json +++ b/global-cli/package.json @@ -7,6 +7,9 @@ "description": "Create React apps with no build configuration.", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", + "engines": { + "node": ">=4" + }, "bugs": { "url": "https://github.com/facebookincubator/create-react-app/issues" }, @@ -16,9 +19,6 @@ "bin": { "create-react-app": "./index.js" }, - "engines": { - "node": ">=6" - }, "dependencies": { "chalk": "^1.1.1", "cross-spawn": "^4.0.0", diff --git a/package.json b/package.json index 75f2ba220ff..a6bf6f384ab 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", "engines": { - "node": ">=6" + "node": ">=4" }, "bugs": { "url": "https://github.com/facebookincubator/create-react-app/issues"