From c1ba38dbf525029c637a89b9b33fd0e744b3fd2e Mon Sep 17 00:00:00 2001 From: Zac Kwan Date: Sat, 27 May 2017 19:33:13 +0800 Subject: [PATCH 01/15] Removed the overriding of reduce_vars to false since webpack v2.6.0 included the fixed for Uglify bug (#2351) --- packages/react-scripts/config/webpack.config.prod.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 446fd5ca39d..fec81bcabb7 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -282,10 +282,6 @@ module.exports = { new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false, - // This feature has been reported as buggy a few times, such as: - // https://github.com/mishoo/UglifyJS2/issues/1964 - // We'll wait with enabling it by default until it is more solid. - reduce_vars: false, }, output: { comments: false, From f6d85440335ba61c828cfb30259b2ecb91c3da2d Mon Sep 17 00:00:00 2001 From: David Ascher Date: Sat, 27 May 2017 04:36:42 -0700 Subject: [PATCH 02/15] Disable comparisons feature in uglify compression in production (#2379) * Disable a micro-option in uglify that appears to be buggy See https://github.com/facebookincubator/create-react-app/issues/2376 * wrong plugin * Add a comment --- packages/react-scripts/config/webpack.config.prod.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index fec81bcabb7..5943c14502c 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -282,6 +282,11 @@ module.exports = { new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false, + // Disabled because of an issue with Uglify breaking seemingly valid code: + // https://github.com/facebookincubator/create-react-app/issues/2376 + // Pending further investigation: + // https://github.com/mishoo/UglifyJS2/issues/2011 + comparisons: false, }, output: { comments: false, From 2069e8ac43c4765f1698091d3985ecb70ba88089 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 27 May 2017 12:37:07 +0100 Subject: [PATCH 03/15] Consistently set environment variables (#2382) --- packages/react-scripts/scripts/build.js | 1 + packages/react-scripts/scripts/start.js | 6 ++++-- packages/react-scripts/scripts/test.js | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/scripts/build.js b/packages/react-scripts/scripts/build.js index bc46c71d6da..a83d287ded4 100644 --- a/packages/react-scripts/scripts/build.js +++ b/packages/react-scripts/scripts/build.js @@ -11,6 +11,7 @@ 'use strict'; // Do this as the first thing so that any code reading it knows the right env. +process.env.BABEL_ENV = 'production'; process.env.NODE_ENV = 'production'; // Makes the script crash on unhandled rejections instead of silently diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index a451228df8b..b86943b4d9d 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -10,6 +10,10 @@ // @remove-on-eject-end 'use strict'; +// Do this as the first thing so that any code reading it knows the right env. +process.env.BABEL_ENV = 'development'; +process.env.NODE_ENV = 'development'; + // Makes the script crash on unhandled rejections instead of silently // ignoring them. In the future, promise rejections that are not handled will // terminate the Node.js process with a non-zero exit code. @@ -17,8 +21,6 @@ process.on('unhandledRejection', err => { throw err; }); -process.env.NODE_ENV = 'development'; - // Ensure environment variables are read. require('../config/env'); diff --git a/packages/react-scripts/scripts/test.js b/packages/react-scripts/scripts/test.js index ef333e6c004..e9adb48f0b5 100644 --- a/packages/react-scripts/scripts/test.js +++ b/packages/react-scripts/scripts/test.js @@ -10,6 +10,8 @@ // @remove-on-eject-end 'use strict'; +// Do this as the first thing so that any code reading it knows the right env. +process.env.BABEL_ENV = 'test'; process.env.NODE_ENV = 'test'; process.env.PUBLIC_URL = ''; From 1421010ae28059be09b98b233e99b32eaf36a237 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 27 May 2017 12:38:40 +0100 Subject: [PATCH 04/15] Update webpack to 2.6.1 (#2383) --- packages/react-scripts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 8835ff86fe1..d12b68b89f7 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -53,7 +53,7 @@ "style-loader": "0.17.0", "sw-precache-webpack-plugin": "0.9.1", "url-loader": "0.5.8", - "webpack": "2.6.0", + "webpack": "2.6.1", "webpack-dev-server": "2.4.5", "webpack-manifest-plugin": "1.1.0", "whatwg-fetch": "2.0.3" From 84efd450319b7280a49e21001770ffd2da775c5d Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 27 May 2017 12:41:44 +0100 Subject: [PATCH 05/15] Add changelog for 1.0.7 (#2384) --- CHANGELOG.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cbeed3a4ad..9049c88fea5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,53 @@ +## 1.0.7 (May 27, 2017) + +#### :bug: Bug Fix + +* `react-scripts` + + * [#2382](https://github.com/facebookincubator/create-react-app/pull/2382) Consistently set environment variables. ([@gaearon](https://github.com/gaearon)) + * [#2379](https://github.com/facebookincubator/create-react-app/pull/2379) Temporarily disable `comparisons` feature in uglify compression. ([@davidascher](https://github.com/davidascher)) + +#### :nail_care: Enhancement + +* `react-scripts` + + * [#2383](https://github.com/facebookincubator/create-react-app/pull/2383) Update webpack to 2.6.1. ([@gaearon](https://github.com/gaearon)) + * [#2349](https://github.com/facebookincubator/create-react-app/pull/2349) Update webpack to v2.6.0. ([@ingro](https://github.com/ingro)) + * [#2351](https://github.com/facebookincubator/create-react-app/pull/2351) Removed the overriding of `reduce_vars` since webpack v2.6.0 included fix of Uglify. ([@Zaccc123](https://github.com/Zaccc123)) + +* `react-dev-utils`, `react-scripts` + + * [#2361](https://github.com/facebookincubator/create-react-app/pull/2361) Print file sizes with correct build folder path. ([@fezhengjin](https://github.com/fezhengjin)) + +#### :memo: Documentation + +* `react-scripts` + + * [#2372](https://github.com/facebookincubator/create-react-app/pull/2372) Update README.md for `now` deployments. ([@purplecones](https://github.com/purplecones)) + * [#2350](https://github.com/facebookincubator/create-react-app/pull/2350) Fix broken links. ([@gaearon](https://github.com/gaearon)) + +#### Committers: 6 +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- David Ascher ([davidascher](https://github.com/davidascher)) +- Emanuele Ingrosso ([ingro](https://github.com/ingro)) +- Jin Zheng ([fezhengjin](https://github.com/fezhengjin)) +- Mirza Joldic ([purplecones](https://github.com/purplecones)) +- Zac Kwan ([Zaccc123](https://github.com/Zaccc123)) + +### Migrating from 1.0.6 to 1.0.7 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@1.0.7 +``` + +or + +``` +yarn add --dev --exact react-scripts@1.0.7 +``` + ## 1.0.6 (May 24, 2017) #### :bug: Bug Fix From 58d8c5c05cc90d9286beb6b4200f5ac1918a8910 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 27 May 2017 12:42:54 +0100 Subject: [PATCH 06/15] Publish - react-dev-utils@3.0.0 - react-error-overlay@1.0.7 - react-scripts@1.0.7 --- packages/react-dev-utils/package.json | 2 +- packages/react-error-overlay/package.json | 4 ++-- packages/react-scripts/package.json | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index f62d87f8bd3..46f3a92033a 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -1,6 +1,6 @@ { "name": "react-dev-utils", - "version": "2.0.1", + "version": "3.0.0", "description": "Webpack utilities used by Create React App", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index 70a01e3f6b8..88c909e1154 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -1,6 +1,6 @@ { "name": "react-error-overlay", - "version": "1.0.6", + "version": "1.0.7", "description": "An overlay for displaying stack frames.", "main": "lib/index.js", "scripts": { @@ -34,7 +34,7 @@ "anser": "1.2.5", "babel-code-frame": "6.22.0", "babel-runtime": "6.23.0", - "react-dev-utils": "^2.0.1", + "react-dev-utils": "^3.0.0", "settle-promise": "1.0.0", "source-map": "0.5.6" }, diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index d12b68b89f7..e6879f756af 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -1,6 +1,6 @@ { "name": "react-scripts", - "version": "1.0.6", + "version": "1.0.7", "description": "Configuration and scripts for Create React App.", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", @@ -48,8 +48,8 @@ "postcss-flexbugs-fixes": "3.0.0", "postcss-loader": "2.0.5", "promise": "7.1.1", - "react-dev-utils": "^2.0.1", - "react-error-overlay": "^1.0.6", + "react-dev-utils": "^3.0.0", + "react-error-overlay": "^1.0.7", "style-loader": "0.17.0", "sw-precache-webpack-plugin": "0.9.1", "url-loader": "0.5.8", From 5317b3f910d4796dafbf87aa571eebc45cd1b277 Mon Sep 17 00:00:00 2001 From: Fabrizio Castellarin Date: Sat, 27 May 2017 21:32:12 +0200 Subject: [PATCH 07/15] Catch "No tests found" during CI (#2387) --- tasks/e2e-kitchensink.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 2295615e8ea..9d60d6e2935 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -158,6 +158,16 @@ REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ NODE_ENV=test \ npm test -- --no-cache --testPathPattern="/src/" +# Catch when no tests are detected +testsList=$(REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ + CI=true \ + NODE_PATH=src \ + npm test -- --no-cache --testPathPattern="/src/" --listTests) + +if [[ ${testsList} =~ "[]" ]]; then + exit 1 +fi + # Test "development" environment tmp_server_log=`mktemp` PORT=3001 \ From 70bf12505c4419c171aca3e07d7a388bf1dc9cbc Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 27 May 2017 21:26:53 +0100 Subject: [PATCH 08/15] Suggest just "yarn build" (#2385) --- packages/react-dev-utils/WebpackDevServerUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-dev-utils/WebpackDevServerUtils.js b/packages/react-dev-utils/WebpackDevServerUtils.js index b681c601f7c..51a0feb56f3 100644 --- a/packages/react-dev-utils/WebpackDevServerUtils.js +++ b/packages/react-dev-utils/WebpackDevServerUtils.js @@ -107,7 +107,7 @@ function printInstructions(appName, urls, useYarn) { console.log('Note that the development build is not optimized.'); console.log( `To create a production build, use ` + - `${chalk.cyan(`${useYarn ? 'yarn' : 'npm'} run build`)}.` + `${chalk.cyan(`${useYarn ? 'yarn' : 'npm run'} build`)}.` ); console.log(); } From 2aafaad72d1737eae98c4de9cbe275c1988ec4ae Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 27 May 2017 21:38:00 +0100 Subject: [PATCH 09/15] Fix wrong path expansion in end-to-end test (#2388) * Update e2e-kitchensink.sh * Try again (differently) --- tasks/e2e-kitchensink.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 9d60d6e2935..4506066cc4f 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -156,13 +156,13 @@ REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ CI=true \ NODE_PATH=src \ NODE_ENV=test \ - npm test -- --no-cache --testPathPattern="/src/" + npm test -- --no-cache --testPathPattern=src # Catch when no tests are detected testsList=$(REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ CI=true \ NODE_PATH=src \ - npm test -- --no-cache --testPathPattern="/src/" --listTests) + npm test -- --no-cache --testPathPattern=src --listTests) if [[ ${testsList} =~ "[]" ]]; then exit 1 @@ -230,7 +230,7 @@ REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ CI=true \ NODE_PATH=src \ NODE_ENV=test \ - npm test -- --no-cache --testPathPattern='/src/' + npm test -- --no-cache --testPathPattern=src # Test "development" environment tmp_server_log=`mktemp` From 3f342383c3fd6a39058d82e599a523103cff7fbc Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 27 May 2017 23:26:03 +0100 Subject: [PATCH 10/15] Revert "Catch "No tests found" during CI" (#2390) * Revert "Fix wrong path expansion in end-to-end test (#2388)" This reverts commit 2aafaad72d1737eae98c4de9cbe275c1988ec4ae. * Revert "Suggest just "yarn build" (#2385)" This reverts commit 70bf12505c4419c171aca3e07d7a388bf1dc9cbc. * Revert "Catch "No tests found" during CI (#2387)" This reverts commit 5317b3f910d4796dafbf87aa571eebc45cd1b277. --- tasks/e2e-kitchensink.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 4506066cc4f..9e689ca222e 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -158,16 +158,6 @@ REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ NODE_ENV=test \ npm test -- --no-cache --testPathPattern=src -# Catch when no tests are detected -testsList=$(REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ - CI=true \ - NODE_PATH=src \ - npm test -- --no-cache --testPathPattern=src --listTests) - -if [[ ${testsList} =~ "[]" ]]; then - exit 1 -fi - # Test "development" environment tmp_server_log=`mktemp` PORT=3001 \ From e6ddfb041175918917ae507bd9a994b834ede91d Mon Sep 17 00:00:00 2001 From: Ro Savage Date: Mon, 29 May 2017 22:09:40 +1200 Subject: [PATCH 11/15] Fix kill command in e2e-kitchensink.sh cleanup (#2397) --- tasks/e2e-kitchensink.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 9e689ca222e..1a19f4ae67f 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -22,7 +22,7 @@ temp_module_path=`mktemp -d 2>/dev/null || mktemp -d -t 'temp_module_path'` function cleanup { echo 'Cleaning up.' - ps -ef | grep 'react-scripts' | grep -v grep | awk '{print $2}' | xargs kill -s 9 + ps -ef | grep 'react-scripts' | grep -v grep | awk '{print $2}' | xargs kill -9 cd "$root_path" # TODO: fix "Device or resource busy" and remove ``|| $CI` rm -rf "$temp_cli_path" "$temp_app_path" "$temp_module_path" || $CI From 32f82c03cb5b811337616a7bf959a544e5ba836d Mon Sep 17 00:00:00 2001 From: Ro Savage Date: Tue, 30 May 2017 06:00:43 +1200 Subject: [PATCH 12/15] Added cache clear to e2e scripts (#2400) * Added cache clear to e2e scripts * Install latest yarn on AppVeyor to avoid windows crashing bug in yarn * Alternative fix for yarn crashing e2e tests on windows machines --- tasks/e2e-installs.sh | 24 ++++++++++++++++++++++++ tasks/e2e-kitchensink.sh | 24 ++++++++++++++++++++++++ tasks/e2e-simple.sh | 24 ++++++++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/tasks/e2e-installs.sh b/tasks/e2e-installs.sh index b27b1239eda..8f4789ff0c7 100755 --- a/tasks/e2e-installs.sh +++ b/tasks/e2e-installs.sh @@ -83,6 +83,30 @@ set -x cd .. root_path=$PWD +# Clear cache to avoid issues with incorrect packages being used +if hash yarnpkg 2>/dev/null +then + # AppVeyor uses an old version of yarn. + # Once updated to 0.24.3 or above, the workaround can be removed + # and replaced with `yarnpkg cache clean` + # Issues: + # https://github.com/yarnpkg/yarn/issues/2591 + # https://github.com/appveyor/ci/issues/1576 + # https://github.com/facebookincubator/create-react-app/pull/2400 + # When removing workaround, you may run into + # https://github.com/facebookincubator/create-react-app/issues/2030 + case "$(uname -s)" in + *CYGWIN*|MSYS*|MINGW*) yarn=yarn.cmd;; + *) yarn=yarnpkg;; + esac + $yarn cache clean +fi + +if hash npm 2>/dev/null +then + npm cache clean +fi + # Prevent lerna bootstrap, we only want top-level dependencies cp package.json package.json.bak grep -v "lerna bootstrap" package.json > temp && mv temp package.json diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 1a19f4ae67f..fcd687e4b0d 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -66,6 +66,30 @@ set -x cd .. root_path=$PWD +# Clear cache to avoid issues with incorrect packages being used +if hash yarnpkg 2>/dev/null +then + # AppVeyor uses an old version of yarn. + # Once updated to 0.24.3 or above, the workaround can be removed + # and replaced with `yarnpkg cache clean` + # Issues: + # https://github.com/yarnpkg/yarn/issues/2591 + # https://github.com/appveyor/ci/issues/1576 + # https://github.com/facebookincubator/create-react-app/pull/2400 + # When removing workaround, you may run into + # https://github.com/facebookincubator/create-react-app/issues/2030 + case "$(uname -s)" in + *CYGWIN*|MSYS*|MINGW*) yarn=yarn.cmd;; + *) yarn=yarnpkg;; + esac + $yarn cache clean +fi + +if hash npm 2>/dev/null +then + npm cache clean +fi + # Prevent lerna bootstrap, we only want top-level dependencies cp package.json package.json.bak grep -v "lerna bootstrap" package.json > temp && mv temp package.json diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh index 4795d09a8b2..163bec0818a 100755 --- a/tasks/e2e-simple.sh +++ b/tasks/e2e-simple.sh @@ -65,6 +65,30 @@ set -x cd .. root_path=$PWD +# Clear cache to avoid issues with incorrect packages being used +if hash yarnpkg 2>/dev/null +then + # AppVeyor uses an old version of yarn. + # Once updated to 0.24.3 or above, the workaround can be removed + # and replaced with `yarnpkg cache clean` + # Issues: + # https://github.com/yarnpkg/yarn/issues/2591 + # https://github.com/appveyor/ci/issues/1576 + # https://github.com/facebookincubator/create-react-app/pull/2400 + # When removing workaround, you may run into + # https://github.com/facebookincubator/create-react-app/issues/2030 + case "$(uname -s)" in + *CYGWIN*|MSYS*|MINGW*) yarn=yarn.cmd;; + *) yarn=yarnpkg;; + esac + $yarn cache clean +fi + +if hash npm 2>/dev/null +then + npm cache clean +fi + # Prevent lerna bootstrap, we only want top-level dependencies cp package.json package.json.bak grep -v "lerna bootstrap" package.json > temp && mv temp package.json From bcf398d75bd9b24651f1404e51e45f65917bf0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Miserey?= Date: Mon, 29 May 2017 20:49:57 +0200 Subject: [PATCH 13/15] Fix detection of parent directory in ModuleScopePlugin (#2405) * Fix detection of parent directory * Correct parent directory detection fix Add windows specific path and extend to issuer path --- packages/react-dev-utils/ModuleScopePlugin.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/react-dev-utils/ModuleScopePlugin.js b/packages/react-dev-utils/ModuleScopePlugin.js index fd70a2f408a..adc9bdcba93 100644 --- a/packages/react-dev-utils/ModuleScopePlugin.js +++ b/packages/react-dev-utils/ModuleScopePlugin.js @@ -37,7 +37,10 @@ class ModuleScopePlugin { // Maybe an indexOf === 0 would be better? const relative = path.relative(appSrc, request.context.issuer); // If it's not in src/ or a subdirectory, not our request! - if (relative[0] === '.') { + if ( + relative.startsWith('../') || + relative.startsWith('..\\') + ) { return callback(); } // Find path from src to the requested file @@ -49,7 +52,10 @@ class ModuleScopePlugin { ) ); // Error if in a parent directory of src/ - if (requestRelative[0] === '.') { + if ( + requestRelative.startsWith('../') || + requestRelative.startsWith('..\\') + ) { callback( new Error( `You attempted to import ${chalk.cyan(request.__innerRequest_request)} which falls outside of the project ${chalk.cyan('src/')} directory. ` + From 19c5277593e933a4e2dc8d169182859ff3a8bf1a Mon Sep 17 00:00:00 2001 From: Lufty Wiranda Date: Tue, 30 May 2017 01:50:32 +0700 Subject: [PATCH 14/15] docs: update `jest-enzyme` section (#2392) since CRA now use the latest version of Jest under the hood, `jest-enzyme` v3.2.0 is now working perfectly fine --- packages/react-scripts/template/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index a04686c9ce3..ca2879b9c13 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -1171,10 +1171,10 @@ Additionally, you might find [jest-enzyme](https://github.com/blainekasten/enzym expect(wrapper).toContainReact(welcome) ``` -To setup jest-enzyme with Create React App, follow the instructions for [initializing your test environment](#initializing-test-environment) to import `jest-enzyme`. **Note that currently only version 2.x is compatible with Create React App.** +To setup jest-enzyme with Create React App, follow the instructions for [initializing your test environment](#initializing-test-environment) to import `jest-enzyme`. ```sh -npm install --save-dev jest-enzyme@2.x +npm install --save-dev jest-enzyme ``` ```js From 02f88ba15701f70e613137dd5a3d81caba9d9eb8 Mon Sep 17 00:00:00 2001 From: Marius Wirtherle Date: Tue, 30 May 2017 15:00:16 +0200 Subject: [PATCH 15/15] Add WebStorm >2017 launchEditor Support (#2414) --- packages/react-dev-utils/launchEditor.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/react-dev-utils/launchEditor.js b/packages/react-dev-utils/launchEditor.js index 8bfa3f3dcc9..a1893d13bc8 100644 --- a/packages/react-dev-utils/launchEditor.js +++ b/packages/react-dev-utils/launchEditor.js @@ -72,6 +72,12 @@ function getArgumentsForLineNumber(editor, fileName, lineNumber, workspace) { ['-g', fileName + ':' + lineNumber], workspace ); + case 'webstorm': + case 'webstorm64': + return addWorkspaceToArgumentsIfExists( + ['--line', lineNumber, fileName], + workspace + ); } // For all others, drop the lineNumber until we have