Skip to content

Commit 8a152ae

Browse files
author
matar
committed
* 'master' of https://github.com/facebookincubator/create-react-app: Resolved issue facebook#2971 (facebook#2989) Revert "run npm 5.4.0 in CI (facebook#3026)" (facebook#3107) Updated react-error-overlay to latest Flow (0.54.0) (facebook#3065) Auto-detect running editor on Linux for error overlay (facebook#3077) Clean target directory before compiling overlay (facebook#3102) Rerun prettier and pin version (facebook#3058) Reload the page when an error has occurred (facebook#3098) run npm 5.4.0 in CI (facebook#3026) Unmapper Windows compatibility (facebook#3079) Update eslint-config npm install command (facebook#3072) Set travis config to use 'precise' ci environment Publish Changelog for 1.0.13 Add missing slash Make error overlay filename configurable (facebook#3028) provide empty mock for child_process so importing libraries with it works (facebook#3033) Rename Overlay to ErrorOvelay (facebook#3051) Strip hash from chunk file name (facebook#3049) Fix error overlay 'Object.assign' issue in IE by including polyfills before webpack client (facebook#3046)
2 parents bdc1366 + 206f9e8 commit 8a152ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+315
-189
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
---
2+
# Use Ubuntu Precise instead of new default Trusty which cause build fail
3+
# with pre installed yarn v0.17.8
4+
# https://github.com/facebookincubator/create-react-app/issues/3054
5+
# TODO: remove after Trusty environment is updated with a lastet version of yarn
6+
dist: precise
27
language: node_js
38
node_js:
49
- 6

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
## 1.0.13 (September 2, 2017)
2+
3+
#### :bug: Bug Fix
4+
5+
* `react-error-overlay`
6+
7+
* [#3051](https://github.com/facebookincubator/create-react-app/pull/3051) Fix case-sensitivity issue with upgrading the package version. ([@tharakawj](https://github.com/tharakawj))
8+
9+
* `react-dev-utils`
10+
11+
* [#3049](https://github.com/facebookincubator/create-react-app/pull/3049) Print filesize difference for chunks. ([@esturcke](https://github.com/esturcke))
12+
13+
* `react-scripts`
14+
15+
* [#3046](https://github.com/facebookincubator/create-react-app/pull/3046) Fix crash in development mode on IE11. ([@tharakawj](https://github.com/tharakawj))
16+
17+
#### :nail_care: Enhancement
18+
19+
* `react-scripts`
20+
21+
* [#3033](https://github.com/facebookincubator/create-react-app/pull/3033) Add an empty mock for `child_process` to let some libraries compile. ([@McFlurriez](https://github.com/McFlurriez))
22+
23+
#### :house: Internal
24+
25+
* `react-dev-utils`, `react-error-overlay`
26+
27+
* [#3028](https://github.com/facebookincubator/create-react-app/pull/3028) Make error overlay filename configurable. ([@jaredpalmer](https://github.com/jaredpalmer))
28+
29+
#### Committers: 4
30+
31+
- Anthony ([McFlurriez](https://github.com/McFlurriez))
32+
- Erik J. Sturcke ([esturcke](https://github.com/esturcke))
33+
- Jared Palmer ([jaredpalmer](https://github.com/jaredpalmer))
34+
- Tharaka Wijebandara ([tharakawj](https://github.com/tharakawj))
35+
36+
### Migrating from 1.0.12 to 1.0.13
37+
38+
Inside any created project that has not been ejected, run:
39+
40+
```
41+
npm install --save --save-exact react-scripts@1.0.13
42+
```
43+
44+
or
45+
46+
```
47+
yarn add --exact react-scripts@1.0.13
48+
```
49+
150
## 1.0.12 (August 28, 2017)
251

352
#### :bug: Bug Fix
@@ -62,6 +111,8 @@ or
62111
yarn add --exact react-scripts@1.0.12
63112
```
64113

114+
**Note:** there’s a [known issue](https://github.com/facebookincubator/create-react-app/issues/3041) that might cause the project to not compile after upgrading. In this case, migrate straight to `1.0.13` which doesn’t have this issue.
115+
65116
## 1.0.11 (August 9, 2017)
66117

67118
#### :bug: Bug Fix

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"lerna": "^2.0.0",
2020
"lerna-changelog": "^0.6.0",
2121
"lint-staged": "^3.3.1",
22-
"prettier": "^1.5.2"
22+
"prettier": "1.6.1"
2323
},
2424
"lint-staged": {
2525
"*.js": [

packages/create-react-app/createReactApp.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,9 @@ function checkNpmVersion() {
455455
let hasMinNpm = false;
456456
let npmVersion = null;
457457
try {
458-
npmVersion = execSync('npm --version').toString().trim();
458+
npmVersion = execSync('npm --version')
459+
.toString()
460+
.trim();
459461
hasMinNpm = semver.gte(npmVersion, '3.0.0');
460462
} catch (err) {
461463
// ignore

packages/eslint-config-react-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you want to use this ESLint configuration in a project not built with Create
1919
First, install this package, ESLint and the necessary plugins.
2020

2121
```sh
22-
npm install --save-dev eslint-config-react-app babel-eslint@7.2.3 eslint@3.19.0 eslint-plugin-flowtype@2.33.0 eslint-plugin-import@2.2.0 eslint-plugin-jsx-a11y@5.0.1 eslint-plugin-react@7.0.1
22+
npm install --save-dev eslint-config-react-app babel-eslint@^7.2.3 eslint@^4.1.1 eslint-plugin-flowtype@^2.34.1 eslint-plugin-import@^2.6.0 eslint-plugin-jsx-a11y@^5.1.1 eslint-plugin-react@^7.1.0
2323
```
2424

2525
Then create a file named `.eslintrc` with following contents in the root folder of your project:

packages/react-dev-utils/FileSizeReporter.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ function printFileSizesAfterBuild(
9292
function removeFileNameHash(buildFolder, fileName) {
9393
return fileName
9494
.replace(buildFolder, '')
95-
.replace(/\/?(.*)(\.\w+)(\.js|\.css)/, (match, p1, p2, p3) => p1 + p3);
95+
.replace(
96+
/\/?(.*)(\.[0-9a-f]+)(\.chunk)?(\.js|\.css)/,
97+
(match, p1, p2, p3, p4) => p1 + p4
98+
);
9699
}
97100

98101
// Input: 1024, 2048

packages/react-dev-utils/launchEditor.js

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const COMMON_EDITORS_OSX = {
4343
'/Applications/CLion.app/Contents/MacOS/clion':
4444
'/Applications/CLion.app/Contents/MacOS/clion',
4545
'/Applications/IntelliJ IDEA.app/Contents/MacOS/idea':
46-
'/Applications/IntelliJ IDEA.app/Contents/MacOS/idea',
46+
'/Applications/IntelliJ IDEA.app/Contents/MacOS/idea',
4747
'/Applications/PhpStorm.app/Contents/MacOS/phpstorm':
4848
'/Applications/PhpStorm.app/Contents/MacOS/phpstorm',
4949
'/Applications/PyCharm.app/Contents/MacOS/pycharm':
@@ -53,7 +53,21 @@ const COMMON_EDITORS_OSX = {
5353
'/Applications/RubyMine.app/Contents/MacOS/rubymine':
5454
'/Applications/RubyMine.app/Contents/MacOS/rubymine',
5555
'/Applications/WebStorm.app/Contents/MacOS/webstorm':
56-
'/Applications/WebStorm.app/Contents/MacOS/webstorm',
56+
'/Applications/WebStorm.app/Contents/MacOS/webstorm',
57+
};
58+
59+
const COMMON_EDITORS_LINUX = {
60+
atom: 'atom',
61+
Brackets: 'brackets',
62+
code: 'code',
63+
emacs: 'emacs',
64+
'idea.sh': 'idea',
65+
'phpstorm.sh': 'phpstorm',
66+
'pycharm.sh': 'pycharm',
67+
'rubymine.sh': 'rubymine',
68+
sublime_text: 'sublime_text',
69+
vim: 'vim',
70+
'webstorm.sh': 'webstorm',
5771
};
5872

5973
const COMMON_EDITORS_WIN = [
@@ -144,8 +158,9 @@ function guessEditor() {
144158
return shellQuote.parse(process.env.REACT_EDITOR);
145159
}
146160

147-
// Using `ps x` on OSX or `Get-Process` on Windows we can find out which editor is currently running.
148-
// Potentially we could use similar technique for Linux
161+
// We can find out which editor is currently running by:
162+
// `ps x` on macOS and Linux
163+
// `Get-Process` on Windows
149164
try {
150165
if (process.platform === 'darwin') {
151166
const output = child_process.execSync('ps x').toString();
@@ -176,6 +191,20 @@ function guessEditor() {
176191
return [fullProcessPath];
177192
}
178193
}
194+
} else if (process.platform === 'linux') {
195+
// --no-heading No header line
196+
// x List all processes owned by you
197+
// -o comm Need only names column
198+
const output = child_process
199+
.execSync('ps x --no-heading -o comm --sort=comm')
200+
.toString();
201+
const processNames = Object.keys(COMMON_EDITORS_LINUX);
202+
for (let i = 0; i < processNames.length; i++) {
203+
const processName = processNames[i];
204+
if (output.indexOf(processName) !== -1) {
205+
return [COMMON_EDITORS_LINUX[processName]];
206+
}
207+
}
179208
}
180209
} catch (error) {
181210
// Ignore...

packages/react-dev-utils/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-dev-utils",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "Webpack utilities used by Create React App",
55
"repository": "facebookincubator/create-react-app",
66
"license": "BSD-3-Clause",
@@ -47,7 +47,7 @@
4747
"inquirer": "3.2.1",
4848
"is-root": "1.0.0",
4949
"opn": "5.1.0",
50-
"react-error-overlay": "^2.0.0",
50+
"react-error-overlay": "^2.0.1",
5151
"recursive-readdir": "2.2.1",
5252
"shell-quote": "1.6.1",
5353
"sockjs-client": "1.1.4",

packages/react-dev-utils/webpackHotDevClient.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,19 @@ var launchEditorEndpoint = require('./launchEditorEndpoint');
2525
var formatWebpackMessages = require('./formatWebpackMessages');
2626
var ErrorOverlay = require('react-error-overlay');
2727

28+
// We need to keep track of if there has been a runtime error.
29+
// Essentially, we cannot guarantee application state was not corrupted by the
30+
// runtime error. To prevent confusing behavior, we forcibly reload the entire
31+
// application. This is handled below when we are notified of a compile (code
32+
// change).
33+
// See https://github.com/facebookincubator/create-react-app/issues/3096
34+
var hadRuntimeError = false;
2835
ErrorOverlay.startReportingRuntimeErrors({
2936
launchEditorEndpoint: launchEditorEndpoint,
3037
onError: function() {
31-
// TODO: why do we need this?
32-
if (module.hot && typeof module.hot.decline === 'function') {
33-
module.hot.decline();
34-
}
38+
hadRuntimeError = true;
3539
},
40+
filename: '/static/js/bundle.js',
3641
});
3742

3843
if (module.hot && typeof module.hot.dispose === 'function') {
@@ -226,7 +231,7 @@ function tryApplyUpdates(onHotUpdateSuccess) {
226231
}
227232

228233
function handleApplyUpdates(err, updatedModules) {
229-
if (err || !updatedModules) {
234+
if (err || !updatedModules || hadRuntimeError) {
230235
window.location.reload();
231236
return;
232237
}

packages/react-error-overlay/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "react-error-overlay",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "An overlay for displaying stack frames.",
55
"main": "lib/index.js",
66
"scripts": {
77
"prepublishOnly": "npm run build:prod && npm test",
8-
"start": "cross-env NODE_ENV=development npm run build -- --watch",
8+
"start": "rimraf lib/ && cross-env NODE_ENV=development npm run build -- --watch",
99
"test": "flow && jest",
10-
"build": "babel src/ -d lib/",
11-
"build:prod": "cross-env NODE_ENV=production babel src/ -d lib/"
10+
"build": "rimraf lib/ && babel src/ -d lib/",
11+
"build:prod": "rimraf lib/ && cross-env NODE_ENV=production babel src/ -d lib/"
1212
},
1313
"repository": "facebookincubator/create-react-app",
1414
"license": "BSD-3-Clause",
@@ -51,9 +51,10 @@
5151
"eslint-plugin-import": "2.7.0",
5252
"eslint-plugin-jsx-a11y": "5.1.1",
5353
"eslint-plugin-react": "7.1.0",
54-
"flow-bin": "0.52.0",
54+
"flow-bin": "^0.54.0",
5555
"jest": "20.0.4",
56-
"jest-fetch-mock": "1.2.1"
56+
"jest-fetch-mock": "1.2.1",
57+
"rimraf": "^2.6.1"
5758
},
5859
"jest": {
5960
"setupFiles": [

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy