Skip to content

Commit

Permalink
Merge branch 'master' into sparta-webapp
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
mofelee committed Dec 7, 2016
2 parents c6d5c92 + cc1e45f commit f8c88af
Show file tree
Hide file tree
Showing 20 changed files with 496 additions and 76 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ my-app*
template/src/__tests__/__snapshots__/
lerna-debug.log
npm-debug.log
/.changelog
168 changes: 168 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,171 @@
## 0.8.1 (2016-12-04)

#### :bug: Bug Fix
* `react-scripts`
* [#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))

### Migrating from 0.8.0 to 0.8.1

Inside any created project that has not been ejected, run:

```
npm install --save-dev --save-exact react-scripts@0.8.1
```

## 0.8.0 (2016-12-03)

#### :rocket: New Feature
* `react-scripts`
* [#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))

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.

* [#1090](https://github.com/facebookincubator/create-react-app/pull/1090) Enable proxying of WebSockets. ([@dceddia](https://github.com/dceddia))

* `create-react-app`, `react-scripts`
* [#898](https://github.com/facebookincubator/create-react-app/pull/898) Support Yarn. ([@fson](https://github.com/fson))

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.

`react-scripts` now also displays instructions using `yarn` commands for projects using Yarn (projects having a `yarn.lock` file).

To create a project using Yarn, simply install `yarn` and use `create-react-app` like before:
```
npm install -g yarn create-react-app@latest
create-react-app my-app # Packages are now installed with Yarn.
```

#### :boom: Breaking Change
* `babel-preset-react-app`
* [#902](https://github.com/facebookincubator/create-react-app/pull/902) Enable useBuiltIns option on object-rest-spread. ([@existentialism](https://github.com/existentialism))

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)).

**Note:** `react-scripts` already adds this polyfill, so no changes are necessary in Create React App projects.

#### :bug: Bug Fix
* `react-scripts`
* [#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))

Fixes a bug in ejected configuration.

* [#1017](https://github.com/facebookincubator/create-react-app/pull/1017) Don't look for `.babelrc` file during test. ([@nhajidin](https://github.com/nhajidin))

Fixes a `.babelrc` file in a parent directory interfering with the `npm test` command.

* [#951](https://github.com/facebookincubator/create-react-app/pull/951) Check for presence of folders before continuing eject. ([@heldinz](https://github.com/heldinz))

Fixes a bug where `eject` failed when a `scripts` or `config` folder already existed in the project.

* `react-dev-utils`
* [#1035](https://github.com/facebookincubator/create-react-app/pull/1035) Fix Chrome tab reuse. ([@einarlove](https://github.com/einarlove))

Fixes a bug with the app not opening in the existing tab in Chrome.

* [#964](https://github.com/facebookincubator/create-react-app/pull/964) Catch and noop call to open web browser. ([@spadin](https://github.com/spadin))

Not being able to open a browser doesn't crash the development server now.

* `eslint-config-react-app`, `react-scripts`
* [#953](https://github.com/facebookincubator/create-react-app/pull/953) Fix `.ico` file extension being handled by test configuration. ([@vadzim](https://github.com/vadzim))

#### :nail_care: Enhancement
* `react-scripts`
* [#1032](https://github.com/facebookincubator/create-react-app/pull/1032) Add support for non-interactive terminal. ([@sheerun](https://github.com/sheerun))
* [#1078](https://github.com/facebookincubator/create-react-app/pull/1078) Upgrade Jest to 17.0. ([@fson](https://github.com/fson))
* [#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))

`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.

* [#924](https://github.com/facebookincubator/create-react-app/pull/924) Enable JavaScript source maps in development. ([@ekaradon](https://github.com/ekaradon))
* [#1058](https://github.com/facebookincubator/create-react-app/pull/1058) Add missing dev argument in build script message. ([@nhajidin](https://github.com/nhajidin))
* [#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))

The test script now considers all files in the project when calculating test coverage.

* [#968](https://github.com/facebookincubator/create-react-app/pull/968) Enable gzip compression in the development server (#966). ([@frontsideair](https://github.com/frontsideair))
* `react-dev-utils`, `react-scripts`
* [#816](https://github.com/facebookincubator/create-react-app/pull/816) add logging of existing default port process on start. ([@ianmcnally](https://github.com/ianmcnally))

`react-scripts` can guess which process is running on the port 3000 when it's not available:
```
Something is already running on port 3000. Probably:
my-app
in /Users/ian/dev/my-app
Would you like to run the app on another port instead?
```
* `react-dev-utils`
* [#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))

#### :memo: Documentation
* `react-scripts`
* [#1126](https://github.com/facebookincubator/create-react-app/pull/1126) Add a note about vscode-jest. ([@orta](https://github.com/orta))
* [#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))
* [#1071](https://github.com/facebookincubator/create-react-app/pull/1071) Adds to docs - deployment with S3/CloudFront. ([@marcgarreau](https://github.com/marcgarreau))
* [#976](https://github.com/facebookincubator/create-react-app/pull/976) Added info on using global variables. ([@jhorneman](https://github.com/jhorneman))
* [#996](https://github.com/facebookincubator/create-react-app/pull/996) Remove redundant `function` from export statement. ([@gnowoel](https://github.com/gnowoel))
* [#959](https://github.com/facebookincubator/create-react-app/pull/959) Always build before deploying to gh-pages. ([@dsernst](https://github.com/dsernst))
* [#974](https://github.com/facebookincubator/create-react-app/pull/974) Gently nudge users towards https by default. ([@Swizec](https://github.com/Swizec))
* Other
* [#1031](https://github.com/facebookincubator/create-react-app/pull/1031) No Configuration -> Convention over Configuration. ([@sheerun](https://github.com/sheerun))
* [#995](https://github.com/facebookincubator/create-react-app/pull/995) Add Gatsby to alternatives. ([@KyleAMathews](https://github.com/KyleAMathews))

#### :house: Internal
* `react-scripts`
* [#1072](https://github.com/facebookincubator/create-react-app/pull/1072) Replace rimraf with fs-extra functions. ([@existentialism](https://github.com/existentialism))
* [#1068](https://github.com/facebookincubator/create-react-app/pull/1068) Remove bundledDependencies. ([@fson](https://github.com/fson))
* [#1057](https://github.com/facebookincubator/create-react-app/pull/1057) Update `css-loader`. ([@nhajidin](https://github.com/nhajidin))
* [#983](https://github.com/facebookincubator/create-react-app/pull/983) Remove custom babel-loader cache dir config. ([@fson](https://github.com/fson))
* `babel-preset-react-app`
* [#1052](https://github.com/facebookincubator/create-react-app/pull/1052) Remove unnecessary transform plugins for object spread to work. ([@valscion](https://github.com/valscion))
* [#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))
* [#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))

#### Committers: 27
- Adam Stankiewicz ([sheerun](https://github.com/sheerun))
- Alice Rose ([heldinz](https://github.com/heldinz))
- Arunoda Susiripala ([arunoda](https://github.com/arunoda))
- Brian Ng ([existentialism](https://github.com/existentialism))
- Daniel Rech ([dmr](https://github.com/dmr))
- Dave Ceddia ([dceddia](https://github.com/dceddia))
- David Ernst ([dsernst](https://github.com/dsernst))
- Dirk-Jan Rutten ([excitement-engineer](https://github.com/excitement-engineer))
- Einar Löve ([einarlove](https://github.com/einarlove))
- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach))
- Fatih ([frontsideair](https://github.com/frontsideair))
- Ian McNally ([ianmcnally](https://github.com/ianmcnally))
- Jurie Horneman ([jhorneman](https://github.com/jhorneman))
- Kyle Mathews ([KyleAMathews](https://github.com/KyleAMathews))
- Leo Wong ([gnowoel](https://github.com/gnowoel))
- Marc Garreau ([marcgarreau](https://github.com/marcgarreau))
- Nazim Hajidin ([nhajidin](https://github.com/nhajidin))
- Orta ([orta](https://github.com/orta))
- Patrick Mackinder ([pmackcode](https://github.com/pmackcode))
- Sandro Padin ([spadin](https://github.com/spadin))
- Sathish ([bboysathish](https://github.com/bboysathish))
- Stefan ([bebbi](https://github.com/bebbi))
- Swizec Teller ([Swizec](https://github.com/Swizec))
- Vadzim ([vadzim](https://github.com/vadzim))
- Vesa Laakso ([valscion](https://github.com/valscion))
- Ville Immonen ([fson](https://github.com/fson))
- [ekaradon](https://github.com/ekaradon)

### Migrating from 0.7.0 to 0.8.0

You may optionally update the global command (it’s not required, but it adds Yarn support for new projects):

```
npm install -g create-react-app@1.0.0
```

Inside any created project that has not been ejected, run:

```
npm install --save-dev --save-exact react-scripts@0.8.0
```

## 0.7.0 (October 22, 2016)

### Build Dependency (`react-scripts`)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ The [User Guide](https://github.com/facebookincubator/create-react-app/blob/mast
- [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)
- [Running Tests](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)
- [Developing Components in Isolation](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#developing-components-in-isolation)
- [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)
- [Deployment](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#deployment)
- [Troubleshooting](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#troubleshooting)

Expand Down
14 changes: 13 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{
"lerna": "2.0.0-beta.30",
"version": "independent"
"version": "independent",
"changelog": {
"repo": "facebookincubator/create-react-app",
"labels": {
"tag: new feature": ":rocket: New Feature",
"tag: breaking change": ":boom: Breaking Change",
"tag: bug fix": ":bug: Bug Fix",
"tag: enhancement": ":nail_care: Enhancement",
"tag: documentation": ":memo: Documentation",
"tag: internal": ":house: Internal"
},
"cacheDir": ".changelog"
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"private": true,
"scripts": {
"build": "node packages/react-scripts/scripts/build.js",
"changelog": "lerna-changelog",
"create-react-app": "tasks/cra.sh",
"e2e": "tasks/e2e.sh",
"postinstall": "lerna bootstrap",
Expand All @@ -18,6 +19,7 @@
"eslint-plugin-jsx-a11y": "2.2.2",
"eslint-plugin-react": "6.3.0",
"lerna": "2.0.0-beta.30",
"lerna-changelog": "^0.2.3",
"offline-plugin": "^3.4.2"
}
}
62 changes: 35 additions & 27 deletions packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,27 @@
var path = require('path');

const plugins = [
// class { handleClick = () => { } }
require.resolve('babel-plugin-transform-class-properties'),
// The following two plugins use Object.assign directly, instead of Babel's
// extends helper. Note that this assumes `Object.assign` is available.
// { ...todo, completed: true }
[require.resolve('babel-plugin-transform-object-rest-spread'), {
useBuiltIns: true
}],
// Transforms JSX
[require.resolve('babel-plugin-transform-react-jsx'), {
useBuiltIns: true
}],
// function* () { yield 42; yield 43; }
[require.resolve('babel-plugin-transform-regenerator'), {
// Async functions are converted to generators by babel-preset-latest
async: false
}],
// Polyfills the runtime needed for async/await and generators
[require.resolve('babel-plugin-transform-runtime'), {
helpers: false,
polyfill: false,
regenerator: true,
// Resolve the Babel runtime relative to the config.
moduleName: path.dirname(require.resolve('babel-runtime/package'))
}]
];
// class { handleClick = () => { } }
require.resolve('babel-plugin-transform-class-properties'),
// The following two plugins use Object.assign directly, instead of Babel's
// extends helper. Note that this assumes `Object.assign` is available.
// { ...todo, completed: true }
[require.resolve('babel-plugin-transform-object-rest-spread'), {
useBuiltIns: true
}],
// Transforms JSX
[require.resolve('babel-plugin-transform-react-jsx'), {
useBuiltIns: true
}],
// Polyfills the runtime needed for async/await and generators
[require.resolve('babel-plugin-transform-runtime'), {
helpers: false,
polyfill: false,
regenerator: true,
// Resolve the Babel runtime relative to the config.
moduleName: path.dirname(require.resolve('babel-runtime/package'))
}]
];

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

if (env === 'test') {
plugins.push.apply(plugins, [
// We always include this plugin regardless of environment
// because of a Babel bug that breaks object rest/spread without it:
// https://github.com/babel/babel/issues/4851
require.resolve('babel-plugin-transform-es2015-parameters')
]);

module.exports = {
presets: [
// ES features necessary for user's Node version
Expand All @@ -90,7 +92,13 @@ if (env === 'test') {
// JSX, Flow
require.resolve('babel-preset-react')
],
plugins: plugins
plugins: plugins.concat([
// function* () { yield 42; yield 43; }
[require.resolve('babel-plugin-transform-regenerator'), {
// Async functions are converted to generators by babel-preset-latest
async: false
}],
])
};

if (env === 'production') {
Expand Down
3 changes: 2 additions & 1 deletion packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-react-app",
"version": "1.0.0",
"version": "2.0.0",
"description": "Babel preset used by Create React App",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
Expand All @@ -12,6 +12,7 @@
],
"dependencies": {
"babel-plugin-transform-class-properties": "6.16.0",
"babel-plugin-transform-es2015-parameters": "6.18.0",
"babel-plugin-transform-object-rest-spread": "6.19.0",
"babel-plugin-transform-react-constant-elements": "6.9.1",
"babel-plugin-transform-react-jsx": "6.8.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-app",
"version": "0.6.0",
"version": "1.0.0",
"keywords": [
"react"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ module.exports = {
// https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
'react/jsx-equals-spacing': ['warn', 'never'],
'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],
'react/jsx-no-undef': 'warn',
'react/jsx-no-undef': 'error',
'react/jsx-pascal-case': ['warn', {
allowAllCaps: true,
ignore: [],
Expand Down
14 changes: 7 additions & 7 deletions packages/eslint-config-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-react-app",
"version": "0.3.0",
"version": "0.4.0",
"description": "ESLint configuration used by Create React App",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
Expand All @@ -11,11 +11,11 @@
"index.js"
],
"peerDependencies": {
"babel-eslint": "7.0.0",
"eslint": "3.8.1",
"eslint-plugin-flowtype": "2.21.0",
"eslint-plugin-import": "2.0.1",
"eslint-plugin-jsx-a11y": "2.2.3",
"eslint-plugin-react": "6.4.1"
"babel-eslint": "^7.0.0",
"eslint": "^3.8.1",
"eslint-plugin-flowtype": "^2.21.0",
"eslint-plugin-import": "^2.0.1",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.4.1"
}
}
7 changes: 5 additions & 2 deletions packages/react-dev-utils/formatWebpackMessages.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,12 @@ function formatMessage(message) {

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

return message;
Expand Down
Loading

0 comments on commit f8c88af

Please sign in to comment.