Skip to content

Commit f8c88af

Browse files
committed
Merge branch 'master' into sparta-webapp
* master: (30 commits) Relax peerDependencies for ESLint preset (facebook#1191) Update Webpack to fix source map issues (facebook#1188) Update webpack prod config (facebook#1181) Chrome 'open tab' reuse an empty tab when possible (facebook#1165) Use file-loader for svgs (facebook#1180) Fix Babel issues in tests by applying the right transforms (facebook#1179) [babel-preset-react-app] Temporary fix missing babel plugins (facebook#1177) Add Subresource Integrity support (facebook#1176) Remove path module from webpack config on eject. (facebook#1175) Don't strip stack traces of evaluated webpack bundles (facebook#1050) Add deploy to Firebase CDN on template's README (Closes facebook#374) (facebook#1143) Update e2e.sh (facebook#1167) Document what npm build does and pushState (facebook#933) Fix minor typo/grammar (facebook#1099) Add "npm run build silently fails" to Troubleshooting (facebook#1168) Add testURL to jest config (facebook#1120) Make jsx-no-undef rule an error (facebook#1159) Update CHANGELOG.md Publish Update changelog for 0.8.1 ...
2 parents c6d5c92 + cc1e45f commit f8c88af

File tree

20 files changed

+496
-76
lines changed

20 files changed

+496
-76
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ my-app*
66
template/src/__tests__/__snapshots__/
77
lerna-debug.log
88
npm-debug.log
9+
/.changelog

CHANGELOG.md

+168
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,171 @@
1+
## 0.8.1 (2016-12-04)
2+
3+
#### :bug: Bug Fix
4+
* `react-scripts`
5+
* [#1149](https://github.com/facebookincubator/create-react-app/pull/1149) Fix incorrectly stubbing JavaScript files with a dot in the import path in tests. ([@fson](https://github.com/fson))
6+
7+
### Migrating from 0.8.0 to 0.8.1
8+
9+
Inside any created project that has not been ejected, run:
10+
11+
```
12+
npm install --save-dev --save-exact [email protected]
13+
```
14+
15+
## 0.8.0 (2016-12-03)
16+
17+
#### :rocket: New Feature
18+
* `react-scripts`
19+
* [#944](https://github.com/facebookincubator/create-react-app/pull/944) Crash the build during CI whenever linter warnings are encountered. ([@excitement-engineer](https://github.com/excitement-engineer))
20+
21+
Linter warnings and errors are now checked during a continuous integration build (set by the `CI` environment variable) and the build will fail if any issues are found. See [Continuous Integration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#continuous-integration) for more information.
22+
23+
* [#1090](https://github.com/facebookincubator/create-react-app/pull/1090) Enable proxying of WebSockets. ([@dceddia](https://github.com/dceddia))
24+
25+
* `create-react-app`, `react-scripts`
26+
* [#898](https://github.com/facebookincubator/create-react-app/pull/898) Support Yarn. ([@fson](https://github.com/fson))
27+
28+
Yarn is a new fast, reliable and secure alternative to the `npm` client. If you have Yarn installed, `create-react-app` will use it to install packages when you create an app. It also creates a `yarn.lock` file that should be checked into source control (e.g. git). This ensures the same versions of packages will be installed each time `yarn install` is run, on any machine.
29+
30+
`react-scripts` now also displays instructions using `yarn` commands for projects using Yarn (projects having a `yarn.lock` file).
31+
32+
To create a project using Yarn, simply install `yarn` and use `create-react-app` like before:
33+
```
34+
npm install -g yarn create-react-app@latest
35+
36+
create-react-app my-app # Packages are now installed with Yarn.
37+
```
38+
39+
#### :boom: Breaking Change
40+
* `babel-preset-react-app`
41+
* [#902](https://github.com/facebookincubator/create-react-app/pull/902) Enable useBuiltIns option on object-rest-spread. ([@existentialism](https://github.com/existentialism))
42+
43+
Object rest spread and JSX now use the native `Object.assign()` method instead of Babel's helper function. If you are using `babel-preset-react-app` directly in your project *and* targeting browsers that don't have `Object.assign()` available, from now on you need a polyfill for it (e.g. [`object-assign`](https://www.npmjs.com/package/object-assign)).
44+
45+
**Note:** `react-scripts` already adds this polyfill, so no changes are necessary in Create React App projects.
46+
47+
#### :bug: Bug Fix
48+
* `react-scripts`
49+
* [#978](https://github.com/facebookincubator/create-react-app/pull/978) Move the remove-on-eject-end tag at the end of the file. ([@EnoahNetzach](https://github.com/EnoahNetzach))
50+
51+
Fixes a bug in ejected configuration.
52+
53+
* [#1017](https://github.com/facebookincubator/create-react-app/pull/1017) Don't look for `.babelrc` file during test. ([@nhajidin](https://github.com/nhajidin))
54+
55+
Fixes a `.babelrc` file in a parent directory interfering with the `npm test` command.
56+
57+
* [#951](https://github.com/facebookincubator/create-react-app/pull/951) Check for presence of folders before continuing eject. ([@heldinz](https://github.com/heldinz))
58+
59+
Fixes a bug where `eject` failed when a `scripts` or `config` folder already existed in the project.
60+
61+
* `react-dev-utils`
62+
* [#1035](https://github.com/facebookincubator/create-react-app/pull/1035) Fix Chrome tab reuse. ([@einarlove](https://github.com/einarlove))
63+
64+
Fixes a bug with the app not opening in the existing tab in Chrome.
65+
66+
* [#964](https://github.com/facebookincubator/create-react-app/pull/964) Catch and noop call to open web browser. ([@spadin](https://github.com/spadin))
67+
68+
Not being able to open a browser doesn't crash the development server now.
69+
70+
* `eslint-config-react-app`, `react-scripts`
71+
* [#953](https://github.com/facebookincubator/create-react-app/pull/953) Fix `.ico` file extension being handled by test configuration. ([@vadzim](https://github.com/vadzim))
72+
73+
#### :nail_care: Enhancement
74+
* `react-scripts`
75+
* [#1032](https://github.com/facebookincubator/create-react-app/pull/1032) Add support for non-interactive terminal. ([@sheerun](https://github.com/sheerun))
76+
* [#1078](https://github.com/facebookincubator/create-react-app/pull/1078) Upgrade Jest to 17.0. ([@fson](https://github.com/fson))
77+
* [#1059](https://github.com/facebookincubator/create-react-app/pull/1059) Use `url-loader` with limit 10k as a default loader. ([@bebbi](https://github.com/bebbi))
78+
79+
`react-scripts` now treats imports with any unknown file extension as a resource. Files with a size below 10 KB are inlined using a data URI and larger files copied to the build folder. This removes the need for an internal [whitelist of supported file extensions](https://github.com/facebookincubator/create-react-app/issues/667). Any file that's not JS or CSS is now handled the same way.
80+
81+
* [#924](https://github.com/facebookincubator/create-react-app/pull/924) Enable JavaScript source maps in development. ([@ekaradon](https://github.com/ekaradon))
82+
* [#1058](https://github.com/facebookincubator/create-react-app/pull/1058) Add missing dev argument in build script message. ([@nhajidin](https://github.com/nhajidin))
83+
* [#961](https://github.com/facebookincubator/create-react-app/pull/961) Add `collectCoverageFrom` option to collect coverage on files without any tests. ([@pmackcode](https://github.com/pmackcode))
84+
85+
The test script now considers all files in the project when calculating test coverage.
86+
87+
* [#968](https://github.com/facebookincubator/create-react-app/pull/968) Enable gzip compression in the development server (#966). ([@frontsideair](https://github.com/frontsideair))
88+
* `react-dev-utils`, `react-scripts`
89+
* [#816](https://github.com/facebookincubator/create-react-app/pull/816) add logging of existing default port process on start. ([@ianmcnally](https://github.com/ianmcnally))
90+
91+
`react-scripts` can guess which process is running on the port 3000 when it's not available:
92+
```
93+
Something is already running on port 3000. Probably:
94+
my-app
95+
in /Users/ian/dev/my-app
96+
97+
Would you like to run the app on another port instead?
98+
```
99+
* `react-dev-utils`
100+
* [#963](https://github.com/facebookincubator/create-react-app/pull/963) Allow webpack 2 as a peerDependency in react-dev-utils. ([@einarlove](https://github.com/einarlove))
101+
102+
#### :memo: Documentation
103+
* `react-scripts`
104+
* [#1126](https://github.com/facebookincubator/create-react-app/pull/1126) Add a note about vscode-jest. ([@orta](https://github.com/orta))
105+
* [#1080](https://github.com/facebookincubator/create-react-app/pull/1080) Add a note for OSX users about watchman and jest. ([@dmr](https://github.com/dmr))
106+
* [#1071](https://github.com/facebookincubator/create-react-app/pull/1071) Adds to docs - deployment with S3/CloudFront. ([@marcgarreau](https://github.com/marcgarreau))
107+
* [#976](https://github.com/facebookincubator/create-react-app/pull/976) Added info on using global variables. ([@jhorneman](https://github.com/jhorneman))
108+
* [#996](https://github.com/facebookincubator/create-react-app/pull/996) Remove redundant `function` from export statement. ([@gnowoel](https://github.com/gnowoel))
109+
* [#959](https://github.com/facebookincubator/create-react-app/pull/959) Always build before deploying to gh-pages. ([@dsernst](https://github.com/dsernst))
110+
* [#974](https://github.com/facebookincubator/create-react-app/pull/974) Gently nudge users towards https by default. ([@Swizec](https://github.com/Swizec))
111+
* Other
112+
* [#1031](https://github.com/facebookincubator/create-react-app/pull/1031) No Configuration -> Convention over Configuration. ([@sheerun](https://github.com/sheerun))
113+
* [#995](https://github.com/facebookincubator/create-react-app/pull/995) Add Gatsby to alternatives. ([@KyleAMathews](https://github.com/KyleAMathews))
114+
115+
#### :house: Internal
116+
* `react-scripts`
117+
* [#1072](https://github.com/facebookincubator/create-react-app/pull/1072) Replace rimraf with fs-extra functions. ([@existentialism](https://github.com/existentialism))
118+
* [#1068](https://github.com/facebookincubator/create-react-app/pull/1068) Remove bundledDependencies. ([@fson](https://github.com/fson))
119+
* [#1057](https://github.com/facebookincubator/create-react-app/pull/1057) Update `css-loader`. ([@nhajidin](https://github.com/nhajidin))
120+
* [#983](https://github.com/facebookincubator/create-react-app/pull/983) Remove custom babel-loader cache dir config. ([@fson](https://github.com/fson))
121+
* `babel-preset-react-app`
122+
* [#1052](https://github.com/facebookincubator/create-react-app/pull/1052) Remove unnecessary transform plugins for object spread to work. ([@valscion](https://github.com/valscion))
123+
* [#992](https://github.com/facebookincubator/create-react-app/pull/992) Explain the usage of react-jsx-source & react-jsx-self. ([@bboysathish](https://github.com/bboysathish))
124+
* [#1051](https://github.com/facebookincubator/create-react-app/pull/1051) Update babel-present-env and use node: 'current' as target. ([@valscion](https://github.com/valscion))
125+
126+
#### Committers: 27
127+
- Adam Stankiewicz ([sheerun](https://github.com/sheerun))
128+
- Alice Rose ([heldinz](https://github.com/heldinz))
129+
- Arunoda Susiripala ([arunoda](https://github.com/arunoda))
130+
- Brian Ng ([existentialism](https://github.com/existentialism))
131+
- Daniel Rech ([dmr](https://github.com/dmr))
132+
- Dave Ceddia ([dceddia](https://github.com/dceddia))
133+
- David Ernst ([dsernst](https://github.com/dsernst))
134+
- Dirk-Jan Rutten ([excitement-engineer](https://github.com/excitement-engineer))
135+
- Einar Löve ([einarlove](https://github.com/einarlove))
136+
- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach))
137+
- Fatih ([frontsideair](https://github.com/frontsideair))
138+
- Ian McNally ([ianmcnally](https://github.com/ianmcnally))
139+
- Jurie Horneman ([jhorneman](https://github.com/jhorneman))
140+
- Kyle Mathews ([KyleAMathews](https://github.com/KyleAMathews))
141+
- Leo Wong ([gnowoel](https://github.com/gnowoel))
142+
- Marc Garreau ([marcgarreau](https://github.com/marcgarreau))
143+
- Nazim Hajidin ([nhajidin](https://github.com/nhajidin))
144+
- Orta ([orta](https://github.com/orta))
145+
- Patrick Mackinder ([pmackcode](https://github.com/pmackcode))
146+
- Sandro Padin ([spadin](https://github.com/spadin))
147+
- Sathish ([bboysathish](https://github.com/bboysathish))
148+
- Stefan ([bebbi](https://github.com/bebbi))
149+
- Swizec Teller ([Swizec](https://github.com/Swizec))
150+
- Vadzim ([vadzim](https://github.com/vadzim))
151+
- Vesa Laakso ([valscion](https://github.com/valscion))
152+
- Ville Immonen ([fson](https://github.com/fson))
153+
- [ekaradon](https://github.com/ekaradon)
154+
155+
### Migrating from 0.7.0 to 0.8.0
156+
157+
You may optionally update the global command (it’s not required, but it adds Yarn support for new projects):
158+
159+
```
160+
npm install -g [email protected]
161+
```
162+
163+
Inside any created project that has not been ejected, run:
164+
165+
```
166+
npm install --save-dev --save-exact [email protected]
167+
```
168+
1169
## 0.7.0 (October 22, 2016)
2170
3171
### Build Dependency (`react-scripts`)

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ The [User Guide](https://github.com/facebookincubator/create-react-app/blob/mast
120120
- [Generating Dynamic `<meta>` Tags on the Server](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#generating-dynamic-meta-tags-on-the-server)
121121
- [Running Tests](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)
122122
- [Developing Components in Isolation](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#developing-components-in-isolation)
123+
- [Making a Progressive Web App](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app)
123124
- [Deployment](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#deployment)
124125
- [Troubleshooting](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#troubleshooting)
125126

lerna.json

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
{
22
"lerna": "2.0.0-beta.30",
3-
"version": "independent"
3+
"version": "independent",
4+
"changelog": {
5+
"repo": "facebookincubator/create-react-app",
6+
"labels": {
7+
"tag: new feature": ":rocket: New Feature",
8+
"tag: breaking change": ":boom: Breaking Change",
9+
"tag: bug fix": ":bug: Bug Fix",
10+
"tag: enhancement": ":nail_care: Enhancement",
11+
"tag: documentation": ":memo: Documentation",
12+
"tag: internal": ":house: Internal"
13+
},
14+
"cacheDir": ".changelog"
15+
}
416
}

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"private": true,
33
"scripts": {
44
"build": "node packages/react-scripts/scripts/build.js",
5+
"changelog": "lerna-changelog",
56
"create-react-app": "tasks/cra.sh",
67
"e2e": "tasks/e2e.sh",
78
"postinstall": "lerna bootstrap",
@@ -18,6 +19,7 @@
1819
"eslint-plugin-jsx-a11y": "2.2.2",
1920
"eslint-plugin-react": "6.3.0",
2021
"lerna": "2.0.0-beta.30",
22+
"lerna-changelog": "^0.2.3",
2123
"offline-plugin": "^3.4.2"
2224
}
2325
}

packages/babel-preset-react-app/index.js

+35-27
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,27 @@
1111
var path = require('path');
1212

1313
const plugins = [
14-
// class { handleClick = () => { } }
15-
require.resolve('babel-plugin-transform-class-properties'),
16-
// The following two plugins use Object.assign directly, instead of Babel's
17-
// extends helper. Note that this assumes `Object.assign` is available.
18-
// { ...todo, completed: true }
19-
[require.resolve('babel-plugin-transform-object-rest-spread'), {
20-
useBuiltIns: true
21-
}],
22-
// Transforms JSX
23-
[require.resolve('babel-plugin-transform-react-jsx'), {
24-
useBuiltIns: true
25-
}],
26-
// function* () { yield 42; yield 43; }
27-
[require.resolve('babel-plugin-transform-regenerator'), {
28-
// Async functions are converted to generators by babel-preset-latest
29-
async: false
30-
}],
31-
// Polyfills the runtime needed for async/await and generators
32-
[require.resolve('babel-plugin-transform-runtime'), {
33-
helpers: false,
34-
polyfill: false,
35-
regenerator: true,
36-
// Resolve the Babel runtime relative to the config.
37-
moduleName: path.dirname(require.resolve('babel-runtime/package'))
38-
}]
39-
];
14+
// class { handleClick = () => { } }
15+
require.resolve('babel-plugin-transform-class-properties'),
16+
// The following two plugins use Object.assign directly, instead of Babel's
17+
// extends helper. Note that this assumes `Object.assign` is available.
18+
// { ...todo, completed: true }
19+
[require.resolve('babel-plugin-transform-object-rest-spread'), {
20+
useBuiltIns: true
21+
}],
22+
// Transforms JSX
23+
[require.resolve('babel-plugin-transform-react-jsx'), {
24+
useBuiltIns: true
25+
}],
26+
// Polyfills the runtime needed for async/await and generators
27+
[require.resolve('babel-plugin-transform-runtime'), {
28+
helpers: false,
29+
polyfill: false,
30+
regenerator: true,
31+
// Resolve the Babel runtime relative to the config.
32+
moduleName: path.dirname(require.resolve('babel-runtime/package'))
33+
}]
34+
];
4035

4136
// This is similar to how `env` works in Babel:
4237
// https://babeljs.io/docs/usage/babelrc/#env-option
@@ -69,6 +64,13 @@ if (env === 'development' || env === 'test') {
6964
}
7065

7166
if (env === 'test') {
67+
plugins.push.apply(plugins, [
68+
// We always include this plugin regardless of environment
69+
// because of a Babel bug that breaks object rest/spread without it:
70+
// https://github.com/babel/babel/issues/4851
71+
require.resolve('babel-plugin-transform-es2015-parameters')
72+
]);
73+
7274
module.exports = {
7375
presets: [
7476
// ES features necessary for user's Node version
@@ -90,7 +92,13 @@ if (env === 'test') {
9092
// JSX, Flow
9193
require.resolve('babel-preset-react')
9294
],
93-
plugins: plugins
95+
plugins: plugins.concat([
96+
// function* () { yield 42; yield 43; }
97+
[require.resolve('babel-plugin-transform-regenerator'), {
98+
// Async functions are converted to generators by babel-preset-latest
99+
async: false
100+
}],
101+
])
94102
};
95103

96104
if (env === 'production') {

packages/babel-preset-react-app/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-preset-react-app",
3-
"version": "1.0.0",
3+
"version": "2.0.0",
44
"description": "Babel preset used by Create React App",
55
"repository": "facebookincubator/create-react-app",
66
"license": "BSD-3-Clause",
@@ -12,6 +12,7 @@
1212
],
1313
"dependencies": {
1414
"babel-plugin-transform-class-properties": "6.16.0",
15+
"babel-plugin-transform-es2015-parameters": "6.18.0",
1516
"babel-plugin-transform-object-rest-spread": "6.19.0",
1617
"babel-plugin-transform-react-constant-elements": "6.9.1",
1718
"babel-plugin-transform-react-jsx": "6.8.0",

packages/create-react-app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-react-app",
3-
"version": "0.6.0",
3+
"version": "1.0.0",
44
"keywords": [
55
"react"
66
],

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ module.exports = {
189189
// https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
190190
'react/jsx-equals-spacing': ['warn', 'never'],
191191
'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],
192-
'react/jsx-no-undef': 'warn',
192+
'react/jsx-no-undef': 'error',
193193
'react/jsx-pascal-case': ['warn', {
194194
allowAllCaps: true,
195195
ignore: [],
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-react-app",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "ESLint configuration used by Create React App",
55
"repository": "facebookincubator/create-react-app",
66
"license": "BSD-3-Clause",
@@ -11,11 +11,11 @@
1111
"index.js"
1212
],
1313
"peerDependencies": {
14-
"babel-eslint": "7.0.0",
15-
"eslint": "3.8.1",
16-
"eslint-plugin-flowtype": "2.21.0",
17-
"eslint-plugin-import": "2.0.1",
18-
"eslint-plugin-jsx-a11y": "2.2.3",
19-
"eslint-plugin-react": "6.4.1"
14+
"babel-eslint": "^7.0.0",
15+
"eslint": "^3.8.1",
16+
"eslint-plugin-flowtype": "^2.21.0",
17+
"eslint-plugin-import": "^2.0.1",
18+
"eslint-plugin-jsx-a11y": "^2.2.3",
19+
"eslint-plugin-react": "^6.4.1"
2020
}
2121
}

packages/react-dev-utils/formatWebpackMessages.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,12 @@ function formatMessage(message) {
101101

102102
// Reassemble the message.
103103
message = lines.join('\n');
104-
// Internal stacks are generally useless so we strip them
104+
// Internal stacks are generally useless so we strip them... with the
105+
// exception of stacks containing `webpack:` because they're normally
106+
// from user code generated by WebPack. For more information see
107+
// https://github.com/facebookincubator/create-react-app/pull/1050
105108
message = message.replace(
106-
/^\s*at\s.*:\d+:\d+[\s\)]*\n/gm, ''
109+
/^\s*at\s((?!webpack:).)*:\d+:\d+[\s\)]*(\n|$)/gm, ''
107110
); // at ... ...:x:y
108111

109112
return message;

0 commit comments

Comments
 (0)