Skip to content

Commit 20c7de5

Browse files
committed
# By Dan Abramov (5) and others # Via Dan Abramov * 'master' of https://github.com/facebookincubator/create-react-app: docs(readme): peer dependencies applied (facebook#818) Fix typos on ISSUE_TEMPLATE.md (facebook#817) Add explicit linebreaks (facebook#813) Fix typo (facebook#810) Fix some typos (facebook#809) Beaufity output of eject.js script (facebook#769) Define process.env as object (facebook#807) Typo fix in webpack.config.dev.js comments (facebook#777) Add Netlify to deploy instructions Fix usage example to match [email protected] API Relaxed eslint rule no-unused-expressions (facebook#724) Fix the doc Publish Add 0.6.1 changelog Moved Babel and ESLint config to package.json after ejecting (facebook#773) Conflicts: packages/react-scripts/package.json
2 parents 0acb5b9 + 94ec885 commit 20c7de5

File tree

17 files changed

+142
-67
lines changed

17 files changed

+142
-67
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## 0.6.1 (September 27, 2016)
2+
3+
### Build Dependency (`react-scripts`)
4+
5+
* Babel and ESLint configuration is now placed into `package.json` after ejecting. ([@montogeek](https://github.com/montogeek) in [#773](https://github.com/facebookincubator/create-react-app/pull/773))
6+
7+
### Utilities (`react-dev-utils`)
8+
9+
* Fixes the syntax error overlay padding. ([@fson](https://github.com/fson) in [#758](https://github.com/facebookincubator/create-react-app/pull/758))
10+
11+
### Migrating from 0.6.0 to 0.6.1
12+
13+
Inside any created project that has not been ejected, run:
14+
15+
```
16+
npm install --save-dev --save-exact [email protected]
17+
```
18+
119
## 0.6.0 (September 25, 2016)
220

321
### Build Dependency (`react-scripts`)

ISSUE_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
If you are reporting a bug, please fill in below. Otherwise feel to remove this template entirely.
1+
If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.
22

33
### Description
44

@@ -31,7 +31,7 @@ Please take the time to create a new app that reproduces the issue.
3131

3232
Alternatively, you could copy your app that experiences the problem and start removing things until you’re left with the minimal reproducible demo.
3333

34-
(Accidentially, you might get to the root of your problem during that process.)
34+
(Accidentally, you might get to the root of your problem during that process.)
3535

3636
Push to GitHub and paste the link here.
3737

packages/babel-preset-react-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The easiest way to use this configuration is with [Create React App](https://git
1212

1313
## Usage Outside of Create React App
1414

15-
If you want to use this ESLint configuration in a project not built with Create React App, you can install it with following steps.
15+
If you want to use this Babel preset in a project not built with Create React App, you can install it with following steps.
1616

1717
First, [install Babel](https://babeljs.io/docs/setup/).
1818

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

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

1919
```sh
20-
npm install --save-dev eslint-config-react-app [email protected] [email protected] [email protected] [email protected] [email protected] eslint-plugin-react@5.2.2
20+
npm install --save-dev eslint-config-react-app [email protected] [email protected] [email protected] [email protected] [email protected] eslint-plugin-react@6.3.0
2121
```
2222

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

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
// Inspired by https://github.com/airbnb/javascript but less opinionated.
1111

12-
// We use eslint-loader so even warnings are very visibile.
12+
// We use eslint-loader so even warnings are very visible.
1313
// This is why we only use "WARNING" level for potential errors,
1414
// and we don't use "ERROR" level at all.
1515

@@ -127,7 +127,10 @@ module.exports = {
127127
'no-undef': 'error',
128128
'no-unexpected-multiline': 'warn',
129129
'no-unreachable': 'warn',
130-
'no-unused-expressions': 'warn',
130+
'no-unused-expressions': ['warn', {
131+
'allowShortCircuit': true,
132+
'allowTernary': true
133+
}],
131134
'no-unused-labels': 'warn',
132135
'no-unused-vars': ['warn', {
133136
vars: 'local',

packages/react-dev-utils/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ clearConsole();
110110
console.log('Just cleared the screen!');
111111
```
112112

113-
#### `formatWebpackMessages(stats: WebpackStats): {errors: Array<string>, warnings: Array<string>}`
113+
#### `formatWebpackMessages({errors: Array<string>, warnings: Array<string>}): {errors: Array<string>, warnings: Array<string>}`
114114

115115
Extracts and prettifies warning and error messages from webpack [stats](https://github.com/webpack/docs/wiki/node.js-api#stats) object.
116116

@@ -125,7 +125,8 @@ compiler.plugin('invalid', function() {
125125
});
126126

127127
compiler.plugin('done', function(stats) {
128-
var messages = formatWebpackMessages(stats);
128+
var rawMessages = stats.toJson({}, true);
129+
var messages = formatWebpackMessages(rawMessages);
129130
if (!messages.errors.length && !messages.warnings.length) {
130131
console.log('Compiled successfully!');
131132
}

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": "0.2.0",
3+
"version": "0.2.1",
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function ensureOverlayDivExists(onOverlayDivReady) {
106106
lastOnOverlayDivReady(overlayDiv);
107107
});
108108

109-
// Zalgo alert: onIframeLoad() will be called either synchronouly
109+
// Zalgo alert: onIframeLoad() will be called either synchronously
110110
// or asynchronously depending on the browser.
111111
// We delay adding it so `overlayIframe` is set when `onIframeLoad` fires.
112112
document.body.appendChild(overlayIframe);

packages/react-scripts/config/env.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,25 @@
1515
var REACT_APP = /^REACT_APP_/i;
1616

1717
function getClientEnvironment(publicUrl) {
18-
return Object
18+
var processEnv = Object
1919
.keys(process.env)
2020
.filter(key => REACT_APP.test(key))
2121
.reduce((env, key) => {
22-
env['process.env.' + key] = JSON.stringify(process.env[key]);
22+
env[key] = JSON.stringify(process.env[key]);
2323
return env;
2424
}, {
2525
// Useful for determining whether we’re running in production mode.
2626
// Most importantly, it switches React into the correct mode.
27-
'process.env.NODE_ENV': JSON.stringify(
27+
'NODE_ENV': JSON.stringify(
2828
process.env.NODE_ENV || 'development'
2929
),
3030
// Useful for resolving the correct path to static assets in `public`.
3131
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
3232
// This should only be used as an escape hatch. Normally you would put
3333
// images into the `src` and `import` them in code to get their paths.
34-
'process.env.PUBLIC_URL': JSON.stringify(publicUrl)
34+
'PUBLIC_URL': JSON.stringify(publicUrl)
3535
});
36+
return {'process.env': processEnv};
3637
}
3738

3839
module.exports = getClientEnvironment;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ var getCustomConfig = require('./get-custom-config');
2626
var publicPath = '/';
2727
// `publicUrl` is just like `publicPath`, but we will provide it to our app
2828
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
29-
// Omit trailing shlash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
29+
// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
3030
var publicUrl = '';
31-
// Get enrivonment variables to inject into our app.
31+
// Get environment variables to inject into our app.
3232
var env = getClientEnvironment(publicUrl);
3333
//Get custom configuration for injecting plugins, presets and loaders
3434
var customConfig = getCustomConfig(false);

0 commit comments

Comments
 (0)