Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Commit fc46e5e

Browse files
author
William Monk
committed
2 parents d688c60 + 812658a commit fc46e5e

File tree

9 files changed

+102
-25
lines changed

9 files changed

+102
-25
lines changed

CHANGELOG.md

+57
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,60 @@
1+
## 1.0.4 (May 22, 2017)
2+
3+
#### :bug: Bug Fix
4+
5+
* `react-error-overlay`
6+
* Fix a regression in published package.
7+
8+
### Migrating from 1.0.3 to 1.0.4
9+
10+
Inside any created project that has not been ejected, run:
11+
12+
```
13+
npm install --save-dev --save-exact [email protected]
14+
```
15+
16+
or
17+
18+
```
19+
yarn add --dev --exact [email protected]
20+
```
21+
22+
## 1.0.3 (May 21, 2017)
23+
24+
#### :bug: Bug Fix
25+
26+
* `react-dev-utils`
27+
* [#2297](https://github.com/facebookincubator/create-react-app/pull/2297) Don’t serve the development version from public IPs by default. ([@Timer](https://github.com/Timer))
28+
29+
* `eslint-config-react-app`
30+
* [#2311](https://github.com/facebookincubator/create-react-app/pull/2311) Disable `flowtype/require-valid-file-annotation` lint rule due to false positives. ([@Robdel12](https://github.com/Robdel12))
31+
32+
* `react-dev-utils`, `react-error-overlay`
33+
* [#2301](https://github.com/facebookincubator/create-react-app/pull/2301) Wrap more `console` calls into a check. ([@BrodaNoel](https://github.com/BrodaNoel))
34+
35+
* `react-scripts`
36+
* [#2314](https://github.com/facebookincubator/create-react-app/pull/2314) Fix a "File not found" false positive. ([@gaearon](https://github.com/gaearon))
37+
38+
#### Committers: 4
39+
- Broda Noel ([BrodaNoel](https://github.com/BrodaNoel))
40+
- Dan Abramov ([gaearon](https://github.com/gaearon))
41+
- Joe Haddad ([Timer](https://github.com/Timer))
42+
- Robert DeLuca ([Robdel12](https://github.com/Robdel12))
43+
44+
### Migrating from 1.0.2 to 1.0.3
45+
46+
Inside any created project that has not been ejected, run:
47+
48+
```
49+
npm install --save-dev --save-exact [email protected]
50+
```
51+
52+
or
53+
54+
```
55+
yarn add --dev --exact [email protected]
56+
```
57+
158
## 1.0.2 (May 20, 2017)
259

360
#### :bug: Bug Fix

packages/eslint-config-react-app/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ module.exports = {
282282

283283
// https://github.com/gajus/eslint-plugin-flowtype
284284
'flowtype/define-flow-type': 'warn',
285-
'flowtype/require-valid-file-annotation': 'warn',
285+
// TODO: Reenable once https://github.com/gajus/eslint-plugin-flowtype/issues/165 is fixed
286+
//'flowtype/require-valid-file-annotation': 'warn',
286287
'flowtype/use-flow-type': 'warn',
287288
},
288289
};

packages/eslint-config-react-app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-react-app",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "ESLint configuration used by Create React App",
55
"repository": "facebookincubator/create-react-app",
66
"license": "BSD-3-Clause",

packages/react-dev-utils/WebpackDevServerUtils.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,22 @@ function prepareUrls(protocol, host, port) {
5252
if (isUnspecifiedHost) {
5353
prettyHost = 'localhost';
5454
try {
55+
// This can only return an IPv4 address
5556
lanUrlForConfig = address.ip();
5657
if (lanUrlForConfig) {
57-
lanUrlForTerminal = prettyPrintUrl(lanUrlForConfig);
58+
// Check if the address is a private ip
59+
// https://en.wikipedia.org/wiki/Private_network#Private_IPv4_address_spaces
60+
if (
61+
/^10[.]|^172[.](1[6-9]|2[0-9]|3[0-1])[.]|^192[.]168[.]/.test(
62+
lanUrlForConfig
63+
)
64+
) {
65+
// Address is private, format it for later use
66+
lanUrlForTerminal = prettyPrintUrl(lanUrlForConfig);
67+
} else {
68+
// Address is not private, so we will discard it
69+
lanUrlForConfig = undefined;
70+
}
5871
}
5972
} catch (_e) {
6073
// ignored

packages/react-dev-utils/package.json

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

packages/react-dev-utils/webpackHotDevClient.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ var connection = new SockJS(
172172
// to avoid spamming the console. Disconnect usually happens
173173
// when developer stops the server.
174174
connection.onclose = function() {
175-
if (typeof console !== 'undefined') {
175+
if (typeof console !== 'undefined' && typeof console.info === 'function') {
176176
console.info(
177177
'The development server has disconnected.\nRefresh the page if necessary.'
178178
);
@@ -186,8 +186,8 @@ var hasCompileErrors = false;
186186

187187
function clearOutdatedErrors() {
188188
// Clean up outdated compile errors, if any.
189-
if (typeof console !== 'undefined') {
190-
if (hasCompileErrors && typeof console.clear === 'function') {
189+
if (typeof console !== 'undefined' && typeof console.clear === 'function') {
190+
if (hasCompileErrors) {
191191
console.clear();
192192
}
193193
}
@@ -226,7 +226,7 @@ function handleWarnings(warnings) {
226226
errors: [],
227227
});
228228

229-
if (typeof console !== 'undefined') {
229+
if (typeof console !== 'undefined' && typeof console.warn === 'function') {
230230
for (var i = 0; i < formatted.warnings.length; i++) {
231231
console.warn(stripAnsi(formatted.warnings[i]));
232232
}
@@ -266,7 +266,7 @@ function handleErrors(errors) {
266266
showErrorOverlay(formatted.errors[0]);
267267

268268
// Also log them to the console.
269-
if (typeof console !== 'undefined') {
269+
if (typeof console !== 'undefined' && typeof console.error === 'function') {
270270
for (var i = 0; i < formatted.errors.length; i++) {
271271
console.error(stripAnsi(formatted.errors[i]));
272272
}

packages/react-error-overlay/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-error-overlay",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
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": "^1.0.2",
37+
"react-dev-utils": "^1.0.3",
3838
"settle-promise": "1.0.0",
3939
"source-map": "0.5.6"
4040
},
@@ -44,7 +44,7 @@
4444
"babel-preset-react-app": "^3.0.0",
4545
"cross-env": "5.0.0",
4646
"eslint": "3.19.0",
47-
"eslint-config-react-app": "^1.0.1",
47+
"eslint-config-react-app": "^1.0.2",
4848
"eslint-plugin-flowtype": "2.33.0",
4949
"eslint-plugin-import": "2.2.0",
5050
"eslint-plugin-jsx-a11y": "5.0.1",

packages/react-error-overlay/src/effects/proxyConsole.js

+15-13
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,22 @@ const permanentRegister = function proxyConsole(
5050
) {
5151
if (typeof console !== 'undefined') {
5252
const orig = console[type];
53-
console[type] = function __stack_frame_overlay_proxy_console__() {
54-
try {
55-
const message = arguments[0];
56-
if (typeof message === 'string' && reactFrameStack.length > 0) {
57-
callback(message, reactFrameStack[reactFrameStack.length - 1]);
53+
if (typeof orig === 'function') {
54+
console[type] = function __stack_frame_overlay_proxy_console__() {
55+
try {
56+
const message = arguments[0];
57+
if (typeof message === 'string' && reactFrameStack.length > 0) {
58+
callback(message, reactFrameStack[reactFrameStack.length - 1]);
59+
}
60+
} catch (err) {
61+
// Warnings must never crash. Rethrow with a clean stack.
62+
setTimeout(function() {
63+
throw err;
64+
});
5865
}
59-
} catch (err) {
60-
// Warnings must never crash. Rethrow with a clean stack.
61-
setTimeout(function() {
62-
throw err;
63-
});
64-
}
65-
return orig.apply(this, arguments);
66-
};
66+
return orig.apply(this, arguments);
67+
};
68+
}
6769
}
6870
};
6971

tasks/release.sh

+4
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,9 @@ if [ -n "$(git status --porcelain)" ]; then
4040
fi
4141

4242
cd "$root_path"
43+
# Compile
44+
cd packages/react-error-overlay/
45+
npm run build:prod
46+
cd ../..
4347
# Go!
4448
./node_modules/.bin/lerna publish --independent "$@"

0 commit comments

Comments
 (0)