Skip to content

Commit 5411717

Browse files
committed
Merge branch 'master' into zangrafx
* master: Add WebStorm >2017 launchEditor Support (facebook#2414) docs: update `jest-enzyme` section (facebook#2392) Fix detection of parent directory in ModuleScopePlugin (facebook#2405) Added cache clear to e2e scripts (facebook#2400) Fix kill command in e2e-kitchensink.sh cleanup (facebook#2397) Revert "Catch "No tests found" during CI" (facebook#2390) Fix wrong path expansion in end-to-end test (facebook#2388) Suggest just "yarn build" (facebook#2385) Catch "No tests found" during CI (facebook#2387) Publish Add changelog for 1.0.7 (facebook#2384) Update webpack to 2.6.1 (facebook#2383) Consistently set environment variables (facebook#2382) Disable comparisons feature in uglify compression in production (facebook#2379) Removed the overriding of reduce_vars to false since webpack v2.6.0 included the fixed for Uglify bug (facebook#2351)
2 parents d0fc718 + 0da313f commit 5411717

File tree

15 files changed

+161
-21
lines changed

15 files changed

+161
-21
lines changed

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
## 1.0.7 (May 27, 2017)
2+
3+
#### :bug: Bug Fix
4+
5+
* `react-scripts`
6+
7+
* [#2382](https://github.com/facebookincubator/create-react-app/pull/2382) Consistently set environment variables. ([@gaearon](https://github.com/gaearon))
8+
* [#2379](https://github.com/facebookincubator/create-react-app/pull/2379) Temporarily disable `comparisons` feature in uglify compression. ([@davidascher](https://github.com/davidascher))
9+
10+
#### :nail_care: Enhancement
11+
12+
* `react-scripts`
13+
14+
* [#2383](https://github.com/facebookincubator/create-react-app/pull/2383) Update webpack to 2.6.1. ([@gaearon](https://github.com/gaearon))
15+
* [#2349](https://github.com/facebookincubator/create-react-app/pull/2349) Update webpack to v2.6.0. ([@ingro](https://github.com/ingro))
16+
* [#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))
17+
18+
* `react-dev-utils`, `react-scripts`
19+
20+
* [#2361](https://github.com/facebookincubator/create-react-app/pull/2361) Print file sizes with correct build folder path. ([@fezhengjin](https://github.com/fezhengjin))
21+
22+
#### :memo: Documentation
23+
24+
* `react-scripts`
25+
26+
* [#2372](https://github.com/facebookincubator/create-react-app/pull/2372) Update README.md for `now` deployments. ([@purplecones](https://github.com/purplecones))
27+
* [#2350](https://github.com/facebookincubator/create-react-app/pull/2350) Fix broken links. ([@gaearon](https://github.com/gaearon))
28+
29+
#### Committers: 6
30+
- Dan Abramov ([gaearon](https://github.com/gaearon))
31+
- David Ascher ([davidascher](https://github.com/davidascher))
32+
- Emanuele Ingrosso ([ingro](https://github.com/ingro))
33+
- Jin Zheng ([fezhengjin](https://github.com/fezhengjin))
34+
- Mirza Joldic ([purplecones](https://github.com/purplecones))
35+
- Zac Kwan ([Zaccc123](https://github.com/Zaccc123))
36+
37+
### Migrating from 1.0.6 to 1.0.7
38+
39+
Inside any created project that has not been ejected, run:
40+
41+
```
42+
npm install --save-dev --save-exact [email protected]
43+
```
44+
45+
or
46+
47+
```
48+
yarn add --dev --exact [email protected]
49+
```
50+
151
## 1.0.6 (May 24, 2017)
252

353
#### :bug: Bug Fix

packages/react-dev-utils/ModuleScopePlugin.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ class ModuleScopePlugin {
3737
// Maybe an indexOf === 0 would be better?
3838
const relative = path.relative(appSrc, request.context.issuer);
3939
// If it's not in src/ or a subdirectory, not our request!
40-
if (relative[0] === '.') {
40+
if (
41+
relative.startsWith('../') ||
42+
relative.startsWith('..\\')
43+
) {
4144
return callback();
4245
}
4346
// Find path from src to the requested file
@@ -49,7 +52,10 @@ class ModuleScopePlugin {
4952
)
5053
);
5154
// Error if in a parent directory of src/
52-
if (requestRelative[0] === '.') {
55+
if (
56+
requestRelative.startsWith('../') ||
57+
requestRelative.startsWith('..\\')
58+
) {
5359
callback(
5460
new Error(
5561
`You attempted to import ${chalk.cyan(request.__innerRequest_request)} which falls outside of the project ${chalk.cyan('src/')} directory. ` +

packages/react-dev-utils/WebpackDevServerUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function printInstructions(appName, urls, useYarn) {
107107
console.log('Note that the development build is not optimized.');
108108
console.log(
109109
`To create a production build, use ` +
110-
`${chalk.cyan(`${useYarn ? 'yarn' : 'npm'} run build`)}.`
110+
`${chalk.cyan(`${useYarn ? 'yarn' : 'npm run'} build`)}.`
111111
);
112112
console.log();
113113
}

packages/react-dev-utils/launchEditor.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ function getArgumentsForLineNumber(editor, fileName, lineNumber, workspace) {
7272
['-g', fileName + ':' + lineNumber],
7373
workspace
7474
);
75+
case 'webstorm':
76+
case 'webstorm64':
77+
return addWorkspaceToArgumentsIfExists(
78+
['--line', lineNumber, fileName],
79+
workspace
80+
);
7581
}
7682

7783
// For all others, drop the lineNumber until we have

packages/react-dev-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-dev-utils",
3-
"version": "2.0.1",
3+
"version": "3.0.0",
44
"description": "Webpack utilities used by Create React App",
55
"repository": "facebookincubator/create-react-app",
66
"license": "BSD-3-Clause",

packages/react-error-overlay/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-error-overlay",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "An overlay for displaying stack frames.",
55
"main": "lib/index.js",
66
"scripts": {
@@ -34,7 +34,7 @@
3434
"anser": "1.2.5",
3535
"babel-code-frame": "6.22.0",
3636
"babel-runtime": "6.23.0",
37-
"react-dev-utils": "^2.0.1",
37+
"react-dev-utils": "^3.0.0",
3838
"settle-promise": "1.0.0",
3939
"source-map": "0.5.6"
4040
},

packages/react-scripts/config/webpack.config.prod.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,11 @@ module.exports = {
290290
new webpack.optimize.UglifyJsPlugin({
291291
compress: {
292292
warnings: false,
293-
// This feature has been reported as buggy a few times, such as:
294-
// https://github.com/mishoo/UglifyJS2/issues/1964
295-
// We'll wait with enabling it by default until it is more solid.
296-
reduce_vars: false,
293+
// Disabled because of an issue with Uglify breaking seemingly valid code:
294+
// https://github.com/facebookincubator/create-react-app/issues/2376
295+
// Pending further investigation:
296+
// https://github.com/mishoo/UglifyJS2/issues/2011
297+
comparisons: false,
297298
},
298299
output: {
299300
comments: false,

packages/react-scripts/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scripts",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "Configuration and scripts for Create React App.",
55
"repository": "facebookincubator/create-react-app",
66
"license": "BSD-3-Clause",
@@ -49,12 +49,12 @@
4949
"postcss-flexbugs-fixes": "3.0.0",
5050
"postcss-loader": "2.0.5",
5151
"promise": "7.1.1",
52-
"react-dev-utils": "^2.0.1",
53-
"react-error-overlay": "^1.0.6",
52+
"react-dev-utils": "^3.0.0",
53+
"react-error-overlay": "^1.0.7",
5454
"style-loader": "0.17.0",
5555
"sw-precache-webpack-plugin": "0.9.1",
5656
"url-loader": "0.5.8",
57-
"webpack": "2.6.0",
57+
"webpack": "2.6.1",
5858
"webpack-dev-server": "2.4.5",
5959
"webpack-manifest-plugin": "1.1.0",
6060
"whatwg-fetch": "2.0.3"

packages/react-scripts/scripts/build.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
'use strict';
1212

1313
// Do this as the first thing so that any code reading it knows the right env.
14+
process.env.BABEL_ENV = 'production';
1415
process.env.NODE_ENV = 'production';
1516

1617
// Makes the script crash on unhandled rejections instead of silently

packages/react-scripts/scripts/start.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010
// @remove-on-eject-end
1111
'use strict';
1212

13+
// Do this as the first thing so that any code reading it knows the right env.
14+
process.env.BABEL_ENV = 'development';
15+
process.env.NODE_ENV = 'development';
16+
1317
// Makes the script crash on unhandled rejections instead of silently
1418
// ignoring them. In the future, promise rejections that are not handled will
1519
// terminate the Node.js process with a non-zero exit code.
1620
process.on('unhandledRejection', err => {
1721
throw err;
1822
});
1923

20-
process.env.NODE_ENV = 'development';
21-
2224
// Ensure environment variables are read.
2325
require('../config/env');
2426

0 commit comments

Comments
 (0)