From c7c3a521e2255939786c27f58c019786697bd820 Mon Sep 17 00:00:00 2001 From: Jeffrey Posnick Date: Wed, 17 May 2017 11:28:27 -0700 Subject: [PATCH 01/76] PWA-ification, via SWPrecacheWebpackPlugin + manifest.json (#1728) * sw-precache-webpack-plugin, SW registration, manifest.json * Documentation + a few SW tweaks. * Added an unregister method, too, just in case. * More info for the READMEs. * Add minify to SWPrecacheWebpackPlugin config * Fix SWPrecacheWebpackPlugin typo * Fix file references in READMEmd * Add instructions for testing service-worker locally * Review feedback * Some additional PWA metadata * Use sw-precache-webpack-plugin v0.9.1 for node >=4.0.0 support * Review feedback. * Add manifest.json context in a comment. * Fix typo * Downgrade to sw-precache-webpack-plugin 0.9.1 * Hide changes in README until 1.0 * Hide changes in User Guide until 1.0 * Hide more docs --- README.md | 6 + .../config/webpack.config.prod.js | 14 +++ packages/react-scripts/package.json | 1 + packages/react-scripts/template/README.md | 114 ++++++++++++++++++ .../react-scripts/template/public/index.html | 8 +- .../template/public/manifest.json | 15 +++ packages/react-scripts/template/src/index.js | 3 + .../src/service-worker-registration.js | 38 ++++++ 8 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 packages/react-scripts/template/public/manifest.json create mode 100644 packages/react-scripts/template/src/service-worker-registration.js diff --git a/README.md b/README.md index 4a0eeab567a..e9658d8585c 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,9 @@ It correctly bundles React in production mode and optimizes the build for the be The build is minified and the filenames include the hashes.
Your app is ready to be deployed! + ## User Guide @@ -162,6 +165,9 @@ Please refer to the [User Guide](https://github.com/facebookincubator/create-rea * Import CSS and image files directly from JavaScript. * Autoprefixed CSS, so you don’t need `-webkit` or other prefixes. * A `build` script to bundle JS, CSS, and images for production, with sourcemaps. + **The feature set is intentionally limited**. It doesn’t support advanced features such as server rendering or CSS modules. The tool is also **non-configurable** because it is hard to provide a cohesive experience and easy updates across a set of tools when the user can tweak anything. diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 7df2af07baf..34848a972a3 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -17,6 +17,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ManifestPlugin = require('webpack-manifest-plugin'); const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); +const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin'); const eslintFormatter = require('react-dev-utils/eslintFormatter'); const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); const paths = require('./paths'); @@ -295,6 +296,19 @@ module.exports = { new ManifestPlugin({ fileName: 'asset-manifest.json', }), + // Generate a service worker script that will precache, and keep up to date, + // the HTML & assets that are part of the Webpack build. + new SWPrecacheWebpackPlugin({ + // By default, a cache-busting query parameter is appended to requests + // used to populate the caches, to ensure the responses are fresh. + // If a URL is already hashed by Webpack, then there is no concern + // about it being stale, and the cache-busting can be skipped. + dontCacheBustUrlsMatching: /\.\w{8}\./, + filename: 'service-worker.js', + minify: true, + navigateFallback: publicUrl + '/index.html', + staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/], + }), // Moment.js is an extremely popular library that bundles large locale files // by default due to how Webpack interprets its code. This is a practical // solution that requires the user to opt into importing specific locales. diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index eaab334d4c3..939e40d809f 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -56,6 +56,7 @@ "react-dev-utils": "^1.0.0", "react-error-overlay": "^1.0.0", "style-loader": "0.17.0", + "sw-precache-webpack-plugin": "0.9.1", "url-loader": "0.5.8", "webpack": "2.5.1", "webpack-dev-server": "2.4.5", diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index b25f723c97b..50bbf7b694a 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -61,6 +61,10 @@ You can find the most recent version of this guide [here](https://github.com/fac - [Editor Integration](#editor-integration) - [Developing Components in Isolation](#developing-components-in-isolation) - [Making a Progressive Web App](#making-a-progressive-web-app) + - [Deployment](#deployment) - [Static Server](#static-server) - [Other Solutions](#other-solutions) @@ -1216,6 +1220,103 @@ Learn more about React Storybook: You can turn your React app into a [Progressive Web App](https://developers.google.com/web/progressive-web-apps/) by following the steps in [this repository](https://github.com/jeffposnick/create-react-pwa). + + ## Deployment `npm run build` creates a `build` directory with a production build of your app. Set up your favourite HTTP server so that a visitor to your site is served `index.html`, and requests to static paths like `/static/js/main..js` are served with the contents of the `/static/js/main..js` file. @@ -1291,6 +1392,19 @@ It will get copied to the `build` folder when you run `npm run build`. Now requests to `/todos/42` will be handled correctly both in development and in production. + + ### Building for Relative Paths By default, Create React App produces a build assuming your app is hosted at the server root.
diff --git a/packages/react-scripts/template/public/index.html b/packages/react-scripts/template/public/index.html index 7f3e83f4e43..fc8689a2a29 100644 --- a/packages/react-scripts/template/public/index.html +++ b/packages/react-scripts/template/public/index.html @@ -3,9 +3,15 @@ + + + +Your ([progressive web](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app)) app is ready to be deployed ## User Guide @@ -165,9 +163,7 @@ Please refer to the [User Guide](https://github.com/facebookincubator/create-rea * Import CSS and image files directly from JavaScript. * Autoprefixed CSS, so you don’t need `-webkit` or other prefixes. * A `build` script to bundle JS, CSS, and images for production, with sourcemaps. - **The feature set is intentionally limited**. It doesn’t support advanced features such as server rendering or CSS modules. The tool is also **non-configurable** because it is hard to provide a cohesive experience and easy updates across a set of tools when the user can tweak anything. diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 50bbf7b694a..a55f5876fe8 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -41,6 +41,7 @@ You can find the most recent version of this guide [here](https://github.com/fac - [Node](#node) - [Ruby on Rails](#ruby-on-rails) - [Proxying API Requests in Development](#proxying-api-requests-in-development) + - [Configuring the Proxy Manually](#configuring-the-proxy-manually) - [Using HTTPS in Development](#using-https-in-development) - [Generating Dynamic `` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) - [Pre-Rendering into Static HTML Files](#pre-rendering-into-static-html-files) @@ -61,10 +62,8 @@ You can find the most recent version of this guide [here](https://github.com/fac - [Editor Integration](#editor-integration) - [Developing Components in Isolation](#developing-components-in-isolation) - [Making a Progressive Web App](#making-a-progressive-web-app) - - [Deployment](#deployment) - [Static Server](#static-server) - [Other Solutions](#other-solutions) @@ -212,7 +211,7 @@ To configure the syntax highlighting in your favorite text editor, head to the [ ## Displaying Lint Output in the Editor ->Note: this feature is available with `react-scripts@0.2.0` and higher. +>Note: this feature is available with `react-scripts@0.2.0` and higher.
>It also only works with npm 3 or higher. Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. @@ -331,7 +330,7 @@ Learn more about ES6 modules: ## Adding a Stylesheet -This project setup uses [Webpack](https://webpack.github.io/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: +This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: ### `Button.css` @@ -446,7 +445,7 @@ Then we can change `start` and `build` scripts to include the CSS preprocessor c } ``` -Now running `npm start` and `npm run build` also builds Sass files. +Now running `npm start` and `npm run build` also builds Sass files. **Why `node-sass-chokidar`?** @@ -744,24 +743,23 @@ To define permanent environment variables, create a file called `.env` in the ro REACT_APP_SECRET_CODE=abcdef ``` - - These variables will act as the defaults if the machine does not explicitly set them.
Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details. @@ -833,9 +831,68 @@ Keep in mind that `proxy` only has effect in development (with `npm start`), and The `proxy` option supports HTTP, HTTPS and WebSocket connections.
If the `proxy` option is **not** flexible enough for you, alternatively you can: +* [Configure the proxy yourself](#configuring-the-proxy-manually) * Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). * Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. +### Configuring the Proxy Manually + +>Note: this feature is available with `react-scripts@1.0.0` and higher. + +If the `proxy` option is **not** flexible enough for you, you can specify an object in the following form (in `package.json`).
+You may also specify any configuration value [`http-proxy-middleware`](https://github.com/chimurai/http-proxy-middleware#options) or [`http-proxy`](https://github.com/nodejitsu/node-http-proxy#options) supports. +```js +{ + // ... + "proxy": { + "/api": { + "target": "", + "ws": true + // ... + } + } + // ... +} +``` + +All requests matching this path will be proxies, no exceptions. This includes requests for `text/html`, which the standard `proxy` option does not proxy. + +If you need to specify multiple proxies, you may do so by specifying additional entries. +You may also narrow down matches using `*` and/or `**`, to match the path exactly or any subpath. +```js +{ + // ... + "proxy": { + // Matches any request starting with /api + "/api": { + "target": "", + "ws": true + // ... + }, + // Matches any request starting with /foo + "/foo": { + "target": "", + "ssl": true, + "pathRewrite": { + "^/foo": "/foo/beta" + } + // ... + }, + // Matches /bar/abc.html but not /bar/sub/def.html + "/bar/*.html": { + "target": "", + // ... + }, + // Matches /bar/abc.html and /bar/sub/def.html + "/baz/**/*.html": { + "target": "" + // ... + } + } + // ... +} +``` + ## Using HTTPS in Development >Note: this feature is available with `react-scripts@0.4.0` and higher. @@ -1218,15 +1275,17 @@ Learn more about React Storybook: ## Making a Progressive Web App -You can turn your React app into a [Progressive Web App](https://developers.google.com/web/progressive-web-apps/) by following the steps in [this repository](https://github.com/jeffposnick/create-react-pwa). - - - ## Deployment `npm run build` creates a `build` directory with a production build of your app. Set up your favourite HTTP server so that a visitor to your site is served `index.html`, and requests to static paths like `/static/js/main..js` are served with the contents of the `/static/js/main..js` file. @@ -1392,9 +1448,6 @@ It will get copied to the `build` folder when you run `npm run build`. Now requests to `/todos/42` will be handled correctly both in development and in production. - ### Building for Relative Paths @@ -1675,7 +1727,7 @@ You can adjust various development and production settings by setting environmen Variable | Development | Production | Usage :--- | :---: | :---: | :--- -BROWSER | :white_check_mark: | :x: | By default, Create React App will open the default system browser, favoring Chrome on macOS. Specify a [browser](https://github.com/sindresorhus/opn#app) to override this behavior, or set it to `none` to disable it completely. +BROWSER | :white_check_mark: | :x: | By default, Create React App will open the default system browser, favoring Chrome on macOS. Specify a [browser](https://github.com/sindresorhus/opn#app) to override this behavior, or set it to `none` to disable it completely. If you need to customize the way the browser is launched, you can specify a node script instead. Any arguments passed to `npm start` will also be passed to this script, and the url where your app is served will be the last argument. Your script's file name must have the `.js` extension. HOST | :white_check_mark: | :x: | By default, the development web server binds to `localhost`. You may use this variable to specify a different host. PORT | :white_check_mark: | :x: | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port. HTTPS | :white_check_mark: | :x: | When set to `true`, Create React App will run the development server in `https` mode. @@ -1691,7 +1743,7 @@ If this doesn’t happen, try one of the following workarounds: * If your project is in a Dropbox folder, try moving it out. * If the watcher doesn’t see a file called `index.js` and you’re referencing it by the folder name, you [need to restart the watcher](https://github.com/facebookincubator/create-react-app/issues/1164) due to a Webpack bug. -* Some editors like Vim and IntelliJ have a “safe write” feature that currently breaks the watcher. You will need to disable it. Follow the instructions in [“Working with editors supporting safe write”](https://webpack.github.io/docs/webpack-dev-server.html#working-with-editors-ides-supporting-safe-write). +* Some editors like Vim and IntelliJ have a “safe write” feature that currently breaks the watcher. You will need to disable it. Follow the instructions in [“Adjusting Your Text Editor”](https://webpack.js.org/guides/development/#adjusting-your-text-editor). * If your project path contains parentheses, try moving the project to a path without them. This is caused by a [Webpack watcher bug](https://github.com/webpack/watchpack/issues/42). * On Linux and macOS, you might need to [tweak system settings](https://webpack.github.io/docs/troubleshooting.html#not-enough-watchers) to allow more watchers. * If the project runs inside a virtual machine such as (a Vagrant provisioned) VirtualBox, create an `.env` file in your project directory if it doesn’t exist, and add `CHOKIDAR_USEPOLLING=true` to it. This ensures that the next time you run `npm start`, the watcher uses the polling mode, as necessary inside a VM. From 54ea47815a0799ae42fa33ab422cb2196cd40b0e Mon Sep 17 00:00:00 2001 From: Tharaka Wijebandara Date: Fri, 19 May 2017 09:35:18 +0530 Subject: [PATCH 20/76] Add documentation about using code splitting (#1801) * Add documentation about using code splitting * Revise docs a bit * Update README.md * Update README.md * Update README.md --- README.md | 1 + packages/eslint-config-react-app/index.js | 4 +- packages/react-scripts/template/README.md | 49 +++++++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 892987c91e9..286a0cf7993 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ The [User Guide](https://github.com/facebookincubator/create-react-app/blob/mast - [Changing the Page ``](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#changing-the-page-title) - [Installing a Dependency](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#installing-a-dependency) - [Importing a Component](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#importing-a-component) +- [Code Splitting](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting) - [Adding a Stylesheet](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-stylesheet) - [Post-Processing CSS](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#post-processing-css) - [Adding a CSS Preprocessor (Sass, Less etc.)](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc) diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index 42aa9db2cb0..16338976818 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -225,12 +225,12 @@ module.exports = { // { // object: 'require', // property: 'ensure', - // message: 'Please use import() instead. More info: https://webpack.js.org/guides/code-splitting-import/#dynamic-import', + // message: 'Please use import() instead. More info: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting', // }, { object: 'System', property: 'import', - message: 'Please use import() instead. More info: https://webpack.js.org/guides/code-splitting-import/#dynamic-import', + message: 'Please use import() instead. More info: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting', }, ], diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index a55f5876fe8..37528831f87 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -20,6 +20,7 @@ You can find the most recent version of this guide [here](https://github.com/fac - [Changing the Page `<title>`](#changing-the-page-title) - [Installing a Dependency](#installing-a-dependency) - [Importing a Component](#importing-a-component) +- [Code Splitting](#code-splitting) - [Adding a Stylesheet](#adding-a-stylesheet) - [Post-Processing CSS](#post-processing-css) - [Adding a CSS Preprocessor (Sass, Less etc.)](#adding-a-css-preprocessor-sass-less-etc) @@ -190,6 +191,7 @@ In addition to [ES6](https://github.com/lukehoban/es6features) syntax features, * [Exponentiation Operator](https://github.com/rwaldron/exponentiation-operator) (ES2016). * [Async/await](https://github.com/tc39/ecmascript-asyncawait) (ES2017). * [Object Rest/Spread Properties](https://github.com/sebmarkbage/ecmascript-rest-spread) (stage 3 proposal). +* [Dynamic import()](https://github.com/tc39/proposal-dynamic-import) (stage 3 proposal) * [Class Fields and Static Properties](https://github.com/tc39/proposal-class-public-fields) (stage 2 proposal). * [JSX](https://facebook.github.io/react/docs/introducing-jsx.html) and [Flow](https://flowtype.org/) syntax. @@ -328,6 +330,53 @@ Learn more about ES6 modules: * [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html) * [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules) +## Code Splitting + +Instead of downloading the entire app before users can use it, code splitting allows you to split your code into small chunks which you can then load on demand. + +This project setup supports code splitting via [dynamic `import()`](http://2ality.com/2017/01/import-operator.html#loading-code-on-demand). Its [proposal](https://github.com/tc39/proposal-dynamic-import) is in stage 3. The `import()` function-like form takes the module name as an argument and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which always resolves to the namespace object of the module. + +Here is an example: + +### `moduleA.js` + +```js +const moduleA = 'Hello'; + +export { moduleA }; +``` +### `App.js` + +```js +import React, { Component } from 'react'; + +class App extends Component { + handleClick = () => { + import('./moduleA') + .then(({ moduleA }) => { + // Use moduleA + }) + .catch(err => { + // Handle failure + }); + }; + + render() { + return ( + <div> + <button onClick={this.handleClick}>Load</button> + </div> + ); + } +} + +export default App; +``` + +This will make `moduleA.js` and all its unique dependencies as a separate chunk that only loads after the user clicks the 'Load' button. + +You can also use it with `async` / `await` syntax if you prefer it. + ## Adding a Stylesheet This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: From a5e88cdb08a7069a1ef2f563a46fc043a4f8a5c5 Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Fri, 19 May 2017 05:30:20 +0100 Subject: [PATCH 21/76] Swap changelogs (#2222) * Swap changelogs * Update and rename CHANGELOG.md to CHANGELOG-0.x.md * Update and rename CHANGELOG-1.x.md to CHANGELOG.md * Update CHANGELOG.md --- CHANGELOG-0.x.md | 1374 ++++++++++++++++++++++++++++++++++++++++ CHANGELOG.md | 1568 +++++++++------------------------------------- 2 files changed, 1655 insertions(+), 1287 deletions(-) create mode 100644 CHANGELOG-0.x.md diff --git a/CHANGELOG-0.x.md b/CHANGELOG-0.x.md new file mode 100644 index 00000000000..9614986ff7c --- /dev/null +++ b/CHANGELOG-0.x.md @@ -0,0 +1,1374 @@ +## 1.0.0 and Newer Versions + +**Please refer to [CHANGELOG.md](./CHANGELOG.md) for the newer versions.** + +## 0.9.5 (March 9, 2017) + +#### :bug: Bug Fix + +* `react-scripts` + + * [#1783](https://github.com/facebookincubator/create-react-app/pull/1783) **Work around Node 7.7.2 bug that crashes `npm start`.** ([@ryanwalters](https://github.com/ryanwalters)) + +#### :nail_care: Enhancement + +* `eslint-config-react-app` + + * [#1773](https://github.com/facebookincubator/create-react-app/pull/1773) Remove `guard-for-in` lint rule. ([@spicyj](https://github.com/spicyj)) + +* `react-scripts` + * [#1760](https://github.com/facebookincubator/create-react-app/pull/1760) Suggest `serve` for running in production. ([@leo](https://github.com/leo)) + * [#1747](https://github.com/facebookincubator/create-react-app/pull/1747) Display `yarn` instead of `yarnpkg` when creating a new app. ([@lpalmes](https://github.com/lpalmes)) + +#### :memo: Documentation + +* `react-scripts` + + * [#1756](https://github.com/facebookincubator/create-react-app/pull/1756) Add Yarn steps for adding Flow. ([@zertosh](https://github.com/zertosh)) + +#### :house: Internal + +* `babel-preset-react-app` + + * [#1742](https://github.com/facebookincubator/create-react-app/pull/1742) Switch to `babel-preset-env` to remove the deprecation warning. ([@Timer](https://github.com/Timer)) + +#### Committers: 6 +- Andres Suarez ([zertosh](https://github.com/zertosh)) +- Ben Alpert ([spicyj](https://github.com/spicyj)) +- Joe Haddad ([Timer](https://github.com/Timer)) +- Leo Lamprecht ([leo](https://github.com/leo)) +- Lorenzo Palmes ([lpalmes](https://github.com/lpalmes)) +- Ryan Walters ([ryanwalters](https://github.com/ryanwalters)) + +### Migrating from 0.9.4 to 0.9.5 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.9.5 +``` + +## 0.9.4 (March 6, 2017) + +#### :bug: Bug Fix +* `create-react-app` + + * [#1706](https://github.com/facebookincubator/create-react-app/pull/1706) Extract compressed package for package name. ([@Timer](https://github.com/Timer)) + + You may now specify a scoped package for `--scripts-version` and obtain a working installation. + + * [#1695](https://github.com/facebookincubator/create-react-app/pull/1695) Print why installation was aborted. ([@tgig](https://github.com/tgig)) + +* `react-scripts` + + * [#1727](https://github.com/facebookincubator/create-react-app/pull/1727) Fix ejecting from a scoped fork. ([@gaearon](https://github.com/gaearon)) + + Ejecting now works within a scoped fork. + + * [#1721](https://github.com/facebookincubator/create-react-app/pull/1721) Fix hot reloading for WebpackDevServer after eject. ([@gaearon](https://github.com/gaearon)) + +* `react-dev-utils` + + * [#1690](https://github.com/facebookincubator/create-react-app/pull/1690) Fix `openBrowser()` when `BROWSER=open` on macOS. ([@bpierre](https://github.com/bpierre)) + + * [#1696](https://github.com/facebookincubator/create-react-app/pull/1696) Improve reliability of port detection. ([@chrisdrackett](https://github.com/chrisdrackett)) + +#### :nail_care: Enhancement +* `eslint-config-react-app`, `react-scripts` + + * [#1705](https://github.com/facebookincubator/create-react-app/pull/1705) Add support for `ignoreRestSiblings` in `no-unused-vars`. ([@chrisdrackett](https://github.com/chrisdrackett)) + + Linter no longer warns when using rest properties to remove variables from an object. + + * [#1542](https://github.com/facebookincubator/create-react-app/pull/1542) Bump `jsx-a11y` version. ([@bondz](https://github.com/bondz)) + +* `react-dev-utils`, `react-scripts` + + * [#1726](https://github.com/facebookincubator/create-react-app/pull/1726) Extract generic build functions into `react-dev-utils`. ([@viankakrisna](https://github.com/viankakrisna)) + +* Other + + * [#1402](https://github.com/facebookincubator/create-react-app/pull/1402) Stub `package.json` for e2e test. ([@matoilic](https://github.com/matoilic)) + +#### :memo: Documentation +* `react-scripts` + * [#1710](https://github.com/facebookincubator/create-react-app/pull/1710) Update now.sh deployment instructions. ([@replaid](https://github.com/replaid)) + * [#1717](https://github.com/facebookincubator/create-react-app/pull/1717) Add docs for Apache client side routing. ([@viankakrisna](https://github.com/viankakrisna)) + * [#1698](https://github.com/facebookincubator/create-react-app/pull/1698) Suggest to use `.env` for enabling polling mode. ([@gaearon](https://github.com/gaearon)) + * [#1687](https://github.com/facebookincubator/create-react-app/pull/1687) Fixed missing `--recursive` flag in first `npm run watch-css` command. ([@mklemme](https://github.com/mklemme)) + +#### :house: Internal +* `react-scripts` + * [#1736](https://github.com/facebookincubator/create-react-app/pull/1736) Fix eject for linked react-scripts. ([@tuchk4](https://github.com/tuchk4)) + * [#1741](https://github.com/facebookincubator/create-react-app/pull/1741) Fix internal linting setup. ([@gaearon](https://github.com/gaearon)) + * [#1730](https://github.com/facebookincubator/create-react-app/pull/1730) Fix Node 4 e2e tests. ([@Timer](https://github.com/Timer)) +* `eslint-config-react-app` + * [#1740](https://github.com/facebookincubator/create-react-app/pull/1740) Relax ESLint config peerDependency. ([@gaearon](https://github.com/gaearon)) +* `eslint-config-react-app`, `react-dev-utils`, `react-scripts` + * [#1729](https://github.com/facebookincubator/create-react-app/pull/1729) Lint internal scripts with `eslint:recommended`. ([@gaearon](https://github.com/gaearon)) +* `react-dev-utils` + * [#1724](https://github.com/facebookincubator/create-react-app/pull/1724) Don't use ES6 in a file that should run on Node 4. ([@gaearon](https://github.com/gaearon)) +* Other + * [#1723](https://github.com/facebookincubator/create-react-app/pull/1723) Skip AppVeyor CI builds for Markdown changes. ([@gaearon](https://github.com/gaearon)) + * [#1707](https://github.com/facebookincubator/create-react-app/pull/1707) Add double quotes to escape spaces in paths in e2e. ([@viankakrisna](https://github.com/viankakrisna)) + * [#1688](https://github.com/facebookincubator/create-react-app/pull/1688) Upgrade `lerna` version. ([@viankakrisna](https://github.com/viankakrisna)) + +#### Committers: 11 +- Ade Viankakrisna Fadlil ([viankakrisna](https://github.com/viankakrisna)) +- Bond ([bondz](https://github.com/bondz)) +- Chris Drackett ([chrisdrackett](https://github.com/chrisdrackett)) +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- Joe Haddad ([Timer](https://github.com/Timer)) +- Mato Ilic ([matoilic](https://github.com/matoilic)) +- Myk Klemme ([mklemme](https://github.com/mklemme)) +- Pierre Bertet ([bpierre](https://github.com/bpierre)) +- Ryan Platte ([replaid](https://github.com/replaid)) +- Travis Giggy ([tgig](https://github.com/tgig)) +- Valerii Sorokobatko ([tuchk4](https://github.com/tuchk4)) + +### Migrating from 0.9.3 to 0.9.4 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.9.4 +``` + +You may also optionally update the global command-line utility for scoped package support: + +``` +npm install -g create-react-app@1.3.0 +``` + +## 0.9.3 (February 28, 2017) + +#### :rocket: New Feature +* `create-react-app` + * [#1423](https://github.com/facebookincubator/create-react-app/pull/1423) **Fall back to Yarn offline cache when creating a new project.** ([@voxsim](https://github.com/voxsim)) + + If you are using Yarn, and you have created at least one app previously, Create React App now works offline. + + <img src="http://i.imgur.com/1FLa9Tg.gif" width="500" alt="Yarn offline installation demo"> + +#### :bug: Bug Fix + +* `react-scripts` + + * [#1665](https://github.com/facebookincubator/create-react-app/pull/1665) Temporarily disable ESLint caching because of a bug. ([@gaearon](https://github.com/gaearon)) + +* `create-react-app` + * [#1675](https://github.com/facebookincubator/create-react-app/pull/1675) Delete project folder on failed installation on Windows. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) + * [#1662](https://github.com/facebookincubator/create-react-app/pull/1662) Validate project name before creating a project. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) + * [#1669](https://github.com/facebookincubator/create-react-app/pull/1669) Make sure React dependencies aren’t pinned in new projects. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) + +#### :nail_care: Enhancement +* `react-scripts` + + * [#1677](https://github.com/facebookincubator/create-react-app/pull/1677) Add `X-FORWARDED` headers for proxy requests. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) + +#### :memo: Documentation +* `react-scripts` + + * [#1657](https://github.com/facebookincubator/create-react-app/pull/1657) Tweak the Visual Studio Code debugging guide. ([@ryansully](https://github.com/ryansully)) + +#### :house: Internal +* End-to-end Tests + + * [#1648](https://github.com/facebookincubator/create-react-app/pull/1648) Add Windows CI tests for better stability. ([@Timer](https://github.com/Timer)) + +#### Committers: 5 +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- Joe Haddad ([Timer](https://github.com/Timer)) +- Johann Hubert Sonntagbauer ([johann-sonntagbauer](https://github.com/johann-sonntagbauer)) +- Ryan Sullivan ([ryansully](https://github.com/ryansully)) +- Simon Vocella ([voxsim](https://github.com/voxsim)) + +### Migrating from 0.9.2 to 0.9.3 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.9.3 +``` + +You may also optionally update the global command-line utility for offline Yarn cache support: + +``` +npm install -g create-react-app@1.2.1 +``` + +## 0.9.2 (February 26, 2017) + +#### :nail_care: Enhancement + +* `create-react-app` + * [#1253](https://github.com/facebookincubator/create-react-app/pull/1253) **Install time optimization.** ([@n3tr](https://github.com/n3tr)) + + React, ReactDOM, and `react-scripts` are now installed in the same install instead of two different installs. This reduces app creation time by a noticeable amount. + + * [#1512](https://github.com/facebookincubator/create-react-app/pull/1512) **Graceful error handling.** ([@chitchu](https://github.com/chitchu)) + + If an error occurs while `create-react-app` is running, it will now clean up and not leave a broken project to reduce confusion. + + * [#1193](https://github.com/facebookincubator/create-react-app/pull/1193) Suggest upgrading to NPM >= 3 for faster install times. ([@mobinni](https://github.com/mobinni)) + + * [#1603](https://github.com/facebookincubator/create-react-app/pull/1603) Allow app creation in a WebStorm project. ([@driquelme](https://github.com/driquelme)) + + * [#1570](https://github.com/facebookincubator/create-react-app/pull/1570) Allow git urls in `--scripts-version`. ([@tomconroy](https://github.com/tomconroy)) + +* `react-scripts` + * [#1578](https://github.com/facebookincubator/create-react-app/pull/1578) Enable lint caching in development. ([@viankakrisna](https://github.com/viankakrisna)) + + * [#1478](https://github.com/facebookincubator/create-react-app/pull/1478) Update the build script message to show the correct port. ([@chyipin](https://github.com/chyipin)) + + * [#1567](https://github.com/facebookincubator/create-react-app/pull/1567) Remove .bin files after eject. ([@tuchk4](https://github.com/tuchk4)) + + * [#1560](https://github.com/facebookincubator/create-react-app/pull/1560) Bump `recursive-readdir`. ([@wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg)) + +#### :bug: Bug Fix +* `react-scripts` + + * [#1635](https://github.com/facebookincubator/create-react-app/pull/1635) **Fix Jest configuration.** ([@Timer](https://github.com/Timer)) + + Fixes ejecting on Windows for macOS and Linux machines. + + * [#1356](https://github.com/facebookincubator/create-react-app/pull/1356) Fix workflow if react-scripts package is linked via npm-link. ([@tuchk4](https://github.com/tuchk4)) + + Advanced users may opt to fork `react-scripts` instead of ejecting so they still receive upstream updates.<br> + `react-scripts` will now function as expected when linking to a development version.<br> + Previously, you could not test changes with an existing application via linking. + + * [#1585](https://github.com/facebookincubator/create-react-app/pull/1585) Ensure PORT environment variable is an integer. ([@matoilic](https://github.com/matoilic)) + + * [#1628](https://github.com/facebookincubator/create-react-app/pull/1628) Show correct port for pushstate-server URL text. ([@mattccrampton](https://github.com/mattccrampton)) + + * [#1647](https://github.com/facebookincubator/create-react-app/pull/1647) Fix `npm test` on Windows ([@gaearon](https://github.com/gaearon)) + + +#### :memo: Documentation +* User Guides + * [#1391](https://github.com/facebookincubator/create-react-app/pull/1391) Add note how to resolve missing required files for Heroku. ([@sbritoig](https://github.com/sbritoig)) + * [#1577](https://github.com/facebookincubator/create-react-app/pull/1577) Add a how-to on `react-snapshot`. ([@superhighfives](https://github.com/superhighfives)) + * [#1121](https://github.com/facebookincubator/create-react-app/pull/1121) Add documentation for customizing Bootstrap theme. ([@myappincome](https://github.com/myappincome)) + * [#1540](https://github.com/facebookincubator/create-react-app/pull/1540) Document debugging in Visual Studio Code. ([@bondz](https://github.com/bondz)) + * [#1618](https://github.com/facebookincubator/create-react-app/pull/1618) Add note about when to import Bootstrap CSS. ([@joewoodhouse](https://github.com/joewoodhouse)) + * [#1518](https://github.com/facebookincubator/create-react-app/pull/1518) Update flow configuration documentation. ([@SBrown52](https://github.com/SBrown52)) + * [#1625](https://github.com/facebookincubator/create-react-app/pull/1625) Specify that NODE_ENV is set to 'production' during the build step. ([@mderazon](https://github.com/mderazon)) + * [#1573](https://github.com/facebookincubator/create-react-app/pull/1573) Update Jest documentation links. ([@mkermani144](https://github.com/mkermani144)) + * [#1564](https://github.com/facebookincubator/create-react-app/pull/1564) Add --recursive to Sass watch script. ([@aleburato](https://github.com/aleburato)) + * [#1561](https://github.com/facebookincubator/create-react-app/pull/1561) Use https in link in documentation. ([@dariocravero](https://github.com/dariocravero)) + * [#1562](https://github.com/facebookincubator/create-react-app/pull/1562) Update `jest-enzyme` documentation. ([@kiranps](https://github.com/kiranps)) + * [#1543](https://github.com/facebookincubator/create-react-app/pull/1543) Update CSS preprocessor instructions. ([@aleburato](https://github.com/aleburato)) + * [#1338](https://github.com/facebookincubator/create-react-app/pull/1338) Add link to Azure deployment tutorial. ([@tpetrina](https://github.com/tpetrina)) + * [#1320](https://github.com/facebookincubator/create-react-app/pull/1320) Document how to disable autoprefix feature. ([@rrubas](https://github.com/rrubas)) + * [#1313](https://github.com/facebookincubator/create-react-app/pull/1313) List features beyond ES6 supported by create-react-app. ([@jonathanconway](https://github.com/jonathanconway)) + * [#1008](https://github.com/facebookincubator/create-react-app/pull/1008) Add Saas support documentation. ([@tsironis](https://github.com/tsironis)) + * [#994](https://github.com/facebookincubator/create-react-app/pull/994) Suggest `jest-enzyme` for simplifying test matchers. ([@blainekasten](https://github.com/blainekasten)) + * [#1608](https://github.com/facebookincubator/create-react-app/pull/1608) Add note for using CHOKIDAR_USEPOLLING in virtual machines to enable HMR. ([@AJamesPhillips](https://github.com/AJamesPhillips)) + * [#1495](https://github.com/facebookincubator/create-react-app/pull/1495) Add useful link to react-scripts. ([@pd4d10](https://github.com/pd4d10)) +* READMEs + * [#1576](https://github.com/facebookincubator/create-react-app/pull/1576) Switch from Neo to Neutrino. ([@eliperelman](https://github.com/eliperelman)) + * [#1275](https://github.com/facebookincubator/create-react-app/pull/1275) Suggest yarn commands in addition to npm. ([@lifez](https://github.com/lifez)) + +#### :house: Internal +* `babel-preset-react-app` + * [#1598](https://github.com/facebookincubator/create-react-app/pull/1598) Remove redundant babel-plugin-transform-es2015-parameters. ([@christophehurpeau](https://github.com/christophehurpeau)) +* Other + * [#1534](https://github.com/facebookincubator/create-react-app/pull/1534) Use yarn@latest in e2e. ([@gaearon](https://github.com/gaearon)) + * [#1295](https://github.com/facebookincubator/create-react-app/pull/1295) Make node version check more robust in e2e. ([@pugnascotia](https://github.com/pugnascotia)) + * [#1503](https://github.com/facebookincubator/create-react-app/pull/1503) Fix `test -e` in e2e. ([@igetgames](https://github.com/igetgames)) + +#### Committers: 36 +- Ade Viankakrisna Fadlil ([viankakrisna](https://github.com/viankakrisna)) +- Alessandro Burato ([aleburato](https://github.com/aleburato)) +- Alexander James Phillips ([AJamesPhillips](https://github.com/AJamesPhillips)) +- Blaine Kasten ([blainekasten](https://github.com/blainekasten)) +- Bond ([bondz](https://github.com/bondz)) +- Charlie Gleason ([superhighfives](https://github.com/superhighfives)) +- Christophe Hurpeau ([christophehurpeau](https://github.com/christophehurpeau)) +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- Daniel Riquelme ([driquelme](https://github.com/driquelme)) +- Darío Javier Cravero ([dariocravero](https://github.com/dariocravero)) +- Dimitris Tsironis ([tsironis](https://github.com/tsironis)) +- Eli Perelman ([eliperelman](https://github.com/eliperelman)) +- Jirat Ki. ([n3tr](https://github.com/n3tr)) +- Joe Haddad ([Timer](https://github.com/Timer)) +- Joe Woodhouse ([joewoodhouse](https://github.com/joewoodhouse)) +- Jonathan Conway ([jonathanconway](https://github.com/jonathanconway)) +- Marcus R. Brown ([igetgames](https://github.com/igetgames)) +- Mato Ilic ([matoilic](https://github.com/matoilic)) +- Matt Crampton ([mattccrampton](https://github.com/mattccrampton)) +- Michael DeRazon ([mderazon](https://github.com/mderazon)) +- Mo Binni ([mobinni](https://github.com/mobinni)) +- Mohammad Kermani ([mkermani144](https://github.com/mkermani144)) +- Phawin Khongkhasawan ([lifez](https://github.com/lifez)) +- Roman Rubas ([rrubas](https://github.com/rrubas)) +- Rory Hunter ([pugnascotia](https://github.com/pugnascotia)) +- Tom Conroy ([tomconroy](https://github.com/tomconroy)) +- Toni Petrina ([tpetrina](https://github.com/tpetrina)) +- Valerii Sorokobatko ([tuchk4](https://github.com/tuchk4)) +- Vicente Jr Yuchitcho ([chitchu](https://github.com/chitchu)) +- [SBrown52](https://github.com/SBrown52) +- [chyipin](https://github.com/chyipin) +- [myappincome](https://github.com/myappincome) +- [sbritoig](https://github.com/sbritoig) +- [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) +- kiran ps ([kiranps](https://github.com/kiranps)) +- pd4d10 ([pd4d10](https://github.com/pd4d10)) + +### Migrating from 0.9.0 to 0.9.2 + +**Note:** 0.9.1 had known issues so you should skip it. + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.9.2 +``` + +You may also optionally update the global command-line utility for more efficient installs (thanks [@n3tr](https://github.com/n3tr)): + +``` +npm install -g create-react-app@1.1.0 +``` + +## <s>0.9.1 (February 25, 2017)</s> + +This release has known issues and you should skip it. Update directly to 0.9.2 instead. + +## 0.9.0 (February 11, 2017) + +Thanks to [@Timer](https://github.com/timer) for cutting this release. + +#### :rocket: New Feature + +* `react-scripts` + + * [#1489](https://github.com/facebookincubator/create-react-app/pull/1489) Support setting `"homepage"` to `"."` to generate relative asset paths. ([@tibdex](https://github.com/tibdex)) + + Applications that don’t use the HTML5 `pushState` API can now be built to be served from any relative URL. To enable this, specify `"."` as your `homepage` setting in `package.json`. It used to be possible before with a few known bugs, but they should be fixed now. See [Serving the Same Build from Different Paths](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#serving-the-same-build-from-different-paths). + + * [#937](https://github.com/facebookincubator/create-react-app/pull/1504) Add `PUBLIC_URL` environment variable for advanced use. ([@EnoahNetzach](https://github.com/EnoahNetzach)) + + If you use a CDN to serve the app, you can now specify `PUBLIC_URL` environment variable to override the base URL (including the hostname) for resources referenced from the built code. This new variable is mentioned in the new [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration) section. + + * [#1440](https://github.com/facebookincubator/create-react-app/pull/1440) Make all `REACT_APP_*` environment variables accessible in `index.html`. ([@jihchi](https://github.com/jihchi)) + + This makes all environment variables previously available in JS, also available in the HTML file, for example `%REACT_APP_MY_VARIABLE%`. See [Referencing Environment Variables in HTML](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#referencing-environment-variables-in-the-html). + +* `react-dev-utils` + + * [#1148](https://github.com/facebookincubator/create-react-app/pull/1148) Configure which browser to open with `npm start`. ([@GAumala](https://github.com/GAumala)) + + You can now disable the automatic browser launching by setting the `BROWSER` environment variable to `none`. You can also specify a different browser (or an arbitrary script) to open by default, [as supported by `opn` command](https://github.com/sindresorhus/opn#app) that we use under the hood. See [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration). + +#### :boom: Breaking Change + +* `react-scripts` + + * [#1522](https://github.com/facebookincubator/create-react-app/pull/1522) Upgrade dependencies. ([@Timer](https://github.com/Timer)) + * [#1432](https://github.com/facebookincubator/create-react-app/pull/1432) Bump Jest version. ([@gaearon](https://github.com/gaearon)) + * [#1311](https://github.com/facebookincubator/create-react-app/pull/1311) Updated `babel-jest` and `jest` packages to 18.0.0. ([@lopezator](https://github.com/lopezator)) + + Jest has been updated to 18 and has introduced some [breaking changes and new features](https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html). + +* `react-scripts`, `react-dev-utils` + + * [#1264](https://github.com/facebookincubator/create-react-app/pull/1264) Remove interactive shell check when opening browser on start. ([@CaryLandholt](https://github.com/CaryLandholt)) + + Non-interactive terminals no longer automatically disable launching of the browser. Instead, you need to [specify `none` as `BROWSER` environment variable](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration) if you wish to disable it. + +#### :bug: Bug Fix + +* `react-scripts` + + * [#1441](https://github.com/facebookincubator/create-react-app/pull/1441) Added `babel-runtime` dependency to deduplicate dependencies when using Yarn. ([@jkimbo](https://github.com/jkimbo)) + + This works around a bug in Yarn that caused newly created projects to be over 400MB. Now they are down to 126MB, just like with npm 3. + + * [#1522](https://github.com/facebookincubator/create-react-app/pull/1522) Upgrade dependencies. ([@Timer](https://github.com/Timer)) + * [#1458](https://github.com/facebookincubator/create-react-app/pull/1458) Additionally remove `react-scripts` from dependencies on eject. ([@creynders](https://github.com/creynders)) + * [#1309](https://github.com/facebookincubator/create-react-app/pull/1309) Bump `babel-loader` version (#1009). ([@frontsideair](https://github.com/frontsideair)) + * [#1267](https://github.com/facebookincubator/create-react-app/pull/1267) Only gitignore directories in root, not deep. ([@jayphelps](https://github.com/jayphelps)) + +* `react-dev-utils` + + * [#1377](https://github.com/facebookincubator/create-react-app/pull/1377) webpack-dev-server patch for 'still-ok' success status. ([@TheBlackBolt](https://github.com/TheBlackBolt)) + * [#1274](https://github.com/facebookincubator/create-react-app/pull/1274) Downgrading to compatible version of SockJS-Client. ([@holloway](https://github.com/holloway)) + * [#1247](https://github.com/facebookincubator/create-react-app/pull/1247) Only open Chrome tab if BROWSER is missing or is Chrome. ([@gaearon](https://github.com/gaearon)) + +#### :nail_care: Enhancement + +* `react-scripts` + + * [#1496](https://github.com/facebookincubator/create-react-app/pull/1496) Make build exit with error code when interrupted. ([@brandones](https://github.com/brandones)) + * [#1352](https://github.com/facebookincubator/create-react-app/pull/1352) More descriptive error message for `env.CI = true` warnings causing failures. ([@jayphelps](https://github.com/jayphelps)) + * [#1264](https://github.com/facebookincubator/create-react-app/pull/1264) Remove interactive shell check when opening browser on start. ([@CaryLandholt](https://github.com/CaryLandholt)) + * [#1311](https://github.com/facebookincubator/create-react-app/pull/1311) Updated `babel-jest` and `jest` packages to 18.0.0. ([@lopezator](https://github.com/lopezator)) + * [#1432](https://github.com/facebookincubator/create-react-app/pull/1432) Bump Jest version. ([@gaearon](https://github.com/gaearon)) + * [#1507](https://github.com/facebookincubator/create-react-app/pull/1507) fix: add yarn gitignores. ([@adjohnson916](https://github.com/adjohnson916)) + * [#1510](https://github.com/facebookincubator/create-react-app/pull/1510) Add missing `'\n'` to the end of `package.json` file. ([@pd4d10](https://github.com/pd4d10)) + * [#1324](https://github.com/facebookincubator/create-react-app/pull/1324) Use npm script hooks to avoid `&&` in deploy script. ([@zpao](https://github.com/zpao)) + +* `create-react-app` + + * [#1270](https://github.com/facebookincubator/create-react-app/pull/1270) gh-1269: Enabling nested folder paths for project name. ([@dinukadesilva](https://github.com/dinukadesilva)) + + +#### :memo: Documentation + +* User Guide + + * [#1515](https://github.com/facebookincubator/create-react-app/pull/1515) readme: Advanced Configuration. ([@Timer](https://github.com/Timer)) + * [#1513](https://github.com/facebookincubator/create-react-app/pull/1513) clarifying the use of custom environment variables. ([@calweb](https://github.com/calweb)) + * [#1511](https://github.com/facebookincubator/create-react-app/pull/1511) Change "OS X" references to "macOS". ([@RodrigoHahn](https://github.com/RodrigoHahn)) + * [#1482](https://github.com/facebookincubator/create-react-app/pull/1482) Edit User Guide: Add ESLint config for VS Code users. ([@vulong23](https://github.com/vulong23)) + * [#1483](https://github.com/facebookincubator/create-react-app/pull/1483) Reflect websocket proxy support on README (#1013). ([@frontsideair](https://github.com/frontsideair)) + * [#1453](https://github.com/facebookincubator/create-react-app/pull/1453) Readme: Removes experimental from Jest snapshot. ([@frehner](https://github.com/frehner)) + * [#1437](https://github.com/facebookincubator/create-react-app/pull/1437) Added links to tutorials for integrating cra with an api backend. ([@alexdriaguine](https://github.com/alexdriaguine)) + * [#1422](https://github.com/facebookincubator/create-react-app/pull/1422) Add causes of dev server not detecting changes. ([@jetpackpony](https://github.com/jetpackpony)) + * [#1260](https://github.com/facebookincubator/create-react-app/pull/1260) Heroku Deployment: Adds a note on how to resolve "File/Module Not Found Errors" . ([@MsUzoAgu](https://github.com/MsUzoAgu)) + * [#1256](https://github.com/facebookincubator/create-react-app/pull/1256) Add "Changing the Page Title" to User Guide. ([@gaearon](https://github.com/gaearon)) + * [#1245](https://github.com/facebookincubator/create-react-app/pull/1245) Replace the Flow documentation section. ([@gaearon](https://github.com/gaearon)) + * [#1514](https://github.com/facebookincubator/create-react-app/pull/1514) corrected minor typo. ([@crowchirp](https://github.com/crowchirp)) + * [#1393](https://github.com/facebookincubator/create-react-app/pull/1393) replace two space syntax with br tag. ([@carlsagan21](https://github.com/carlsagan21)) + * [#1384](https://github.com/facebookincubator/create-react-app/pull/1384) Document Flow support. ([@dschep](https://github.com/dschep)) + +* READMEs + + * [#1375](https://github.com/facebookincubator/create-react-app/pull/1375) Change console.log for errors and warnings. ([@jimmyhmiller](https://github.com/jimmyhmiller)) + * [#1369](https://github.com/facebookincubator/create-react-app/pull/1369) Add missing import in react-dev-utils README.md. ([@pedronauck](https://github.com/pedronauck)) + +#### :house: Internal + +* Internal Test Suite + + * [#1519](https://github.com/facebookincubator/create-react-app/pull/1519) Add test cases for PUBLIC_URL and relative path. ([@Timer](https://github.com/Timer)) + * [#1484](https://github.com/facebookincubator/create-react-app/pull/1484) Improve e2e-kitchensink and Jest coverage. ([@Timer](https://github.com/Timer)) + * [#1463](https://github.com/facebookincubator/create-react-app/pull/1463) Minor code style and wrong expect. ([@tuchk4](https://github.com/tuchk4)) + * [#1470](https://github.com/facebookincubator/create-react-app/pull/1470) E2e jsdom fix. ([@EnoahNetzach](https://github.com/EnoahNetzach)) + * [#1187](https://github.com/facebookincubator/create-react-app/pull/1187) Use a more sophisticated template for end-to-end testing.. ([@EnoahNetzach](https://github.com/EnoahNetzach)) + +* Other + + * [#1289](https://github.com/facebookincubator/create-react-app/pull/1289) Remove path-exists from dependencies and replace it with fs.existsSync. ([@halfzebra](https://github.com/halfzebra)) + +#### Committers: 35 +- Alex Driaguine ([alexdriaguine](https://github.com/alexdriaguine)) +- Anders D. Johnson ([adjohnson916](https://github.com/adjohnson916)) +- Anthony F. ([frehner](https://github.com/frehner)) +- Brandon Istenes ([brandones](https://github.com/brandones)) +- Calvin Webster ([calweb](https://github.com/calweb)) +- Cary Landholt ([CaryLandholt](https://github.com/CaryLandholt)) +- Chandan Rai ([crowchirp](https://github.com/crowchirp)) +- Christian Raidl ([Chris-R3](https://github.com/Chris-R3)) +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- Daniel Schep ([dschep](https://github.com/dschep)) +- David ([lopezator](https://github.com/lopezator)) +- Dinuka De Silva ([dinukadesilva](https://github.com/dinukadesilva)) +- Eduard Kyvenko ([halfzebra](https://github.com/halfzebra)) +- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach)) +- Fatih ([frontsideair](https://github.com/frontsideair)) +- Gabriel Aumala ([GAumala](https://github.com/GAumala)) +- Jay Phelps ([jayphelps](https://github.com/jayphelps)) +- Jih-Chi Lee ([jihchi](https://github.com/jihchi)) +- Jimmy Miller ([jimmyhmiller](https://github.com/jimmyhmiller)) +- Joe Haddad ([Timer](https://github.com/Timer)) +- Johnny Magrippis ([jmagrippis](https://github.com/jmagrippis)) +- Jonathan Kim ([jkimbo](https://github.com/jkimbo)) +- MUA ([MsUzoAgu](https://github.com/MsUzoAgu)) +- Matthew Holloway ([holloway](https://github.com/holloway)) +- Nguyen Le Vu Long ([vulong23](https://github.com/vulong23)) +- Paul O’Shannessy ([zpao](https://github.com/zpao)) +- Pedro Nauck ([pedronauck](https://github.com/pedronauck)) +- Robbie H ([TheBlackBolt](https://github.com/TheBlackBolt)) +- Thibault Derousseaux ([tibdex](https://github.com/tibdex)) +- Valerii ([tuchk4](https://github.com/tuchk4)) +- Vasiliy Taranov ([jetpackpony](https://github.com/jetpackpony)) +- [RodrigoHahn](https://github.com/RodrigoHahn) +- creynders ([creynders](https://github.com/creynders)) +- pd4d10 ([pd4d10](https://github.com/pd4d10)) +- soo ([carlsagan21](https://github.com/carlsagan21)) + +### Migrating from 0.8.5 to 0.9.0 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.9.0 +``` + +Then, run your tests. If you are affected by breaking changes from Jest 18, consult [blog post](https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html), [changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md#jest-1800), and [documentation](http://facebook.github.io/jest/docs/getting-started.html). You might need to update any snapshots since their format might have changed. + +If you relied on the browser not starting in non-interactive terminals, you now need to explicitly specify `BROWSER=none` as an environment variable to disable it. + +## 0.8.5 (January 9, 2017) + +Thanks to [@fson](https://github.com/fson) for cutting this release. + +#### :bug: Bug Fix +* `create-react-app`, `react-scripts` + * [#1365](https://github.com/facebookincubator/create-react-app/pull/1365) Use yarnpkg alias to run Yarn. ([@fson](https://github.com/fson)) + + Fixes an issue where running `create-react-app` failed on systems with Apache Hadoop installed because it falsely detected Hadoop YARN executable as Yarn package manager. + +#### Committers: 1 +- Ville Immonen ([fson](https://github.com/fson)) + +### Migrating from 0.8.4 to 0.8.5 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.8.5 +``` + +You may also optionally update the global command-line utility: + +``` +npm install -g create-react-app@1.0.3 +``` + +## 0.8.4 (December 11, 2016) + +#### :bug: Bug Fix +* `react-scripts` + + * [#1233](https://github.com/facebookincubator/create-react-app/pull/1233) Disable subresource integrity temporarily. ([@Timer](https://github.com/Timer)) + + We added [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) checks to the build output in 0.8.2 but it turns out that they may fail in browsers using special compression proxies, such as Chrome on Android, when served over HTTP. We disabled the checks until we can find a safe way to add them. + +* `react-dev-utils` + + * [#1226](https://github.com/facebookincubator/create-react-app/pull/1226) Fix weird lint output. ([@n3tr](https://github.com/n3tr)) + + Fixes strange lint message formatting in some edge cases. + + * [#1215](https://github.com/facebookincubator/create-react-app/pull/1215) Fix - openChrome won't open default browser (using Canary). ([@n3tr](https://github.com/n3tr)) + + Fixes a regression that caused stable Google Chrome to be opened even if you are using Canary as the default browser. + +* `create-react-app` + + * [#1223](https://github.com/facebookincubator/create-react-app/pull/1223) Clean up Yarn detection and install code. ([@fson](https://github.com/fson)) + + Fixes noisy output on Windows when Yarn is not installed. + + * [#1224](https://github.com/facebookincubator/create-react-app/pull/1224) Exit with an error code when npm/yarn install fails. ([@fson](https://github.com/fson)) + +#### :nail_care: Enhancement +* `react-scripts` + + * [#1237](https://github.com/facebookincubator/create-react-app/pull/1237) Clear scrollback in test mode. ([@gaearon](https://github.com/gaearon)) + + Ensures test watcher clears the console before running. + + * [#1229](https://github.com/facebookincubator/create-react-app/pull/1229) Disable jest watch mode when --coverage flag is present [#1207]. ([@BenoitAverty](https://github.com/BenoitAverty)) + + Since coverage doesn't work well with watch mode, we don’t run the watcher on `npm test -- --coverage` anymore. + + * [#1212](https://github.com/facebookincubator/create-react-app/pull/1212) Proxy rewrites Origin header to match the target server URL. ([@koles](https://github.com/koles)) + + Makes sure more API endpoints can work with the `proxy` setting. + + * [#1222](https://github.com/facebookincubator/create-react-app/pull/1222) Disable gh-page setup instruction if scripts.deploy has been added. ([@n3tr](https://github.com/n3tr)) + + Suppresses the instructions printed at the end of `npm run build` if `npm run deploy` already exists. + +* `create-react-app` + + * [#1236](https://github.com/facebookincubator/create-react-app/pull/1236) Tweak console messages. ([@gaearon](https://github.com/gaearon)) + + Makes error messages more friendly. + + * [#1195](https://github.com/facebookincubator/create-react-app/pull/1195) Use "commander" for cli argv handling. ([@EnoahNetzach](https://github.com/EnoahNetzach)) + + Adds `create-react-app --help` with a list of options. + +* `react-dev-utils` + + * [#1211](https://github.com/facebookincubator/create-react-app/pull/1211) Use a better clear console sequence. ([@gaearon](https://github.com/gaearon)) + + Ensures the development server clears the terminal when files are changed. + +#### :memo: Documentation +* `react-dev-utils` + + * [#1232](https://github.com/facebookincubator/create-react-app/pull/1232) [documentation] fix html-dev-plugin link in react-dev-utils doc. ([@shogunsea](https://github.com/shogunsea)) + +* `react-scripts` + + * [#1220](https://github.com/facebookincubator/create-react-app/pull/1220) Adding troubleshooting information about Subresource Integrity digests.. ([@dfbaskin](https://github.com/dfbaskin)) + +#### :house: Internal +* `react-scripts` + + * [#1214](https://github.com/facebookincubator/create-react-app/pull/1214) Bump babel-eslint version. ([@existentialism](https://github.com/existentialism)) + +#### Committers: 10 +- Benoit Averty ([BenoitAverty](https://github.com/BenoitAverty)) +- Brian Ng ([existentialism](https://github.com/existentialism)) +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- Dave Baskin ([dfbaskin](https://github.com/dfbaskin)) +- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach)) +- Jirat Ki. ([n3tr](https://github.com/n3tr)) +- Joe Haddad ([Timer](https://github.com/Timer)) +- Pavel Kolesnikov ([koles](https://github.com/koles)) +- Shogun Sea ([shogunsea](https://github.com/shogunsea)) +- Ville Immonen ([fson](https://github.com/fson)) + +### Migrating from 0.8.3 to 0.8.4 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.8.4 +``` + +You may also optionally update the global command-line utility: + +``` +npm install -g create-react-app@1.0.2 +``` + +## 0.8.3 (December 8, 2016) + +#### :bug: Bug Fix +* `create-react-app` + * [#1204](https://github.com/facebookincubator/create-react-app/pull/1204) Catch synchronous errors from spawning yarn. ([@gaearon](https://github.com/gaearon)) + + Fixes a crash when running `create-react-app` in some cases. + +* `react-scripts` + * [#1203](https://github.com/facebookincubator/create-react-app/pull/1203) Update webpack-subresource-integrity to fix Windows builds. ([@gaearon](https://github.com/gaearon)) + + Fixes a crash when running `npm run build` on Windows. + + * [#1201](https://github.com/facebookincubator/create-react-app/pull/1201) Instruct Jest to load native components from RNW instead of RN. ([@remon-georgy](https://github.com/remon-georgy)) + + Fixes tests for users of React Native Web. + +#### :memo: Documentation +* `react-scripts` + + * [#806](https://github.com/facebookincubator/create-react-app/pull/806) Add syntax highlighting configuration guide. ([@mareksuscak](https://github.com/mareksuscak)) + +#### Committers: 3 +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- Marek Suscak ([mareksuscak](https://github.com/mareksuscak)) +- Remon Georgy ([remon-georgy](https://github.com/remon-georgy)) + +### Migrating from 0.8.2 to 0.8.3 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.8.3 +``` + +You can optionally update the global CLI too: + +``` +npm install -g create-react-app@1.0.1 +``` + +## 0.8.2 (December 7, 2016) + +#### :rocket: New Feature +* `react-scripts` + * [#1176](https://github.com/facebookincubator/create-react-app/pull/1176) Add Subresource Integrity support. ([@XVincentX](https://github.com/XVincentX)) + + The generated HTML now includes [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) attributes ensuring that your users aren't served malicious code if your CDN gets compromised. + +#### :bug: Bug Fix +* `react-scripts` + * [#1197](https://github.com/facebookincubator/create-react-app/pull/1197) Let Jest handle all file types. ([@gaearon](https://github.com/gaearon)) + + Since 0.8.0, we started treating imports of any unknown file extensions as URLs. However, we had to revert this change for the test configuration in 0.8.1 because of a bug causing false positives. In 0.8.2, we are fixing this and making test configuration treat imports with unknown extensions the same way as we do in the browser environment. + + * [#1194](https://github.com/facebookincubator/create-react-app/pull/1194) Only honor relative `NODE_PATH`. ([@gaearon](https://github.com/gaearon)) + + Historically we have allowed specifying `NODE_PATH` environment variable as a way to allow “absolute imports”. For example, running `NODE_PATH=src npm start` in Bash or `set NODE_PATH=src&&npm start` in Windows Cmd would let you import anything inside `src` without specifying a relative path. However, we found a few nasty edge cases when Node.js core modules end up being in `NODE_PATH` and erroneously become bundled. As a result the build would crash on some systems when some libraries are imported. To fix this, we now only honor relative paths from `NODE_PATH` in Create React App. This means the existing use case for absolute imports is still supported (`src` in the example above is relative), but absolute paths in `NODE_PATH` (such as paths to Node.js core modules) will be ignored. + + * [#1188](https://github.com/facebookincubator/create-react-app/pull/1188) Update Webpack to fix source map issues. ([@gaearon](https://github.com/gaearon)) + + Since 0.8.0, we show source maps in development instead of the compiled code. However, it has come to our attention that Webpack's source map implementation had issues interpreting Babel output, and caused source maps to be wrong and breakpoints to be unusable in some cases. Webpack has released a fix for this, and we have updated the minimal version of Webpack that we are using. + + * [#1180](https://github.com/facebookincubator/create-react-app/pull/1180) Use `file-loader` for svgs. ([@bogdansoare](https://github.com/bogdansoare)) + + Since 0.8.0, we are treating all imports with non-JS/CSS extensions the same way. Importing them gives you a string with their URL, and if their content is small enough (less than 10K), the URL is in fact an inlined [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs). However, this doesn't work well with SVGs in case you use them for a sprite system since fragments don't work in data URIs, and it's wasteful to inline the same sprite SVG many times. To fix this, we have added an exception so that SVG files never get inlined. + +* `react-dev-utils` + * [#1165](https://github.com/facebookincubator/create-react-app/pull/1165) Chrome 'open tab' reuse an empty tab when possible. ([@n3tr](https://github.com/n3tr)) + + Fixes an issue that caused two tabs to get opened instead of just one. It also fixes some cases where the window with the existing tab would not get activated. + +* `babel-preset-react-app` + * [#1179](https://github.com/facebookincubator/create-react-app/pull/1179) Fix Babel issues in tests by applying the right transforms. ([@gaearon](https://github.com/gaearon)) + + Fixes regressions in test environment that caused syntax errors with generators and `async` / `await`. + +#### :nail_care: Enhancement +* `eslint-config-react-app` + * [#1191](https://github.com/facebookincubator/create-react-app/pull/1191) Relax peerDependencies for ESLint preset. ([@gaearon](https://github.com/gaearon)) + + This allows the preset to be used in more apps without peer dependency conflicts. We still pin the exact versions in apps that haven't ejected for extra safety. + + * [#1159](https://github.com/facebookincubator/create-react-app/pull/1159) Make jsx-no-undef rule an error. ([@existentialism](https://github.com/existentialism)) + + Using an undefined type in JSX is now treated as a hard lint error because it is guaranteed to crash application at runtime. + +* `react-scripts` + * [#1175](https://github.com/facebookincubator/create-react-app/pull/1175) Remove path module from webpack config on eject. ([@harunhasdal](https://github.com/harunhasdal)) + + This makes the output after ejecting a bit cleaner. + + * [#1120](https://github.com/facebookincubator/create-react-app/pull/1120) Add `testURL` to Jest config. ([@spudly](https://github.com/spudly)) + + This fixes an error when running tests that interact with History API in jsdom. + +#### :memo: Documentation +* `react-scripts` + * [#1143](https://github.com/facebookincubator/create-react-app/pull/1143) Add deploy to Firebase CDN on template's README (Closes [#374](https://github.com/facebookincubator/create-react-app/issues/374)). ([@guilhermebruzzi](https://github.com/guilhermebruzzi)) + * [#1099](https://github.com/facebookincubator/create-react-app/pull/1099) Fix minor typo/grammar. ([@alex-wilmer](https://github.com/alex-wilmer)) + * [#1168](https://github.com/facebookincubator/create-react-app/pull/1168) Add "npm run build silently fails" to Troubleshooting. ([@gaearon](https://github.com/gaearon)) + +#### Committers: 12 +- Alex Wilmer ([alex-wilmer](https://github.com/alex-wilmer)) +- Bogdan Soare ([bogdansoare](https://github.com/bogdansoare)) +- Brian Ng ([existentialism](https://github.com/existentialism)) +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach)) +- Guilherme Heynemann Bruzzi ([guilhermebruzzi](https://github.com/guilhermebruzzi)) +- Harun ([harunhasdal](https://github.com/harunhasdal)) +- James Newell ([jameslnewell](https://github.com/jameslnewell)) +- Jirat Ki. ([n3tr](https://github.com/n3tr)) +- Li Xuanji ([zodiac](https://github.com/zodiac)) +- Stephen John Sorensen ([spudly](https://github.com/spudly)) +- Vincenzo Chianese ([XVincentX](https://github.com/XVincentX)) + +### Migrating from 0.8.1 to 0.8.2 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.8.2 +``` + +## 0.8.1 (December 4, 2016) + +Thanks to [@fson](https://github.com/fson) for cutting this release. + +#### :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 (December 3, 2016) + +Thanks to [@fson](https://github.com/fson) for cutting this release. + +#### :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) + +Thanks to [@fson](https://github.com/fson) for cutting this release. + +### Build Dependency (`react-scripts`) + +* Updates Jest to [version 16.0](http://facebook.github.io/jest/blog/2016/10/03/jest-16.html), with an upgraded CLI, improved snapshot testing, new matchers and more. ([@chase](https://github.com/chase) in [#858](https://github.com/facebookincubator/create-react-app/pull/858)) +* Test setup file `src/setupTests.js` is now called after test framework initialization to support loading custom matchers. ([@just-boris](https://github.com/just-boris) in [#846](https://github.com/facebookincubator/create-react-app/pull/846)) +* Build command shows better instructions for deploying the app to GitHub Pages ([@Janpot](https://github.com/Janpot) in [#841](https://github.com/facebookincubator/create-react-app/pull/841)) +* Build command now generates an asset manifest with mappings from each filename to its final output filename. ([@lukyth](https://github.com/lukyth) in [#891](https://github.com/facebookincubator/create-react-app/pull/891)) +* Build command exits, if there are errors from UglifyJS ([@pdillon](https://github.com/pdillon) in [#859](https://github.com/facebookincubator/create-react-app/pull/859)) +* Eject output is more beautiful now. ([@azakordonets](https://github.com/azakordonets) in [#769](https://github.com/facebookincubator/create-react-app/pull/769)) +* Fixes opening the app in a new tab in Chrome. ([@unixdev](https://github.com/unixdev) in [#831](https://github.com/facebookincubator/create-react-app/pull/831)) +* Fixes environment variables not being defined as normal properties of the `process.env` object. ([@dvkndn](https://github.com/dvkndn) in [#807](https://github.com/facebookincubator/create-react-app/pull/807)) +* Fixes PostCSS autoprefixer not processing CSS files imported with CSS `@import` statements. ([@nhunzaker](https://github.com/nhunzaker) in [#929](https://github.com/facebookincubator/create-react-app/pull/929)) + +### ESLint Config (`eslint-config-react-app`) + +* Adds `import/no-webpack-loader-syntax` rule that forbids using custom Webpack specific syntax to specify Webpack loaders in import statements. ([@fson](https://github.com/fson) in [#803](https://github.com/facebookincubator/create-react-app/pull/803)) +* `react/react-in-jsx-scope` rule ("React must be in scope") is now an error. ([@gaearon](https://github.com/gaearon) in [#822](https://github.com/facebookincubator/create-react-app/pull/822)) +* `no-unused-expressions` rule now allows the use of short circuit and ternary expressions. ([@cannona](https://github.com/cannona) in [#724](https://github.com/facebookincubator/create-react-app/pull/724)) + +### Babel Preset (`babel-preset-react-app`) + +* The preset now detects the Node.js version in test environment and disables unnecessary ES2015 transforms using `babel-preset-env`. ([@shubheksha](https://github.com/shubheksha) in [#878](https://github.com/facebookincubator/create-react-app/pull/878), [@JeffreyATW](https://github.com/JeffreyATW) in [#927 +](https://github.com/facebookincubator/create-react-app/pull/927)) +* Fixes a duplicate dependency on `babel-plugin-transform-regenerator`. ([@akofman](https://github.com/akofman) in [#864](https://github.com/facebookincubator/create-react-app/pull/864)) + +### Utilities (`react-dev-utils`) + +* The error overlay is now disposed after fixing linting errors. ([@jarlef](https://github.com/jarlef) in [#856](https://github.com/facebookincubator/create-react-app/pull/856)) +* Adds support for Webpack 2 to `webpackHotDevClient`. ([@michalkvasnicak](https://github.com/michalkvasnicak) in [#840](https://github.com/facebookincubator/create-react-app/pull/840)) + +### Global CLI (`create-react-app`) + +* Adds support for passing a scoped package name to the `--scripts-version` argument. ([@pdillon](https://github.com/pdillon) in [#826](https://github.com/facebookincubator/create-react-app/pull/826)) +* Fixes installing pre-release versions using a tarball URL with the `--scripts-version` argument. ([@jihchi](https://github.com/jihchi) in [#876](https://github.com/facebookincubator/create-react-app/pull/876)) + +### Migrating from 0.6.1 to 0.7.0 + +You may optionally update the global command (it’s not required): + +``` +npm install -g create-react-app@0.6.0 +``` + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.7.0 +``` + +### Breaking Change in 0.7.0 + +#### Updating Snapshots + +Jest 16 includes [improvements to snapshot testing and changes to the snapshot format](https://facebook.github.io/jest/blog/2016/10/03/jest-16.html#snapshot-updates). If your project uses snapshot testing, you'll need to update the snapshot files. To update the snapshots, run: +``` +npm test -- -u +``` + +## 0.6.1 (September 27, 2016) + +### Build Dependency (`react-scripts`) + +* 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)) + +### Utilities (`react-dev-utils`) + +* Fixes the syntax error overlay padding. ([@fson](https://github.com/fson) in [#758](https://github.com/facebookincubator/create-react-app/pull/758)) + +### Migrating from 0.6.0 to 0.6.1 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.6.1 +``` + +## 0.6.0 (September 25, 2016) + +### Build Dependency (`react-scripts`) + +* Adds an overlay for syntax errors in development. ([@gaearon](https://github.com/gaearon) in [#744](https://github.com/facebookincubator/create-react-app/pull/744)) + +### Utilities (`react-dev-utils`) + +* Adds an alternative WebpackDevServer client that displays the error overlay. ([@gaearon](https://github.com/gaearon) in [#744](https://github.com/facebookincubator/create-react-app/pull/744)) + +### Migrating from 0.5.1 to 0.6.0 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.6.0 +``` + +**Note: If the project fails to start, remove `node_modules`, ensure `react-scripts` is `0.6.0` in your `package.json`, and run `npm install` again. There seems to be an [npm bug](https://github.com/npm/npm/issues/14073) affecting this update.** + +## 0.5.1 (September 23, 2016) + +### Build Dependency (`react-scripts`) + +* Updates `react-dev-utils` dependency + +### Utilities (`react-dev-utils`) + +* Fixes `%PUBLIC_URL%` replacement to work when specified multiple times. ([@fson](https://github.com/fson) in [#731](https://github.com/facebookincubator/create-react-app/pull/731)) + +### Migrating from 0.5.0 to 0.5.1 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.5.1 +``` + +## 0.5.0 (September 23, 2016) + +### Build Dependency (`react-scripts`) + +* Adds [support for `public` folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder) with arbitrary assets. ([@gaearon](https://github.com/gaearon) in [#703](https://github.com/facebookincubator/create-react-app/pull/703)) +* You can now [specify defaults](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-development-environment-variables-in-env) for environment variables with `.env` file. ([@ayrton](https://github.com/ayrton) in [#695](https://github.com/facebookincubator/create-react-app/pull/695)) +* Ejecting now generates proper `.babelrc` and `.eslintrc`. ([@fson](https://github.com/fson) in [#689](https://github.com/facebookincubator/create-react-app/pull/689), [@gaearon](https://github.com/gaearon) in [#705](https://github.com/facebookincubator/create-react-app/pull/705)) +* Some React warnings now [include the component stacktrace](https://twitter.com/dan_abramov/status/779308833399332864). ([@gaearon](https://github.com/gaearon) in [#716](https://github.com/facebookincubator/create-react-app/pull/716)) +* `npm start` doesn’t fail in a composed Docker container. ([@arekkas](https://github.com/arekkas) in [#711](https://github.com/facebookincubator/create-react-app/issues/711)) +* The projects generated with `eject` are now cleaner. ([@gaearon](https://github.com/gaearon) in [#723](https://github.com/facebookincubator/create-react-app/pull/723)) +* The project is now managed as a monorepo. ([@ryanyogan](https://github.com/ryanyogan) in [#419](https://github.com/facebookincubator/create-react-app/pull/419), [@fson](https://github.com/fson) in [#678](https://github.com/facebookincubator/create-react-app/pull/678)) + +### ESLint Config (`eslint-config-react-app`) + +* Published for the first time! ([@fson](https://github.com/fson) in [#689](https://github.com/facebookincubator/create-react-app/pull/689)) +* Added [`react/no-danger-with-children`](https://github.com/yannickcr/eslint-plugin-react/blob/v6.3.0/docs/rules/no-danger-with-children.md) and [`react/style-prop-object`](https://github.com/yannickcr/eslint-plugin-react/blob/v6.3.0/docs/rules/style-prop-object.md) rules. ([@fson](https://github.com/fson) in [#696](https://github.com/facebookincubator/create-react-app/pull/696)) + +### Babel Preset (`babel-preset-react-app`) + +* Published for the first time! ([@fson](https://github.com/fson) in [#701](https://github.com/facebookincubator/create-react-app/pull/701)) + +### Utilities (`react-dev-utils`) + +* Published for the first time! ([@gaearon](https://github.com/gaearon) in [#723](https://github.com/facebookincubator/create-react-app/pull/723)) + +### Global CLI (`create-react-app`) + +* Added `README` to npm. There were no other changes. + +### Migrating from 0.4.3 to 0.5.0 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.5.0 +``` + +### Breaking Changes in 0.5.0 + +#### Global ESLint Plugin Versions + +If you used a global ESLint installation for the editor integration, you’ll need to install [these versions of global ESLint packages](https://github.com/facebookincubator/create-react-app/blob/c092086b1b256fd081f10744f90d216dd5217e29/packages/eslint-config-react-app/package.json#L14-L19). + +#### Moving `index.html` into `public` Folder + +You’ll also need to create a new folder called `public` in the root of your project. Then, move `index.html` and files it references (such as a favicon) into that folder. + +You can no longer reference any files from `./src` in `index.html`. Instead, `public/index.html` can now only reference files other inside of the `public` folder using a special variable called `%PUBLIC_URL%`. + +For example, instead of: + +```js +<link rel="shortcut icon" href="./src/favicon.ico"> +``` + +You would need to move both `index.html` and `src/favicon.ico` into the `public` folder, and change `<link>` to look like this: + +```html +<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> +``` + +This ensures it become a part of the build output, and resolves correctly both with client-side routing and non-root `homepage` in `package.json`. Read more about [using the `public` folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder) and [why these changes were made](https://github.com/facebookincubator/create-react-app/pull/703). + +## 0.4.3 (September 18, 2016) + +This is a hotfix release for a broken package.<br> +It contained no changes to the code. + +### Build Dependency (`react-scripts`) + +* Fixes a packaging issue that affected npm 2. ([#676](https://github.com/facebookincubator/create-react-app/issues/676)) + +### Migrating from 0.4.2 to 0.4.3 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.4.3 +``` + +## 0.4.2 (September 18, 2016) + +### Build Dependency (`react-scripts`) + +* Lint output in editor is now opt-in because, due to [this ESLint issue](https://github.com/eslint/eslint/issues/3458), it is broken by default in Atom. ([@fson](https://github.com/fson) in [#649](https://github.com/facebookincubator/create-react-app/pull/649)) +* Fixes an issue causing compile errors when project folder is inside a symlink. ([@motiz88](https://github.com/motiz88) in [#648](https://github.com/facebookincubator/create-react-app/pull/648)) +* You can now import `jpeg`, `wav`, `mp3`, `m4a`, `aac`, and `oga`. ([@mareksuscak](https://github.com/mareksuscak) in [#624](https://github.com/facebookincubator/create-react-app/pull/624), [@danharper](https://github.com/danharper) in [#665](https://github.com/facebookincubator/create-react-app/pull/665)) +* Fixes false positives caused by the case sensitive import warning on Windows. ([@Urthen](https://github.com/Urthen) in [#593](https://github.com/facebookincubator/create-react-app/pull/593)) +* With Docker, `*.json.gzip` files are no longer created in the project folder. ([@thangngoc89](https://github.com/thangngoc89) in [#620](https://github.com/facebookincubator/create-react-app/pull/620)) +* Proxy network errors now abort requests instead of hanging. ([@cloudmu](https://github.com/cloudmu) in [#588](https://github.com/facebookincubator/create-react-app/pull/588)) +* Connection to the development server does not get interrupted in HTTPS mode. ([@dceddia](https://github.com/dceddia) in [#652](https://github.com/facebookincubator/create-react-app/pull/652)) +* Unsupported Node versions now print a warning. ([@fson](https://github.com/fson) in [#575](https://github.com/facebookincubator/create-react-app/pull/575)) +* Importing assets with special characters like `@` now works with tests. ([@fson](https://github.com/fson) in [#584](https://github.com/facebookincubator/create-react-app/pull/584)) +* Undefined variable lint rule is promoted from a warning to an error. ([@gaearon](https://github.com/gaearon) in [#669](https://github.com/facebookincubator/create-react-app/pull/669)) +* Variables starting with underscore no longer trigger the “unused variable” rule. ([@valscion](https://github.com/valscion) in [#640](https://github.com/facebookincubator/create-react-app/pull/640)) +* We now print a friendly error when required files are missing. ([@vnctaing](https://github.com/vnctaing) in [#653](https://github.com/facebookincubator/create-react-app/pull/653)) +* The output after creating a project is better formatted. ([@btnwtn](https://github.com/btnwtn) in [#629](https://github.com/facebookincubator/create-react-app/pull/629)) +* Development server logs are less noisy. ([@gaearon](https://github.com/gaearon) in [122068](https://github.com/facebookincubator/create-react-app/commit/1220683276dd9eb2f2719aece7f40bf2ffb397b4)) + +### Global CLI (`create-react-app`) + +* It now runs on early Node versions to print a friendly warning instead of crashing. ([@sotojuan](https://github.com/sotojuan) in [fc3ab4](https://github.com/facebookincubator/create-react-app/commit/fc3ab46d2a54f142f9287ce7de9ab2fc2514487d)) +* We now print a friendly message when you create a project with invalid name. ([@mareksuscak](https://github.com/mareksuscak) in [#628](https://github.com/facebookincubator/create-react-app/pull/628)) +* Passing a custom fork of `react-scripts` to `create-react-app` with `--scripts-version` works again. ([@yesmeck](https://github.com/yesmeck) in [#632](https://github.com/facebookincubator/create-react-app/pull/632)) + +### Migrating from 0.4.1 to 0.4.2 + +You may optionally update the global command (it’s not required): + +``` +npm install -g create-react-app@0.4.2 +``` + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.4.2 +``` + +## 0.4.1 (September 3, 2016) + +### Build Dependency (`react-scripts`) + +* We now support (but [don’t recommend](https://github.com/facebookincubator/create-react-app/issues/87#issuecomment-234627904)) `.jsx` file extension. ([@tizmagik](https://github.com/tizmagik) in [#563](https://github.com/facebookincubator/create-react-app/pull/563)) +* Proxy request errors are now printed to the console. ([@cloudmu](https://github.com/cloudmu) in [#502](https://github.com/facebookincubator/create-react-app/pull/502)) + +### Migrating from 0.4.0 to 0.4.1 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.4.1 +``` + +## 0.4.0 (September 2, 2016) + +### Build Dependency (`react-scripts`) + +* **Breaking Change:** Disabled implicit serving of source files in development. ([@gaearon](https://github.com/gaearon) in [#551](https://github.com/facebookincubator/create-react-app/pull/551)) +* You can use `NODE_PATH` environment variable for absolute `import` paths. ([@jimmyhmiller](https://github.com/jimmyhmiller) in [#476](https://github.com/facebookincubator/create-react-app/pull/476)) +* If `src/setupTests.js` exists, it will be used to setup the test environment. ([@gaelduplessix](https://github.com/gaelduplessix) in [#548](https://github.com/facebookincubator/create-react-app/pull/548)) +* If `HTTPS` environment variable is set to `true`, development server will run in HTTPS mode. ([@dceddia](https://github.com/dceddia) in [#552](https://github.com/facebookincubator/create-react-app/pull/552)) + +### Migrating from 0.3.1 to 0.4.0 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.4.0 +``` + +### Breaking Change in 0.4.0 + +Paths like `/src/somefile.png` used to be served in development, but only by accident. They never worked in production builds. Since 0.4.0, we [don’t serve static files by default in development anymore either](https://github.com/facebookincubator/create-react-app/pull/551). This removes a dangerous inconsistency that we never intentionally supported. + +If you need a static file to be part for the build, [import it from JavaScript and you will get its filename](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#adding-images-and-fonts). This ensures it gets included into the production build as well, and its filename contains the content hash. + +If you used static files with `<link href>`, [read this new guide](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#referring-to-static-assets-from-link-href) on how to make sure these files get included into the builds. For example, you can replace `<link href="/src/favicons/favicon-32.png">` with `<link href="./src/favicons/favicon-32.png">`, and then Webpack will recognize it and include it into the build. + +If you referenced some other files from `index.html`, please file an issue to discuss your use case. In the meantime, you can serve them from a separate static server until your use case is supported. + +## 0.3.1 (September 2, 2016) + +### Build Dependency (`react-scripts`) + +* Bumps Jest dependency to fix a few issues discovered yesterday. ([@cpojer](https://github.com/cpojer) in [facebook/jest#1580](https://github.com/facebook/jest/pull/1580), [@insin](https://github.com/insin) in [facebook/jest#1574](https://github.com/facebook/jest/pull/1574)) + +### Migrating from 0.3.0 to 0.3.1 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.3.1 +``` + +## 0.3.0 (September 1, 2016) + +### Build Dependency (`react-scripts`) + +* Testing is [now supported](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#running-tests)! ([Jest project contributors](https://github.com/facebook/jest/pulls?q=is%3Apr+is%3Aclosed), [@cpojer](https://github.com/cpojer) in [#250](https://github.com/facebookincubator/create-react-app/pull/250), [@gaearon](https://github.com/gaearon) in [#378](https://github.com/facebookincubator/create-react-app/pull/378), [#530](https://github.com/facebookincubator/create-react-app/pull/530), [#533](https://github.com/facebookincubator/create-react-app/pull/533)) +* Static files such as CSS, images, and fonts, can now exist outside `src` directory. ([@fson](https://github.com/fson) in [#504](https://github.com/facebookincubator/create-react-app/pull/504)) +* **Breaking Change:** Local paths in `<link href>` in `index.html` will now be correctly resolved, so deleting `favicon.ico` is not an error anymore. ([@andreypopp](https://github.com/andreypopp) in [#428](https://github.com/facebookincubator/create-react-app/pull/428)) +* Removed an annoying lint rule that warned for `<div ref={node => this.node = node}>`. ([@mrscobbler](https://github.com/mrscobbler) in [#529](https://github.com/facebookincubator/create-react-app/pull/529)) +* Temporarily disabled `react-constant-elements` Babel transform because of its bugs. ([@gaearon](https://github.com/gaearon) in [#534](https://github.com/facebookincubator/create-react-app/pull/534)) +* Fixed a permission issue with Docker. ([@gaearon](https://github.com/gaearon) in [73c940](https://github.com/facebookincubator/create-react-app/commit/73c940a73205d761230f8d6bf81ecfd460ba28a9)) +* Fixed an issue with generator syntax in Jest that occurred in an alpha release. ([@gaearon](https://github.com/gaearon) in [#535](https://github.com/facebookincubator/create-react-app/pull/535)) + +### Global CLI (`create-react-app`) + +* You can now create a project in a folder that already contains an `.idea` folder, which is necessary for future WebStorm integration. ([@denofevil](https://github.com/denofevil) in [#522](https://github.com/facebookincubator/create-react-app/pull/522)) + +### Migrating from 0.2.3 to 0.3.0 + +You may optionally update the global command (it’s not required): + +``` +npm install -g create-react-app@0.3.0 +``` + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.3.0 +``` + +#### Breaking Change + +Now `favicon.ico` is not treated specially anymore.<br> +If you use it, move it to `src` and add the following line to `<head>` in your HTML: + +```html +<link rel="shortcut icon" href="./src/favicon.ico"> +``` + +#### New Feature + +Since 0.3.0 added a test runner, we recommend that you add it to the `scripts` section of your `package.json` like this: + +```js + // ... + "scripts": { + // ... + "test": "react-scripts test --env=jsdom" + } +``` + +[Then read the testing guide to learn more about using it!](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#running-tests) + +## 0.2.3 (August 25, 2016) + +### Build Dependency (`react-scripts`) + +* You can now [proxy requests to an API server](https://github.com/facebookincubator/create-react-app/blob/ef94b0561d5afb9b50b905fa5cd3f94e965c69c0/template/README.md#proxying-api-requests-in-development) without worrying about CORS. ([@gaearon](https://github.com/gaearon) in [#282](https://github.com/facebookincubator/create-react-app/pull/282)) +* You can now [pass custom environment variables](https://github.com/facebookincubator/create-react-app/blob/ef94b0561d5afb9b50b905fa5cd3f94e965c69c0/template/README.md#adding-custom-environment-variables) to your application. ([@eliperelman](https://github.com/eliperelman) in [#342](https://github.com/facebookincubator/create-react-app/pull/342)) +* You can now [use `async` and `await`](https://ponyfoo.com/articles/understanding-javascript-async-await) syntax. ([@gaearon](https://github.com/gaearon) in [#327](https://github.com/facebookincubator/create-react-app/pull/327), [@fson](https://github.com/fson) in [#332](https://github.com/facebookincubator/create-react-app/pull/332)) +* Paths with period in them now load successfully on the development server. ([@mxstbr](https://github.com/mxstbr) in [#422](https://github.com/facebookincubator/create-react-app/pull/422)) +* Images with `.webp` extension are now supported. ([@gafemoyano](https://github.com/gafemoyano) in [#458](https://github.com/facebookincubator/create-react-app/pull/458)) +* The most recent version of React is now added to `package.json`. ([@wdhorton](https://github.com/wdhorton) in [#477](https://github.com/facebookincubator/create-react-app/pull/477)) +* Babel configuration is simplified. ([@kripod](https://github.com/kripod) in [#490](https://github.com/facebookincubator/create-react-app/pull/490)) + +### Migrating from 0.2.2 to 0.2.3 + +Update `react-scripts` to point to `0.2.3` in your `package.json` and run `npm install`. You shouldn’t need to do anything else. + +Newly created projects will use `0.2.3` automatically. You **don’t** need to update the global `create-react-app` CLI itself. It stays at `0.2.0` for now because it doesn’t have any changes. + +## 0.2.2 (August 22, 2016) + +### Build Dependency (`react-scripts`) + +* When the bundle size changes, we now display the difference after build. ([@elijahmanor](https://github.com/elijahmanor) in [#340](https://github.com/facebookincubator/create-react-app/pull/340)) +* `npm install`ing a missing dependency now forces a rebuild. ([@gaearon](https://github.com/gaearon) in [#349](https://github.com/facebookincubator/create-react-app/pull/349)) +* Autoprefixer config now includes more commonly supported browsers. ([@kripod](https://github.com/kripod) in [#345](https://github.com/facebookincubator/create-react-app/pull/345)) +* All the configuration is now documented inline so ejecting doesn’t leave you in the dark. ([@gaearon](https://github.com/gaearon) in [#362](https://github.com/facebookincubator/create-react-app/pull/362)) +* `Object.assign()` polyfill is now bundled by default. ([@gaearon](https://github.com/gaearon) in [#399](https://github.com/facebookincubator/create-react-app/pull/399)) +* [React Native Web](https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/) now works out of the box. ([@grigio](https://github.com/grigio) in [#407](https://github.com/facebookincubator/create-react-app/pull/407)) +* Same asset filenames in different folders don’t confuse the server now. ([@arunoda](https://github.com/arunoda) in [#446](https://github.com/facebookincubator/create-react-app/pull/446)) +* The `otf` font format is now supported. ([@A-gambit](https://github.com/A-gambit) in [#434](https://github.com/facebookincubator/create-react-app/pull/434)) +* The `new-cap` linting rule has been disabled thanks to feedback from Immutable.js users. ([@rricard](https://github.com/rricard) in [#470](https://github.com/facebookincubator/create-react-app/pull/470)) + +### Migrating from 0.2.1 to 0.2.2 + +Update `react-scripts` to point to `0.2.2` in your `package.json` and run `npm install`. You shouldn’t need to do anything else. + +Newly created projects will use `0.2.2` automatically. You **don’t** need to update the global `create-react-app` CLI itself. It stays at `0.2.0` for now because it doesn’t have any changes. + +## 0.2.1 (August 1, 2016) + +### Build Dependency (`react-scripts`) + +* Fixes an issue with `npm start` taking a very long time on OS X with Firewall enabled ([@gaearon](https://github.com/gaearon) in [#319](https://github.com/facebookincubator/create-react-app/pull/319)) +* Fixes an issue with Webpack eating a lot of CPU in some cases ([@dceddia](https://github.com/dceddia) in [#294](https://github.com/facebookincubator/create-react-app/pull/294)) +* We now warn if you import a file with mismatched casing because this breaks the watcher ([@alexzherdev](https://github.com/alexzherdev) in [#266](https://github.com/facebookincubator/create-react-app/pull/266)) +* CSS files specifying `?v=` after asset filenames, such as Font Awesome, now works correctly ([@alexzherdev](https://github.com/alexzherdev) in [#298](https://github.com/facebookincubator/create-react-app/pull/298)) +* Issues with `npm link`ing `react-scripts` have been fixed ([@dallonf](https://github.com/dallonf) in [#277](https://github.com/facebookincubator/create-react-app/pull/277)) +* We now use `/static` prefix for assets both in development and production ([@gaearon](https://github.com/gaearon) in [#278](https://github.com/facebookincubator/create-react-app/pull/278)) + +### Migrating from 0.2.0 to 0.2.1 + +Update `react-scripts` to point to `0.2.1` in your `package.json` and run `npm install`. You shouldn’t need to do anything else. If you see a warning about wrong file casing next time you `npm start`, fix your imports to use the correct filename casing. + +Newly created projects will use `0.2.1` automatically. You **don’t** need to update the global `create-react-app` CLI itself. It stays at `0.2.0` for now because it doesn’t have any changes. + +## 0.2.0 (July 28, 2016) + +### Build Dependency (`react-scripts`) + +* You can now enable deployment to GitHub Pages by adding `homepage` field to `package.json` ([@dhruska](https://github.com/dhruska) in [#94](https://github.com/facebookincubator/create-react-app/pull/94)) +* Development server now runs on `0.0.0.0` and works with VirtualBox ([@JWo1F](https://github.com/JWo1F) in [#128](https://github.com/facebookincubator/create-react-app/pull/128)) +* Cloud9 and Nitrous online IDEs are now supported ([@gaearon](http://github.com/gaearon) in [2fe84e](https://github.com/facebookincubator/create-react-app/commit/2fe84ecded55f1d5258d91f9c2c07698ae0d2fb4)) +* When `3000` port is taken, we offer to use another port ([@chocnut](https://github.com/chocnut) in [#101](https://github.com/facebookincubator/create-react-app/pull/101), [2edf21](https://github.com/facebookincubator/create-react-app/commit/2edf2180f2aa6bf647807d0b1fcd95f4cfe4a558)) +* You can now `import` CSS files from npm modules ([@glennreyes](https://github.com/glennreyes) in [#105](https://github.com/facebookincubator/create-react-app/pull/105), [@breaddevil](https://github.com/breaddevil) in [#178](https://github.com/facebookincubator/create-react-app/pull/178)) +* `fetch` and `Promise` polyfills are now always included ([@gaearon](https://github.com/gaearon) in [#235](https://github.com/facebookincubator/create-react-app/pull/235)) +* Regenerator runtime is now included if you use ES6 generators ([@gaearon](https://github.com/gaearon) in [#238](https://github.com/facebookincubator/create-react-app/pull/238)) +* Generated project now contains `.gitignore` ([@npverni](https://github.com/npverni) in [#79](https://github.com/facebookincubator/create-react-app/pull/79), [@chibicode](https://github.com/chibicode) in [#112](https://github.com/facebookincubator/create-react-app/pull/112)) +* ESLint config is now more compatible with Flow ([@gaearon](https://github.com/gaearon) in [#261](https://github.com/facebookincubator/create-react-app/pull/261)) +* A stylistic lint rule about method naming has been removed ([@mxstbr](https://github.com/mxstbr) in [#152](https://github.com/facebookincubator/create-react-app/pull/157)) +* A few unobtrusive accessibility lint rules have been added ([@evcohen](https://github.com/evcohen) in [#175](https://github.com/facebookincubator/create-react-app/pull/175)) +* A `.babelrc` in parent directory no longer causes an error ([@alexzherdev](https://github.com/alexzherdev) in [#236](https://github.com/facebookincubator/create-react-app/pull/236)) +* Files with `.json` extension are now discovered ([@gaearon](https://github.com/gaearon) in [a11d6a](https://github.com/facebookincubator/create-react-app/commit/a11d6a398f487f9163880dd34667b1d3e14b147a)) +* Bug fixes from transitive dependencies are included ([#126](https://github.com/facebookincubator/create-react-app/issues/126)) +* Linting now works with IDEs if you follow [these](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor) instructions ([@keyanzhang](https://github.com/keyanzhang) in [#149](https://github.com/facebookincubator/create-react-app/pull/149)) +* After building, we now print gzipped bundle size ([@lvwrence](https://github.com/lvwrence) in [#229](https://github.com/facebookincubator/create-react-app/pull/229)) + +### Global CLI (`create-react-app`) + +* It enforces that you have Node >= 4 ([@conorhastings](https://github.com/conorhastings) in [#88](https://github.com/facebookincubator/create-react-app/pull/88)) +* It handles `--version` flag correctly ([@mxstbr](https://github.com/mxstbr) in [#152](https://github.com/facebookincubator/create-react-app/pull/152)) + +### Migrating from 0.1.0 to 0.2.0 + +You may optionally update the global command (it’s not required): + +``` +npm install -g create-react-app@0.2.0 +``` + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@0.2.0 +``` + +You may need to fix a few lint warnings about missing `<img alt>` tag, but everything else should work out of the box. If you intend to deploy your site to GitHub Pages, you may now [add `homepage` field to `package.json`](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#deploy-to-github-pages). If you had [issues with integrating editor linter plugins](https://github.com/facebookincubator/create-react-app/issues/124), follow [these new instructions](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor). + +## 0.1.0 (July 22, 2016) + +* Initial public release diff --git a/CHANGELOG.md b/CHANGELOG.md index b96fd76db7d..8261780a7d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,1370 +1,364 @@ -## 0.9.5 (March 9, 2017) +## 1.0.0 (March 18, 2017) -#### :bug: Bug Fix - -* `react-scripts` - - * [#1783](https://github.com/facebookincubator/create-react-app/pull/1783) **Work around Node 7.7.2 bug that crashes `npm start`.** ([@ryanwalters](https://github.com/ryanwalters)) - -#### :nail_care: Enhancement - -* `eslint-config-react-app` - - * [#1773](https://github.com/facebookincubator/create-react-app/pull/1773) Remove `guard-for-in` lint rule. ([@spicyj](https://github.com/spicyj)) - -* `react-scripts` - * [#1760](https://github.com/facebookincubator/create-react-app/pull/1760) Suggest `serve` for running in production. ([@leo](https://github.com/leo)) - * [#1747](https://github.com/facebookincubator/create-react-app/pull/1747) Display `yarn` instead of `yarnpkg` when creating a new app. ([@lpalmes](https://github.com/lpalmes)) - -#### :memo: Documentation - -* `react-scripts` +We’ve been working on this release for the past few months, and there are many big impovements, from migrating to webpack 2 to a brand new runtime error overlay and built-in support for Progressive Web Apps. - * [#1756](https://github.com/facebookincubator/create-react-app/pull/1756) Add Yarn steps for adding Flow. ([@zertosh](https://github.com/zertosh)) +So instead of just enumerating them here, we decided to write a blog post about all the new features. +Check it out: **[What’s New in Create React App](https://facebook.github.io/react/blog/2017/05/18/whats-new-in-create-react-app.html)**. -#### :house: Internal - -* `babel-preset-react-app` - - * [#1742](https://github.com/facebookincubator/create-react-app/pull/1742) Switch to `babel-preset-env` to remove the deprecation warning. ([@Timer](https://github.com/Timer)) +Have you read it? Now let's see how to update your app to the latest version. -#### Committers: 6 -- Andres Suarez ([zertosh](https://github.com/zertosh)) -- Ben Alpert ([spicyj](https://github.com/spicyj)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Leo Lamprecht ([leo](https://github.com/leo)) -- Lorenzo Palmes ([lpalmes](https://github.com/lpalmes)) -- Ryan Walters ([ryanwalters](https://github.com/ryanwalters)) +### Migrating from 0.9.5 to 1.0.0 -### Migrating from 0.9.4 to 0.9.5 +First, ensure you are using the latest [Node 6 LTS or newer](https://nodejs.org/en/download/). In 1.0.0, we have dropped support for Node 4 and NPM 2. Inside any created project that has not been ejected, run: ``` -npm install --save-dev --save-exact react-scripts@0.9.5 +npm install --save-dev --save-exact react-scripts@1.0.0 ``` -## 0.9.4 (March 6, 2017) - -#### :bug: Bug Fix -* `create-react-app` - - * [#1706](https://github.com/facebookincubator/create-react-app/pull/1706) Extract compressed package for package name. ([@Timer](https://github.com/Timer)) - - You may now specify a scoped package for `--scripts-version` and obtain a working installation. - - * [#1695](https://github.com/facebookincubator/create-react-app/pull/1695) Print why installation was aborted. ([@tgig](https://github.com/tgig)) - -* `react-scripts` - - * [#1727](https://github.com/facebookincubator/create-react-app/pull/1727) Fix ejecting from a scoped fork. ([@gaearon](https://github.com/gaearon)) - - Ejecting now works within a scoped fork. - - * [#1721](https://github.com/facebookincubator/create-react-app/pull/1721) Fix hot reloading for WebpackDevServer after eject. ([@gaearon](https://github.com/gaearon)) - -* `react-dev-utils` - - * [#1690](https://github.com/facebookincubator/create-react-app/pull/1690) Fix `openBrowser()` when `BROWSER=open` on macOS. ([@bpierre](https://github.com/bpierre)) - - * [#1696](https://github.com/facebookincubator/create-react-app/pull/1696) Improve reliability of port detection. ([@chrisdrackett](https://github.com/chrisdrackett)) - -#### :nail_care: Enhancement -* `eslint-config-react-app`, `react-scripts` - - * [#1705](https://github.com/facebookincubator/create-react-app/pull/1705) Add support for `ignoreRestSiblings` in `no-unused-vars`. ([@chrisdrackett](https://github.com/chrisdrackett)) - - Linter no longer warns when using rest properties to remove variables from an object. - - * [#1542](https://github.com/facebookincubator/create-react-app/pull/1542) Bump `jsx-a11y` version. ([@bondz](https://github.com/bondz)) - -* `react-dev-utils`, `react-scripts` - - * [#1726](https://github.com/facebookincubator/create-react-app/pull/1726) Extract generic build functions into `react-dev-utils`. ([@viankakrisna](https://github.com/viankakrisna)) - -* Other - - * [#1402](https://github.com/facebookincubator/create-react-app/pull/1402) Stub `package.json` for e2e test. ([@matoilic](https://github.com/matoilic)) - -#### :memo: Documentation -* `react-scripts` - * [#1710](https://github.com/facebookincubator/create-react-app/pull/1710) Update now.sh deployment instructions. ([@replaid](https://github.com/replaid)) - * [#1717](https://github.com/facebookincubator/create-react-app/pull/1717) Add docs for Apache client side routing. ([@viankakrisna](https://github.com/viankakrisna)) - * [#1698](https://github.com/facebookincubator/create-react-app/pull/1698) Suggest to use `.env` for enabling polling mode. ([@gaearon](https://github.com/gaearon)) - * [#1687](https://github.com/facebookincubator/create-react-app/pull/1687) Fixed missing `--recursive` flag in first `npm run watch-css` command. ([@mklemme](https://github.com/mklemme)) - -#### :house: Internal -* `react-scripts` - * [#1736](https://github.com/facebookincubator/create-react-app/pull/1736) Fix eject for linked react-scripts. ([@tuchk4](https://github.com/tuchk4)) - * [#1741](https://github.com/facebookincubator/create-react-app/pull/1741) Fix internal linting setup. ([@gaearon](https://github.com/gaearon)) - * [#1730](https://github.com/facebookincubator/create-react-app/pull/1730) Fix Node 4 e2e tests. ([@Timer](https://github.com/Timer)) -* `eslint-config-react-app` - * [#1740](https://github.com/facebookincubator/create-react-app/pull/1740) Relax ESLint config peerDependency. ([@gaearon](https://github.com/gaearon)) -* `eslint-config-react-app`, `react-dev-utils`, `react-scripts` - * [#1729](https://github.com/facebookincubator/create-react-app/pull/1729) Lint internal scripts with `eslint:recommended`. ([@gaearon](https://github.com/gaearon)) -* `react-dev-utils` - * [#1724](https://github.com/facebookincubator/create-react-app/pull/1724) Don't use ES6 in a file that should run on Node 4. ([@gaearon](https://github.com/gaearon)) -* Other - * [#1723](https://github.com/facebookincubator/create-react-app/pull/1723) Skip AppVeyor CI builds for Markdown changes. ([@gaearon](https://github.com/gaearon)) - * [#1707](https://github.com/facebookincubator/create-react-app/pull/1707) Add double quotes to escape spaces in paths in e2e. ([@viankakrisna](https://github.com/viankakrisna)) - * [#1688](https://github.com/facebookincubator/create-react-app/pull/1688) Upgrade `lerna` version. ([@viankakrisna](https://github.com/viankakrisna)) - -#### Committers: 11 -- Ade Viankakrisna Fadlil ([viankakrisna](https://github.com/viankakrisna)) -- Bond ([bondz](https://github.com/bondz)) -- Chris Drackett ([chrisdrackett](https://github.com/chrisdrackett)) -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Mato Ilic ([matoilic](https://github.com/matoilic)) -- Myk Klemme ([mklemme](https://github.com/mklemme)) -- Pierre Bertet ([bpierre](https://github.com/bpierre)) -- Ryan Platte ([replaid](https://github.com/replaid)) -- Travis Giggy ([tgig](https://github.com/tgig)) -- Valerii Sorokobatko ([tuchk4](https://github.com/tuchk4)) - -### Migrating from 0.9.3 to 0.9.4 - -Inside any created project that has not been ejected, run: +You may also optionally update the global command-line utility for bug fixes: ``` -npm install --save-dev --save-exact react-scripts@0.9.4 +npm install -g create-react-app ``` -You may also optionally update the global command-line utility for scoped package support: +#### Ensure application and test files reside in `src/` + +We've never supported importing files from outside `src/`, nor have we supported running tests outside of `src/`.<br> +We also never explicitly forbid doing so, which caused confusion when things didn't work like they should. +When running or building your application, you may see a message like so: ``` -npm install -g create-react-app@1.3.0 +You attempted to import ... which falls outside of the project src/ directory. ``` -## 0.9.3 (February 28, 2017) - -#### :rocket: New Feature -* `create-react-app` - * [#1423](https://github.com/facebookincubator/create-react-app/pull/1423) **Fall back to Yarn offline cache when creating a new project.** ([@voxsim](https://github.com/voxsim)) - - If you are using Yarn, and you have created at least one app previously, Create React App now works offline. - - <img src="http://i.imgur.com/1FLa9Tg.gif" width="500" alt="Yarn offline installation demo"> - -#### :bug: Bug Fix - -* `react-scripts` - - * [#1665](https://github.com/facebookincubator/create-react-app/pull/1665) Temporarily disable ESLint caching because of a bug. ([@gaearon](https://github.com/gaearon)) +To remedy this, simply move any files that you `import` within `src/` and update your relative imports accordingly. This enforces that files that `import` each other stay in `src/`, and other folders serve different purposes (e.g. the `public/` folder just gets served from the root). -* `create-react-app` - * [#1675](https://github.com/facebookincubator/create-react-app/pull/1675) Delete project folder on failed installation on Windows. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) - * [#1662](https://github.com/facebookincubator/create-react-app/pull/1662) Validate project name before creating a project. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) - * [#1669](https://github.com/facebookincubator/create-react-app/pull/1669) Make sure React dependencies aren’t pinned in new projects. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) - -#### :nail_care: Enhancement -* `react-scripts` +If you used relative imports outside the project directory as a way to share code with another project, consider using a [monorepo](https://github.com/lerna/lerna) instead, so that other projects are symlinked to your project's `node_modules/`. Then you can import them as a Node modules. - * [#1677](https://github.com/facebookincubator/create-react-app/pull/1677) Add `X-FORWARDED` headers for proxy requests. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) +While running `npm test`, you may notice some of your tests are missing. Please move any top-level test directory (i.e. `__test__`, `__spec__`) or files (i.e. `*.test.js`, `*.spec.js`) into `src/`. Conversely, if you have some similarly named files that you *don’t* want Jest to run, move them outside of `src/`. -#### :memo: Documentation -* `react-scripts` +#### Import required locales for Moment.js - * [#1657](https://github.com/facebookincubator/create-react-app/pull/1657) Tweak the Visual Studio Code debugging guide. ([@ryansully](https://github.com/ryansully)) +Moment.js locales are now purposely excluded from the bundle unless explicitly depended on. -#### :house: Internal -* End-to-end Tests +Please import the locales you need: +```js +import moment from 'moment'; +import 'moment/locale/fr'; +import 'moment/locale/es'; +``` - * [#1648](https://github.com/facebookincubator/create-react-app/pull/1648) Add Windows CI tests for better stability. ([@Timer](https://github.com/Timer)) +#### You can no longer import file content -#### Committers: 5 -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Johann Hubert Sonntagbauer ([johann-sonntagbauer](https://github.com/johann-sonntagbauer)) -- Ryan Sullivan ([ryansully](https://github.com/ryansully)) -- Simon Vocella ([voxsim](https://github.com/voxsim)) +You can no longer import a file and expect to receive its contents as an encoded string.<br> +This behavior was confusing and inconsistent depending on the file size. -### Migrating from 0.9.2 to 0.9.3 +Importing files with unknown extensions will now always include them into the build and return a valid URL. -Inside any created project that has not been ejected, run: +If you'd like to import a file's contents as a string, consider [contributing to #1944](https://github.com/facebookincubator/create-react-app/issues/1944). +For the time being, you must embed assets within an export: -``` -npm install --save-dev --save-exact react-scripts@0.9.3 +```js +// sample.txt +export default `i want +this data as a string +`; ``` -You may also optionally update the global command-line utility for offline Yarn cache support: +You can then import this as so: +```js +import sampleText from './sample.txt'; +// ... ``` -npm install -g create-react-app@1.2.1 -``` - -## 0.9.2 (February 26, 2017) - -#### :nail_care: Enhancement - -* `create-react-app` - * [#1253](https://github.com/facebookincubator/create-react-app/pull/1253) **Install time optimization.** ([@n3tr](https://github.com/n3tr)) - - React, ReactDOM, and `react-scripts` are now installed in the same install instead of two different installs. This reduces app creation time by a noticeable amount. - - * [#1512](https://github.com/facebookincubator/create-react-app/pull/1512) **Graceful error handling.** ([@chitchu](https://github.com/chitchu)) - - If an error occurs while `create-react-app` is running, it will now clean up and not leave a broken project to reduce confusion. - * [#1193](https://github.com/facebookincubator/create-react-app/pull/1193) Suggest upgrading to NPM >= 3 for faster install times. ([@mobinni](https://github.com/mobinni)) +#### Confusing window globals can no longer be used without `window` qualifier - * [#1603](https://github.com/facebookincubator/create-react-app/pull/1603) Allow app creation in a WebStorm project. ([@driquelme](https://github.com/driquelme)) +Please prefix any global method with `window.`, you may experience this with methods such as `confirm`. - * [#1570](https://github.com/facebookincubator/create-react-app/pull/1570) Allow git urls in `--scripts-version`. ([@tomconroy](https://github.com/tomconroy)) +Simply update references from `confirm` to `window.confirm`. -* `react-scripts` - * [#1578](https://github.com/facebookincubator/create-react-app/pull/1578) Enable lint caching in development. ([@viankakrisna](https://github.com/viankakrisna)) - - * [#1478](https://github.com/facebookincubator/create-react-app/pull/1478) Update the build script message to show the correct port. ([@chyipin](https://github.com/chyipin)) - - * [#1567](https://github.com/facebookincubator/create-react-app/pull/1567) Remove .bin files after eject. ([@tuchk4](https://github.com/tuchk4)) - - * [#1560](https://github.com/facebookincubator/create-react-app/pull/1560) Bump `recursive-readdir`. ([@wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg)) - -#### :bug: Bug Fix -* `react-scripts` - - * [#1635](https://github.com/facebookincubator/create-react-app/pull/1635) **Fix Jest configuration.** ([@Timer](https://github.com/Timer)) - - Fixes ejecting on Windows for macOS and Linux machines. - - * [#1356](https://github.com/facebookincubator/create-react-app/pull/1356) Fix workflow if react-scripts package is linked via npm-link. ([@tuchk4](https://github.com/tuchk4)) - - Advanced users may opt to fork `react-scripts` instead of ejecting so they still receive upstream updates.<br> - `react-scripts` will now function as expected when linking to a development version.<br> - Previously, you could not test changes with an existing application via linking. - - * [#1585](https://github.com/facebookincubator/create-react-app/pull/1585) Ensure PORT environment variable is an integer. ([@matoilic](https://github.com/matoilic)) - - * [#1628](https://github.com/facebookincubator/create-react-app/pull/1628) Show correct port for pushstate-server URL text. ([@mattccrampton](https://github.com/mattccrampton)) - - * [#1647](https://github.com/facebookincubator/create-react-app/pull/1647) Fix `npm test` on Windows ([@gaearon](https://github.com/gaearon)) - - -#### :memo: Documentation -* User Guides - * [#1391](https://github.com/facebookincubator/create-react-app/pull/1391) Add note how to resolve missing required files for Heroku. ([@sbritoig](https://github.com/sbritoig)) - * [#1577](https://github.com/facebookincubator/create-react-app/pull/1577) Add a how-to on `react-snapshot`. ([@superhighfives](https://github.com/superhighfives)) - * [#1121](https://github.com/facebookincubator/create-react-app/pull/1121) Add documentation for customizing Bootstrap theme. ([@myappincome](https://github.com/myappincome)) - * [#1540](https://github.com/facebookincubator/create-react-app/pull/1540) Document debugging in Visual Studio Code. ([@bondz](https://github.com/bondz)) - * [#1618](https://github.com/facebookincubator/create-react-app/pull/1618) Add note about when to import Bootstrap CSS. ([@joewoodhouse](https://github.com/joewoodhouse)) - * [#1518](https://github.com/facebookincubator/create-react-app/pull/1518) Update flow configuration documentation. ([@SBrown52](https://github.com/SBrown52)) - * [#1625](https://github.com/facebookincubator/create-react-app/pull/1625) Specify that NODE_ENV is set to 'production' during the build step. ([@mderazon](https://github.com/mderazon)) - * [#1573](https://github.com/facebookincubator/create-react-app/pull/1573) Update Jest documentation links. ([@mkermani144](https://github.com/mkermani144)) - * [#1564](https://github.com/facebookincubator/create-react-app/pull/1564) Add --recursive to Sass watch script. ([@aleburato](https://github.com/aleburato)) - * [#1561](https://github.com/facebookincubator/create-react-app/pull/1561) Use https in link in documentation. ([@dariocravero](https://github.com/dariocravero)) - * [#1562](https://github.com/facebookincubator/create-react-app/pull/1562) Update `jest-enzyme` documentation. ([@kiranps](https://github.com/kiranps)) - * [#1543](https://github.com/facebookincubator/create-react-app/pull/1543) Update CSS preprocessor instructions. ([@aleburato](https://github.com/aleburato)) - * [#1338](https://github.com/facebookincubator/create-react-app/pull/1338) Add link to Azure deployment tutorial. ([@tpetrina](https://github.com/tpetrina)) - * [#1320](https://github.com/facebookincubator/create-react-app/pull/1320) Document how to disable autoprefix feature. ([@rrubas](https://github.com/rrubas)) - * [#1313](https://github.com/facebookincubator/create-react-app/pull/1313) List features beyond ES6 supported by create-react-app. ([@jonathanconway](https://github.com/jonathanconway)) - * [#1008](https://github.com/facebookincubator/create-react-app/pull/1008) Add Saas support documentation. ([@tsironis](https://github.com/tsironis)) - * [#994](https://github.com/facebookincubator/create-react-app/pull/994) Suggest `jest-enzyme` for simplifying test matchers. ([@blainekasten](https://github.com/blainekasten)) - * [#1608](https://github.com/facebookincubator/create-react-app/pull/1608) Add note for using CHOKIDAR_USEPOLLING in virtual machines to enable HMR. ([@AJamesPhillips](https://github.com/AJamesPhillips)) - * [#1495](https://github.com/facebookincubator/create-react-app/pull/1495) Add useful link to react-scripts. ([@pd4d10](https://github.com/pd4d10)) -* READMEs - * [#1576](https://github.com/facebookincubator/create-react-app/pull/1576) Switch from Neo to Neutrino. ([@eliperelman](https://github.com/eliperelman)) - * [#1275](https://github.com/facebookincubator/create-react-app/pull/1275) Suggest yarn commands in addition to npm. ([@lifez](https://github.com/lifez)) - -#### :house: Internal -* `babel-preset-react-app` - * [#1598](https://github.com/facebookincubator/create-react-app/pull/1598) Remove redundant babel-plugin-transform-es2015-parameters. ([@christophehurpeau](https://github.com/christophehurpeau)) -* Other - * [#1534](https://github.com/facebookincubator/create-react-app/pull/1534) Use yarn@latest in e2e. ([@gaearon](https://github.com/gaearon)) - * [#1295](https://github.com/facebookincubator/create-react-app/pull/1295) Make node version check more robust in e2e. ([@pugnascotia](https://github.com/pugnascotia)) - * [#1503](https://github.com/facebookincubator/create-react-app/pull/1503) Fix `test -e` in e2e. ([@igetgames](https://github.com/igetgames)) - -#### Committers: 36 -- Ade Viankakrisna Fadlil ([viankakrisna](https://github.com/viankakrisna)) -- Alessandro Burato ([aleburato](https://github.com/aleburato)) -- Alexander James Phillips ([AJamesPhillips](https://github.com/AJamesPhillips)) -- Blaine Kasten ([blainekasten](https://github.com/blainekasten)) -- Bond ([bondz](https://github.com/bondz)) -- Charlie Gleason ([superhighfives](https://github.com/superhighfives)) -- Christophe Hurpeau ([christophehurpeau](https://github.com/christophehurpeau)) -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Daniel Riquelme ([driquelme](https://github.com/driquelme)) -- Darío Javier Cravero ([dariocravero](https://github.com/dariocravero)) -- Dimitris Tsironis ([tsironis](https://github.com/tsironis)) -- Eli Perelman ([eliperelman](https://github.com/eliperelman)) -- Jirat Ki. ([n3tr](https://github.com/n3tr)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Joe Woodhouse ([joewoodhouse](https://github.com/joewoodhouse)) -- Jonathan Conway ([jonathanconway](https://github.com/jonathanconway)) -- Marcus R. Brown ([igetgames](https://github.com/igetgames)) -- Mato Ilic ([matoilic](https://github.com/matoilic)) -- Matt Crampton ([mattccrampton](https://github.com/mattccrampton)) -- Michael DeRazon ([mderazon](https://github.com/mderazon)) -- Mo Binni ([mobinni](https://github.com/mobinni)) -- Mohammad Kermani ([mkermani144](https://github.com/mkermani144)) -- Phawin Khongkhasawan ([lifez](https://github.com/lifez)) -- Roman Rubas ([rrubas](https://github.com/rrubas)) -- Rory Hunter ([pugnascotia](https://github.com/pugnascotia)) -- Tom Conroy ([tomconroy](https://github.com/tomconroy)) -- Toni Petrina ([tpetrina](https://github.com/tpetrina)) -- Valerii Sorokobatko ([tuchk4](https://github.com/tuchk4)) -- Vicente Jr Yuchitcho ([chitchu](https://github.com/chitchu)) -- [SBrown52](https://github.com/SBrown52) -- [chyipin](https://github.com/chyipin) -- [myappincome](https://github.com/myappincome) -- [sbritoig](https://github.com/sbritoig) -- [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) -- kiran ps ([kiranps](https://github.com/kiranps)) -- pd4d10 ([pd4d10](https://github.com/pd4d10)) - -### Migrating from 0.9.0 to 0.9.2 - -**Note:** 0.9.1 had known issues so you should skip it. +Note that this new lint error will likely uncover legitimate accidental uses of global variables where you meant to define a local variable instead. -Inside any created project that has not been ejected, run: +#### Why is my import erroring out? -``` -npm install --save-dev --save-exact react-scripts@0.9.2 -``` +You can no longer use AMD import syntax, nor define an import anywhere other than the top of the file. -You may also optionally update the global command-line utility for more efficient installs (thanks [@n3tr](https://github.com/n3tr)): +This is to reduce confusion around import statements, which do not allow you to evaluate code between them. -``` -npm install -g create-react-app@1.1.0 -``` +#### I see many accessibility warnings -## <s>0.9.1 (February 25, 2017)</s> +We have enabled a new set of rules to help make applications more accessible, please take time to learn about the errors and fix them. -This release has known issues and you should skip it. Update directly to 0.9.2 instead. +You can search for every lint rule name in the right column and read its description on the web. The fixes are usually very simple. -## 0.9.0 (February 11, 2017) +#### I see many warnings about PropTypes and createClass -Thanks to [@Timer](https://github.com/timer) for cutting this release. +We have enabled the lint warnings about React APIs deprecated in React 15.5. +You can automatically convert your project to fix them by running the [corresponding codemods](https://github.com/reactjs/react-codemod). -#### :rocket: New Feature +#### How do I make my tests work with Jest 20? -* `react-scripts` +Please refer to the [Jest 19](https://facebook.github.io/jest/blog/2017/02/21/jest-19-immersive-watch-mode-test-platform-improvements.html#breaking-changes) and [Jest 20](http://facebook.github.io/jest/blog/2017/05/06/jest-20-delightful-testing-multi-project-runner.html#breaking-changes) breaking changes for migration instructions. - * [#1489](https://github.com/facebookincubator/create-react-app/pull/1489) Support setting `"homepage"` to `"."` to generate relative asset paths. ([@tibdex](https://github.com/tibdex)) +If you use snapshots, you will likely need to update them once because of the change in format. - Applications that don’t use the HTML5 `pushState` API can now be built to be served from any relative URL. To enable this, specify `"."` as your `homepage` setting in `package.json`. It used to be possible before with a few known bugs, but they should be fixed now. See [Serving the Same Build from Different Paths](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#serving-the-same-build-from-different-paths). +#### Flexbox 2009 spec is no longer polyfilled - * [#937](https://github.com/facebookincubator/create-react-app/pull/1504) Add `PUBLIC_URL` environment variable for advanced use. ([@EnoahNetzach](https://github.com/EnoahNetzach)) +The old, 2009 specification for Flexbox is [deprecated and is 2.3x slower than the latest specification](https://developers.google.com/web/tools/lighthouse/audits/old-flexbox). - If you use a CDN to serve the app, you can now specify `PUBLIC_URL` environment variable to override the base URL (including the hostname) for resources referenced from the built code. This new variable is mentioned in the new [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration) section. +We are no longer polyfilling it automatically. - * [#1440](https://github.com/facebookincubator/create-react-app/pull/1440) Make all `REACT_APP_*` environment variables accessible in `index.html`. ([@jihchi](https://github.com/jihchi)) +#### Anything missing? - This makes all environment variables previously available in JS, also available in the HTML file, for example `%REACT_APP_MY_VARIABLE%`. See [Referencing Environment Variables in HTML](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#referencing-environment-variables-in-the-html). +This was a large release, and we might have missed something. -* `react-dev-utils` +Please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new) and we will try to help. - * [#1148](https://github.com/facebookincubator/create-react-app/pull/1148) Configure which browser to open with `npm start`. ([@GAumala](https://github.com/GAumala)) +### Detailed Changelog - You can now disable the automatic browser launching by setting the `BROWSER` environment variable to `none`. You can also specify a different browser (or an arbitrary script) to open by default, [as supported by `opn` command](https://github.com/sindresorhus/opn#app) that we use under the hood. See [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration). +**For a readable summary of the changes, [check out our blog post](https://facebook.github.io/react/blog/2017/05/18/whats-new-in-create-react-app.html).** #### :boom: Breaking Change - +* `react-dev-utils`, `react-scripts` + * [#2189](https://github.com/facebookincubator/create-react-app/pull/2189) Add `ModuleScopePlugin` to ensure files reside in `src/`. ([@Timer](https://github.com/Timer)) * `react-scripts` + * [#2187](https://github.com/facebookincubator/create-react-app/pull/2187) Ignore Moment.js locales by default. ([@gaearon](https://github.com/gaearon)) + * [#1808](https://github.com/facebookincubator/create-react-app/pull/1808) Only run tests in `src/` (#544). ([@motevets](https://github.com/motevets)) + * [#1771](https://github.com/facebookincubator/create-react-app/pull/1771) Some flexbox bugs are autofixed, and support for 2009 spec is dropped. ([@cr101](https://github.com/cr101)) + * [#1614](https://github.com/facebookincubator/create-react-app/pull/1614) Upgrade to Jest ~~19~~ (now 20). ([@rogeliog](https://github.com/rogeliog)) + * [#1305](https://github.com/facebookincubator/create-react-app/pull/1305) Whitelist files that can be embedded through url-loader. ([@pugnascotia](https://github.com/pugnascotia)) +* `eslint-config-react-app`, `react-dev-utils` + * [#2186](https://github.com/facebookincubator/create-react-app/pull/2186) Tweak lint rules. ([@gaearon](https://github.com/gaearon)) +* `eslint-config-react-app`, `react-error-overlay`, `react-scripts` + * [#2163](https://github.com/facebookincubator/create-react-app/pull/2163) Upgrade `eslint-plugin-jsx-a11y` and activate more rules. ([@AlmeroSteyn](https://github.com/AlmeroSteyn)) +* `eslint-config-react-app`, `react-scripts` + * [#2130](https://github.com/facebookincubator/create-react-app/pull/2130) Confusing global variables are now blacklisted. ([@doshisid](https://github.com/doshisid)) - * [#1522](https://github.com/facebookincubator/create-react-app/pull/1522) Upgrade dependencies. ([@Timer](https://github.com/Timer)) - * [#1432](https://github.com/facebookincubator/create-react-app/pull/1432) Bump Jest version. ([@gaearon](https://github.com/gaearon)) - * [#1311](https://github.com/facebookincubator/create-react-app/pull/1311) Updated `babel-jest` and `jest` packages to 18.0.0. ([@lopezator](https://github.com/lopezator)) - - Jest has been updated to 18 and has introduced some [breaking changes and new features](https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html). - -* `react-scripts`, `react-dev-utils` - * [#1264](https://github.com/facebookincubator/create-react-app/pull/1264) Remove interactive shell check when opening browser on start. ([@CaryLandholt](https://github.com/CaryLandholt)) +#### :rocket: New Feature +* `react-scripts` + * [#1728](https://github.com/facebookincubator/create-react-app/pull/1728) Scaffolded applications are now Progressive Web Apps by default. ([@jeffposnick](https://github.com/jeffposnick)) + * [#1344](https://github.com/facebookincubator/create-react-app/pull/1344) Support multiple env configuration files. ([@tuchk4](https://github.com/tuchk4)) + * [#2168](https://github.com/facebookincubator/create-react-app/pull/2168) Enable CSS sourcemaps in production. ([@gaearon](https://github.com/gaearon)) + * [#1830](https://github.com/facebookincubator/create-react-app/pull/1830) Make subset of Jest options overridable. ([@ryansully](https://github.com/ryansully)) +* `react-dev-utils`, `react-scripts` + * [#1101](https://github.com/facebookincubator/create-react-app/pull/1101) Add `react-error-overlay`, our new crash overlay. ([@Timer](https://github.com/Timer)) + * [#1590](https://github.com/facebookincubator/create-react-app/pull/1590) Support specifying a node script as BROWSER environment variable. ([@GAumala](https://github.com/GAumala)) + * [#1790](https://github.com/facebookincubator/create-react-app/pull/1790) Support multiple proxies in development. ([@jamesblight](https://github.com/jamesblight)) +* `eslint-config-react-app`, `react-scripts` + * [#2163](https://github.com/facebookincubator/create-react-app/pull/2163) Upgrade `eslint-plugin-jsx-a11y` and activate more rules. ([@AlmeroSteyn](https://github.com/AlmeroSteyn)) - Non-interactive terminals no longer automatically disable launching of the browser. Instead, you need to [specify `none` as `BROWSER` environment variable](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration) if you wish to disable it. #### :bug: Bug Fix - * `react-scripts` - - * [#1441](https://github.com/facebookincubator/create-react-app/pull/1441) Added `babel-runtime` dependency to deduplicate dependencies when using Yarn. ([@jkimbo](https://github.com/jkimbo)) - - This works around a bug in Yarn that caused newly created projects to be over 400MB. Now they are down to 126MB, just like with npm 3. - - * [#1522](https://github.com/facebookincubator/create-react-app/pull/1522) Upgrade dependencies. ([@Timer](https://github.com/Timer)) - * [#1458](https://github.com/facebookincubator/create-react-app/pull/1458) Additionally remove `react-scripts` from dependencies on eject. ([@creynders](https://github.com/creynders)) - * [#1309](https://github.com/facebookincubator/create-react-app/pull/1309) Bump `babel-loader` version (#1009). ([@frontsideair](https://github.com/frontsideair)) - * [#1267](https://github.com/facebookincubator/create-react-app/pull/1267) Only gitignore directories in root, not deep. ([@jayphelps](https://github.com/jayphelps)) - + * [#2219](https://github.com/facebookincubator/create-react-app/pull/2219) Improve interaction between compile and runtime overlays ([@gaearon](https://github.com/gaearon)) + * [#2200](https://github.com/facebookincubator/create-react-app/pull/2200) Disable Uglify reduce_vars. ([@gaearon](https://github.com/gaearon)) + * [#2166](https://github.com/facebookincubator/create-react-app/pull/2166) Support hoisting `react-scripts` and add `require.resolve()` to loaders. ([@gaearon](https://github.com/gaearon)) + * [#2115](https://github.com/facebookincubator/create-react-app/pull/2115) Do not respect `.eslintignore`. ([@Timer](https://github.com/Timer)) + * [#2063](https://github.com/facebookincubator/create-react-app/pull/2063) Ignore yarn cache directory when searching for tests. ([@jmorrell](https://github.com/jmorrell)) + * [#2050](https://github.com/facebookincubator/create-react-app/pull/2050) Name development chunk names. ([@herrstucki](https://github.com/herrstucki)) + * [#2013](https://github.com/facebookincubator/create-react-app/pull/2013) Minify CSS post-webpack 2. ([@viankakrisna](https://github.com/viankakrisna)) + * [#1839](https://github.com/facebookincubator/create-react-app/pull/1839) Resolve `localhost` when offline (Windows). ([@bunshar](https://github.com/bunshar)) + * [#1301](https://github.com/facebookincubator/create-react-app/pull/1301) Bind to host environment variable. ([@GAumala](https://github.com/GAumala)) + * [#1890](https://github.com/facebookincubator/create-react-app/pull/1890) Ensure proxy url starts with `http://` or `https://`. ([@bunshar](https://github.com/bunshar)) + * [#1861](https://github.com/facebookincubator/create-react-app/pull/1861) Upgrade `detect-port`. ([@Andreyco](https://github.com/Andreyco)) + * [#1821](https://github.com/facebookincubator/create-react-app/pull/1821) Fix default responsive behavior in iOS 9+. ([@GreenGremlin](https://github.com/GreenGremlin)) + * [#1819](https://github.com/facebookincubator/create-react-app/pull/1819) Makes end-to-end testing crash on unhandled rejections. ([@dbismut](https://github.com/dbismut)) + * [#1810](https://github.com/facebookincubator/create-react-app/pull/1810) Fixes a silent crash when ejecting. ([@gaearon](https://github.com/gaearon)) + * [#1727](https://github.com/facebookincubator/create-react-app/pull/1727) Fix ejecting from a scoped fork. ([@gaearon](https://github.com/gaearon)) * `react-dev-utils` - - * [#1377](https://github.com/facebookincubator/create-react-app/pull/1377) webpack-dev-server patch for 'still-ok' success status. ([@TheBlackBolt](https://github.com/TheBlackBolt)) - * [#1274](https://github.com/facebookincubator/create-react-app/pull/1274) Downgrading to compatible version of SockJS-Client. ([@holloway](https://github.com/holloway)) - * [#1247](https://github.com/facebookincubator/create-react-app/pull/1247) Only open Chrome tab if BROWSER is missing or is Chrome. ([@gaearon](https://github.com/gaearon)) + * [#2076](https://github.com/facebookincubator/create-react-app/pull/2076) `openBrowser` now supports urls with more than one parameter. ([@alisonmonteiro](https://github.com/alisonmonteiro)) + * [#1690](https://github.com/facebookincubator/create-react-app/pull/1690) Fix `openBrowser()` when `BROWSER=open` on macOS. ([@bpierre](https://github.com/bpierre)) + * [#1696](https://github.com/facebookincubator/create-react-app/pull/1696) Fix an edge-case for people with the username `cwd`. ([@chrisdrackett](https://github.com/chrisdrackett)) +* `create-react-app` + * [#1863](https://github.com/facebookincubator/create-react-app/pull/1863) Check internet connectivity with lookup instead of resolve. ([@kdleijer](https://github.com/kdleijer)) + * [#1867](https://github.com/facebookincubator/create-react-app/pull/1867) Show package name in CLI. ([@mkazantsev](https://github.com/mkazantsev)) + * [#1706](https://github.com/facebookincubator/create-react-app/pull/1706) Properly extract package name for installing a tgz of scoped packages. ([@Timer](https://github.com/Timer)) + * [#1695](https://github.com/facebookincubator/create-react-app/pull/1695) Add diagnostic code. ([@tgig](https://github.com/tgig)) + * [#1675](https://github.com/facebookincubator/create-react-app/pull/1675) Fix project cleanup on Windows. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) + * [#1662](https://github.com/facebookincubator/create-react-app/pull/1662) Add project name validation. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) + * [#1669](https://github.com/facebookincubator/create-react-app/pull/1669) Fix react dependency versions during initial install. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) #### :nail_care: Enhancement - +* `react-dev-utils`, `react-scripts` + * [#2202](https://github.com/facebookincubator/create-react-app/pull/2202) Refactor and improve build output. ([@gaearon](https://github.com/gaearon)) + * [#2152](https://github.com/facebookincubator/create-react-app/pull/2152) Tweak error and warning output. ([@gaearon](https://github.com/gaearon)) + * [#1772](https://github.com/facebookincubator/create-react-app/pull/1772) Replace prompt function Inquirer.js. (#1767). ([@iansu](https://github.com/iansu)) + * [#1726](https://github.com/facebookincubator/create-react-app/pull/1726) Extract generic build functions to react-dev-utils. ([@viankakrisna](https://github.com/viankakrisna)) +* `react-dev-utils`, `react-error-overlay` + * [#2201](https://github.com/facebookincubator/create-react-app/pull/2201) Tweak error overlay styles. ([@bvaughn](https://github.com/bvaughn)) * `react-scripts` - - * [#1496](https://github.com/facebookincubator/create-react-app/pull/1496) Make build exit with error code when interrupted. ([@brandones](https://github.com/brandones)) - * [#1352](https://github.com/facebookincubator/create-react-app/pull/1352) More descriptive error message for `env.CI = true` warnings causing failures. ([@jayphelps](https://github.com/jayphelps)) - * [#1264](https://github.com/facebookincubator/create-react-app/pull/1264) Remove interactive shell check when opening browser on start. ([@CaryLandholt](https://github.com/CaryLandholt)) - * [#1311](https://github.com/facebookincubator/create-react-app/pull/1311) Updated `babel-jest` and `jest` packages to 18.0.0. ([@lopezator](https://github.com/lopezator)) - * [#1432](https://github.com/facebookincubator/create-react-app/pull/1432) Bump Jest version. ([@gaearon](https://github.com/gaearon)) - * [#1507](https://github.com/facebookincubator/create-react-app/pull/1507) fix: add yarn gitignores. ([@adjohnson916](https://github.com/adjohnson916)) - * [#1510](https://github.com/facebookincubator/create-react-app/pull/1510) Add missing `'\n'` to the end of `package.json` file. ([@pd4d10](https://github.com/pd4d10)) - * [#1324](https://github.com/facebookincubator/create-react-app/pull/1324) Use npm script hooks to avoid `&&` in deploy script. ([@zpao](https://github.com/zpao)) - + * [#2187](https://github.com/facebookincubator/create-react-app/pull/2187) Ignore Moment.js locales by default. ([@gaearon](https://github.com/gaearon)) + * [#1771](https://github.com/facebookincubator/create-react-app/pull/1771) Adding plugin postcss-flexbugs-fixes and flexbox: 'no-2009' to Autoprefixer. ([@cr101](https://github.com/cr101)) + * [#1614](https://github.com/facebookincubator/create-react-app/pull/1614) Upgrade to Jest ~~19~~ (now 20). ([@rogeliog](https://github.com/rogeliog)) + * [#1993](https://github.com/facebookincubator/create-react-app/pull/1993) Removed redundant UglifyJS options. ([@marcofugaro](https://github.com/marcofugaro)) + * [#1800](https://github.com/facebookincubator/create-react-app/pull/1800) Suggest `yarn build` instead of `yarn run build`. ([@geoffdavis92](https://github.com/geoffdavis92)) + * [#1760](https://github.com/facebookincubator/create-react-app/pull/1760) Suggest `serve` for running in production. ([@leo](https://github.com/leo)) + * [#1747](https://github.com/facebookincubator/create-react-app/pull/1747) Display `yarn` instead of `yarnpkg` when creating a new application. ([@lpalmes](https://github.com/lpalmes)) + * [#1433](https://github.com/facebookincubator/create-react-app/pull/1433) Modularise scripts. ([@djgrant](https://github.com/djgrant)) + * [#1677](https://github.com/facebookincubator/create-react-app/pull/1677) Add `X-FORWARDED` headers for proxy requests. ([@johann-sonntagbauer](https://github.com/johann-sonntagbauer)) +* `eslint-config-react-app`, `react-dev-utils` + * [#2186](https://github.com/facebookincubator/create-react-app/pull/2186) Tweak lint rules. ([@gaearon](https://github.com/gaearon)) +* `react-error-overlay`, `react-scripts` + * [#2171](https://github.com/facebookincubator/create-react-app/pull/2171) Use Jest 20. ([@gaearon](https://github.com/gaearon)) +* `babel-preset-react-app`, `eslint-config-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts` + * [#2170](https://github.com/facebookincubator/create-react-app/pull/2170) Bump dependencies. ([@gaearon](https://github.com/gaearon)) +* `eslint-config-react-app` + * [#2064](https://github.com/facebookincubator/create-react-app/pull/2064) Removing a stylistic lint rule. ([@anilreddykatta](https://github.com/anilreddykatta)) + * [#1763](https://github.com/facebookincubator/create-react-app/pull/1763) disable ignoring unused vars prefixed with _. ([@doshisid](https://github.com/doshisid)) + * [#1989](https://github.com/facebookincubator/create-react-app/pull/1989) Relax label rules (Closes [#1835](https://github.com/facebookincubator/create-react-app/issues/1835)). ([@anilreddykatta](https://github.com/anilreddykatta)) + * [#1773](https://github.com/facebookincubator/create-react-app/pull/1773) Remove 'guard-for-in' lint rule. ([@spicyj](https://github.com/spicyj)) +* `eslint-config-react-app`, `react-scripts` + * [#2130](https://github.com/facebookincubator/create-react-app/pull/2130) Blacklist confusing global variables. ([@doshisid](https://github.com/doshisid)) + * [#1542](https://github.com/facebookincubator/create-react-app/pull/1542) Bump jsx-a11y version. ([@bondz](https://github.com/bondz)) + * [#1705](https://github.com/facebookincubator/create-react-app/pull/1705) Add support for `ignoreRestSiblings` in `no-unused-vars`. ([@chrisdrackett](https://github.com/chrisdrackett)) +* `react-dev-utils` + * [#2125](https://github.com/facebookincubator/create-react-app/pull/2125) Only show the first compilation error. ([@gaearon](https://github.com/gaearon)) + * [#2120](https://github.com/facebookincubator/create-react-app/pull/2120) Omit ESLint warnings when there are ESLint errors. ([@gaearon](https://github.com/gaearon)) + * [#2113](https://github.com/facebookincubator/create-react-app/pull/2113) Prettify errors and warnings for Webpack 2. ([@gaearon](https://github.com/gaearon)) + * [#1842](https://github.com/facebookincubator/create-react-app/pull/1842) Modularize and extract crash overlay to iframe. ([@Timer](https://github.com/Timer)) * `create-react-app` - - * [#1270](https://github.com/facebookincubator/create-react-app/pull/1270) gh-1269: Enabling nested folder paths for project name. ([@dinukadesilva](https://github.com/dinukadesilva)) - + * [#1811](https://github.com/facebookincubator/create-react-app/pull/1811) Allow creation of apps in empty Mercurial repos. ([@GreenGremlin](https://github.com/GreenGremlin)) +* Other + * [#1402](https://github.com/facebookincubator/create-react-app/pull/1402) Create empty package.json in e2e test (#1401). ([@matoilic](https://github.com/matoilic)) #### :memo: Documentation - -* User Guide - - * [#1515](https://github.com/facebookincubator/create-react-app/pull/1515) readme: Advanced Configuration. ([@Timer](https://github.com/Timer)) - * [#1513](https://github.com/facebookincubator/create-react-app/pull/1513) clarifying the use of custom environment variables. ([@calweb](https://github.com/calweb)) - * [#1511](https://github.com/facebookincubator/create-react-app/pull/1511) Change "OS X" references to "macOS". ([@RodrigoHahn](https://github.com/RodrigoHahn)) - * [#1482](https://github.com/facebookincubator/create-react-app/pull/1482) Edit User Guide: Add ESLint config for VS Code users. ([@vulong23](https://github.com/vulong23)) - * [#1483](https://github.com/facebookincubator/create-react-app/pull/1483) Reflect websocket proxy support on README (#1013). ([@frontsideair](https://github.com/frontsideair)) - * [#1453](https://github.com/facebookincubator/create-react-app/pull/1453) Readme: Removes experimental from Jest snapshot. ([@frehner](https://github.com/frehner)) - * [#1437](https://github.com/facebookincubator/create-react-app/pull/1437) Added links to tutorials for integrating cra with an api backend. ([@alexdriaguine](https://github.com/alexdriaguine)) - * [#1422](https://github.com/facebookincubator/create-react-app/pull/1422) Add causes of dev server not detecting changes. ([@jetpackpony](https://github.com/jetpackpony)) - * [#1260](https://github.com/facebookincubator/create-react-app/pull/1260) Heroku Deployment: Adds a note on how to resolve "File/Module Not Found Errors" . ([@MsUzoAgu](https://github.com/MsUzoAgu)) - * [#1256](https://github.com/facebookincubator/create-react-app/pull/1256) Add "Changing the Page Title" to User Guide. ([@gaearon](https://github.com/gaearon)) - * [#1245](https://github.com/facebookincubator/create-react-app/pull/1245) Replace the Flow documentation section. ([@gaearon](https://github.com/gaearon)) - * [#1514](https://github.com/facebookincubator/create-react-app/pull/1514) corrected minor typo. ([@crowchirp](https://github.com/crowchirp)) - * [#1393](https://github.com/facebookincubator/create-react-app/pull/1393) replace two space syntax with br tag. ([@carlsagan21](https://github.com/carlsagan21)) - * [#1384](https://github.com/facebookincubator/create-react-app/pull/1384) Document Flow support. ([@dschep](https://github.com/dschep)) - -* READMEs - - * [#1375](https://github.com/facebookincubator/create-react-app/pull/1375) Change console.log for errors and warnings. ([@jimmyhmiller](https://github.com/jimmyhmiller)) - * [#1369](https://github.com/facebookincubator/create-react-app/pull/1369) Add missing import in react-dev-utils README.md. ([@pedronauck](https://github.com/pedronauck)) +* `react-scripts` + * [#2193](https://github.com/facebookincubator/create-react-app/pull/2193) Fix webpack config typo. ([@Justkant](https://github.com/Justkant)) + * [#2137](https://github.com/facebookincubator/create-react-app/pull/2137) Remove live-editing since isn't accurate. ([@cesarvarela](https://github.com/cesarvarela)) + * [#2114](https://github.com/facebookincubator/create-react-app/pull/2114) Update Sass README. ([@kellyrmilligan](https://github.com/kellyrmilligan)) + * [#2081](https://github.com/facebookincubator/create-react-app/pull/2081) Fixed link for storybook. ([@scottrangerio](https://github.com/scottrangerio)) + * [#2052](https://github.com/facebookincubator/create-react-app/pull/2052) Fix instructions for serving with now. ([@davidascher](https://github.com/davidascher)) + * [#2058](https://github.com/facebookincubator/create-react-app/pull/2058) Clarify `.eslintrc` effects. ([@luftywiranda13](https://github.com/luftywiranda13)) + * [#2054](https://github.com/facebookincubator/create-react-app/pull/2054) Suggest to create `.eslintrc` for IDE lint plugins. ([@gaearon](https://github.com/gaearon)) + * [#2033](https://github.com/facebookincubator/create-react-app/pull/2033) Fix Netlify heading level. ([@benpickles](https://github.com/benpickles)) + * [#1987](https://github.com/facebookincubator/create-react-app/pull/1987) Suggest `node-sass` alternative. ([@michaelwayman](https://github.com/michaelwayman)) + * [#1988](https://github.com/facebookincubator/create-react-app/pull/1988) Update doc server example to work from any directory. ([@isramos](https://github.com/isramos)) + * [#1982](https://github.com/facebookincubator/create-react-app/pull/1982) Update information in User Guide for Enzyme dependency. ([@josephrace](https://github.com/josephrace)) + * [#1911](https://github.com/facebookincubator/create-react-app/pull/1911) Suggest Yarn in HTML template. ([@tmos](https://github.com/tmos)) + * [#1869](https://github.com/facebookincubator/create-react-app/pull/1869) User Guide: Removed blockquote from code section, due to markdown conflict. ([@stochris](https://github.com/stochris)) + * [#1756](https://github.com/facebookincubator/create-react-app/pull/1756) Add Yarn steps for adding flow. ([@zertosh](https://github.com/zertosh)) + * [#1710](https://github.com/facebookincubator/create-react-app/pull/1710) Update now.sh deployment instructions. ([@replaid](https://github.com/replaid)) + * [#1717](https://github.com/facebookincubator/create-react-app/pull/1717) Add docs for apache's client side routing setting. ([@viankakrisna](https://github.com/viankakrisna)) + * [#1698](https://github.com/facebookincubator/create-react-app/pull/1698) Suggest to use `.env` for enabling polling mode. ([@gaearon](https://github.com/gaearon)) + * [#1687](https://github.com/facebookincubator/create-react-app/pull/1687) Fixed missing --recursive flag in first `npm run watch-css` command. ([@mklemme](https://github.com/mklemme)) + * [#1657](https://github.com/facebookincubator/create-react-app/pull/1657) Set Chrome userDataDir to be under .vscode folder. ([@ryansully](https://github.com/ryansully)) +* Other + * [#2135](https://github.com/facebookincubator/create-react-app/pull/2135) Add note about `yarn.lock`. ([@viankakrisna](https://github.com/viankakrisna)) + * [#2040](https://github.com/facebookincubator/create-react-app/pull/2040) Fix typo. ([@tijwelch](https://github.com/tijwelch)) + * [#1991](https://github.com/facebookincubator/create-react-app/pull/1991) Add folder structure docs for new contributors. ([@anilreddykatta](https://github.com/anilreddykatta)) + * [#1962](https://github.com/facebookincubator/create-react-app/pull/1962) Add sku to the list of alternatives. ([@markdalgleish](https://github.com/markdalgleish)) + * [#1799](https://github.com/facebookincubator/create-react-app/pull/1799) Improve phrasing. ([@moniuch](https://github.com/moniuch)) +* `babel-preset-react-app` + * [#1787](https://github.com/facebookincubator/create-react-app/pull/1787) Update side-effect documentation. ([@evenchange4](https://github.com/evenchange4)) #### :house: Internal - -* Internal Test Suite - - * [#1519](https://github.com/facebookincubator/create-react-app/pull/1519) Add test cases for PUBLIC_URL and relative path. ([@Timer](https://github.com/Timer)) - * [#1484](https://github.com/facebookincubator/create-react-app/pull/1484) Improve e2e-kitchensink and Jest coverage. ([@Timer](https://github.com/Timer)) - * [#1463](https://github.com/facebookincubator/create-react-app/pull/1463) Minor code style and wrong expect. ([@tuchk4](https://github.com/tuchk4)) - * [#1470](https://github.com/facebookincubator/create-react-app/pull/1470) E2e jsdom fix. ([@EnoahNetzach](https://github.com/EnoahNetzach)) - * [#1187](https://github.com/facebookincubator/create-react-app/pull/1187) Use a more sophisticated template for end-to-end testing.. ([@EnoahNetzach](https://github.com/EnoahNetzach)) - +* `react-scripts` + * [#2213](https://github.com/facebookincubator/create-react-app/pull/2213) Use some ES6 syntax. ([@shashkovdanil](https://github.com/shashkovdanil)) + * [#1913](https://github.com/facebookincubator/create-react-app/pull/1913) Add linked modules test. ([@Timer](https://github.com/Timer)) + * [#1736](https://github.com/facebookincubator/create-react-app/pull/1736) Fix eject for linked react-scripts. ([@tuchk4](https://github.com/tuchk4)) + * [#1741](https://github.com/facebookincubator/create-react-app/pull/1741) Fix internal linting setup. ([@gaearon](https://github.com/gaearon)) + * [#1730](https://github.com/facebookincubator/create-react-app/pull/1730) Fix Node 4 e2e tests. ([@Timer](https://github.com/Timer)) + * [#1715](https://github.com/facebookincubator/create-react-app/pull/1715) Remove unused `url` import in Webpack config. ([@pd4d10](https://github.com/pd4d10)) + * [#1700](https://github.com/facebookincubator/create-react-app/pull/1700) Update extract-text-webpack-plugin to stable. ([@SimenB](https://github.com/SimenB)) +* `react-dev-utils`, `react-scripts` + * [#2209](https://github.com/facebookincubator/create-react-app/pull/2209) Move more logic from react-scripts to react-dev-utils. ([@gaearon](https://github.com/gaearon)) + * [#2138](https://github.com/facebookincubator/create-react-app/pull/2138) Add custom eslint formatter. ([@doshisid](https://github.com/doshisid)) +* `babel-preset-react-app`, `react-scripts` + * [#2175](https://github.com/facebookincubator/create-react-app/pull/2175) Resolve regenerator runtime relative to react-scripts. ([@gaearon](https://github.com/gaearon)) + * [#1894](https://github.com/facebookincubator/create-react-app/pull/1894) Re-disable babel modules transform. ([@Timer](https://github.com/Timer)) + * [#1742](https://github.com/facebookincubator/create-react-app/pull/1742) Switch to preset-env. ([@Timer](https://github.com/Timer)) +* `create-react-app`, `react-dev-utils`, `react-scripts` + * [#1897](https://github.com/facebookincubator/create-react-app/pull/1897) Bump minimal Node version to 6. ([@ianschmitz](https://github.com/ianschmitz)) * Other + * [#1868](https://github.com/facebookincubator/create-react-app/pull/1868) Fix AppVeyor CI. ([@darrenscerri](https://github.com/darrenscerri)) + * [#1825](https://github.com/facebookincubator/create-react-app/pull/1825) Added test to check for accidental extraneous dependencies. ([@lpalmes](https://github.com/lpalmes)) + * [#1876](https://github.com/facebookincubator/create-react-app/pull/1876) Fix AppVeyor CI. ([@darrenscerri](https://github.com/darrenscerri)) + * [#1723](https://github.com/facebookincubator/create-react-app/pull/1723) Skip AppVeyor CI builds for Markdown changes. ([@gaearon](https://github.com/gaearon)) + * [#1707](https://github.com/facebookincubator/create-react-app/pull/1707) Add double quotes to escape spaces in paths in e2e. ([@viankakrisna](https://github.com/viankakrisna)) + * [#1688](https://github.com/facebookincubator/create-react-app/pull/1688) Pin and upgrade lerna version. ([@viankakrisna](https://github.com/viankakrisna)) + * [#1648](https://github.com/facebookincubator/create-react-app/pull/1648) Add `appveyor.yml`. ([@Timer](https://github.com/Timer)) +* `babel-preset-react-app`, `create-react-app`, `eslint-config-react-app`, `react-dev-utils`, `react-scripts` + * [#1738](https://github.com/facebookincubator/create-react-app/pull/1738) Update to modern code style (ES6). ([@tuchk4](https://github.com/tuchk4)) +* `eslint-config-react-app` + * [#1740](https://github.com/facebookincubator/create-react-app/pull/1740) Relax ESLint config peerDependency. ([@gaearon](https://github.com/gaearon)) +* `eslint-config-react-app`, `react-dev-utils`, `react-scripts` + * [#1729](https://github.com/facebookincubator/create-react-app/pull/1729) Lint internal scripts with eslint:recommended. ([@gaearon](https://github.com/gaearon)) +* `react-dev-utils` + * [#1724](https://github.com/facebookincubator/create-react-app/pull/1724) Don't use ES6 in a file that should run on Node 4. ([@gaearon](https://github.com/gaearon)) - * [#1289](https://github.com/facebookincubator/create-react-app/pull/1289) Remove path-exists from dependencies and replace it with fs.existsSync. ([@halfzebra](https://github.com/halfzebra)) - -#### Committers: 35 -- Alex Driaguine ([alexdriaguine](https://github.com/alexdriaguine)) -- Anders D. Johnson ([adjohnson916](https://github.com/adjohnson916)) -- Anthony F. ([frehner](https://github.com/frehner)) -- Brandon Istenes ([brandones](https://github.com/brandones)) -- Calvin Webster ([calweb](https://github.com/calweb)) -- Cary Landholt ([CaryLandholt](https://github.com/CaryLandholt)) -- Chandan Rai ([crowchirp](https://github.com/crowchirp)) -- Christian Raidl ([Chris-R3](https://github.com/Chris-R3)) +#### Committers: 66 +- Ade Viankakrisna Fadlil ([viankakrisna](https://github.com/viankakrisna)) +- Alison Monteiro ([alisonmonteiro](https://github.com/alisonmonteiro)) +- Almero Steyn ([AlmeroSteyn](https://github.com/AlmeroSteyn)) +- Andrej Badin ([Andreyco](https://github.com/Andreyco)) +- Andres Suarez ([zertosh](https://github.com/zertosh)) +- Asa Ayers ([AsaAyers](https://github.com/AsaAyers)) +- Ben Alpert ([spicyj](https://github.com/spicyj)) +- Ben Pickles ([benpickles](https://github.com/benpickles)) +- Bond ([bondz](https://github.com/bondz)) +- Brian Vaughn ([bvaughn](https://github.com/bvaughn)) +- Buns Shar ([bunshar](https://github.com/bunshar)) +- Cesar Varela ([cesarvarela](https://github.com/cesarvarela)) +- Chris Drackett ([chrisdrackett](https://github.com/chrisdrackett)) +- Cristian Rosescu ([cr101](https://github.com/cr101)) - Dan Abramov ([gaearon](https://github.com/gaearon)) -- Daniel Schep ([dschep](https://github.com/dschep)) -- David ([lopezator](https://github.com/lopezator)) -- Dinuka De Silva ([dinukadesilva](https://github.com/dinukadesilva)) -- Eduard Kyvenko ([halfzebra](https://github.com/halfzebra)) -- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach)) -- Fatih ([frontsideair](https://github.com/frontsideair)) +- Daniel Grant ([djgrant](https://github.com/djgrant)) +- Danil Shashkov ([shashkovdanil](https://github.com/shashkovdanil)) +- Darren Scerri ([darrenscerri](https://github.com/darrenscerri)) +- David ([dbismut](https://github.com/dbismut)) +- David Ascher ([davidascher](https://github.com/davidascher)) - Gabriel Aumala ([GAumala](https://github.com/GAumala)) -- Jay Phelps ([jayphelps](https://github.com/jayphelps)) -- Jih-Chi Lee ([jihchi](https://github.com/jihchi)) -- Jimmy Miller ([jimmyhmiller](https://github.com/jimmyhmiller)) +- Geoff Davis ([geoffdavis92](https://github.com/geoffdavis92)) +- Ian Schmitz ([ianschmitz](https://github.com/ianschmitz)) +- Ian Sutherland ([iansu](https://github.com/iansu)) +- Igor Ramos ([isramos](https://github.com/isramos)) +- James Blight ([jamesblight](https://github.com/jamesblight)) +- Jeffrey Posnick ([jeffposnick](https://github.com/jeffposnick)) +- Jeremy Morrell ([jmorrell](https://github.com/jmorrell)) +- Jeremy Stucki ([herrstucki](https://github.com/herrstucki)) - Joe Haddad ([Timer](https://github.com/Timer)) -- Johnny Magrippis ([jmagrippis](https://github.com/jmagrippis)) -- Jonathan Kim ([jkimbo](https://github.com/jkimbo)) -- MUA ([MsUzoAgu](https://github.com/MsUzoAgu)) -- Matthew Holloway ([holloway](https://github.com/holloway)) -- Nguyen Le Vu Long ([vulong23](https://github.com/vulong23)) -- Paul O’Shannessy ([zpao](https://github.com/zpao)) -- Pedro Nauck ([pedronauck](https://github.com/pedronauck)) -- Robbie H ([TheBlackBolt](https://github.com/TheBlackBolt)) -- Thibault Derousseaux ([tibdex](https://github.com/tibdex)) -- Valerii ([tuchk4](https://github.com/tuchk4)) -- Vasiliy Taranov ([jetpackpony](https://github.com/jetpackpony)) -- [RodrigoHahn](https://github.com/RodrigoHahn) -- creynders ([creynders](https://github.com/creynders)) +- Johann Hubert Sonntagbauer ([johann-sonntagbauer](https://github.com/johann-sonntagbauer)) +- Jonathan ([GreenGremlin](https://github.com/GreenGremlin)) +- Joseph Race ([josephrace](https://github.com/josephrace)) +- Kant ([Justkant](https://github.com/Justkant)) +- Kelly ([kellyrmilligan](https://github.com/kellyrmilligan)) +- Kent C. Dodds ([kentcdodds](https://github.com/kentcdodds)) +- Koen de Leijer ([kdleijer](https://github.com/kdleijer)) +- Leo Lamprecht ([leo](https://github.com/leo)) +- Lorenzo Palmes ([lpalmes](https://github.com/lpalmes)) +- Lufty Wiranda ([luftywiranda13](https://github.com/luftywiranda13)) +- Marco Fugaro ([marcofugaro](https://github.com/marcofugaro)) +- Mark Dalgleish ([markdalgleish](https://github.com/markdalgleish)) +- Mato Ilic ([matoilic](https://github.com/matoilic)) +- Maxim Kazantsev ([mkazantsev](https://github.com/mkazantsev)) +- Michael Hsu ([evenchange4](https://github.com/evenchange4)) +- Michael Wayman ([michaelwayman](https://github.com/michaelwayman)) +- Myk Klemme ([mklemme](https://github.com/mklemme)) +- Pierre Bertet ([bpierre](https://github.com/bpierre)) +- Rogelio Guzman ([rogeliog](https://github.com/rogeliog)) +- Rory Hunter ([pugnascotia](https://github.com/pugnascotia)) +- Ryan Platte ([replaid](https://github.com/replaid)) +- Ryan Sullivan ([ryansully](https://github.com/ryansully)) +- Scott Ranger ([scottrangerio](https://github.com/scottrangerio)) +- Siddharth Doshi ([doshisid](https://github.com/doshisid)) +- Simen Bekkhus ([SimenB](https://github.com/SimenB)) +- Simon Vocella ([voxsim](https://github.com/voxsim)) +- Stoicescu Cristi ([stochris](https://github.com/stochris)) +- Tim Welch ([tijwelch](https://github.com/tijwelch)) +- Tom Canac ([tmos](https://github.com/tmos)) +- Tom Dunlap ([motevets](https://github.com/motevets)) +- Travis Giggy ([tgig](https://github.com/tgig)) +- Valerii Sorokobatko ([tuchk4](https://github.com/tuchk4)) +- alberto ([alberto](https://github.com/alberto)) +- anraka ([anilreddykatta](https://github.com/anilreddykatta)) +- moniuch ([moniuch](https://github.com/moniuch)) - pd4d10 ([pd4d10](https://github.com/pd4d10)) -- soo ([carlsagan21](https://github.com/carlsagan21)) - -### Migrating from 0.8.5 to 0.9.0 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.9.0 -``` - -Then, run your tests. If you are affected by breaking changes from Jest 18, consult [blog post](https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html), [changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md#jest-1800), and [documentation](http://facebook.github.io/jest/docs/getting-started.html). You might need to update any snapshots since their format might have changed. - -If you relied on the browser not starting in non-interactive terminals, you now need to explicitly specify `BROWSER=none` as an environment variable to disable it. - -## 0.8.5 (January 9, 2017) - -Thanks to [@fson](https://github.com/fson) for cutting this release. - -#### :bug: Bug Fix -* `create-react-app`, `react-scripts` - * [#1365](https://github.com/facebookincubator/create-react-app/pull/1365) Use yarnpkg alias to run Yarn. ([@fson](https://github.com/fson)) - - Fixes an issue where running `create-react-app` failed on systems with Apache Hadoop installed because it falsely detected Hadoop YARN executable as Yarn package manager. - -#### Committers: 1 -- Ville Immonen ([fson](https://github.com/fson)) - -### Migrating from 0.8.4 to 0.8.5 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.8.5 -``` - -You may also optionally update the global command-line utility: - -``` -npm install -g create-react-app@1.0.3 -``` - -## 0.8.4 (December 11, 2016) - -#### :bug: Bug Fix -* `react-scripts` - - * [#1233](https://github.com/facebookincubator/create-react-app/pull/1233) Disable subresource integrity temporarily. ([@Timer](https://github.com/Timer)) - - We added [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) checks to the build output in 0.8.2 but it turns out that they may fail in browsers using special compression proxies, such as Chrome on Android, when served over HTTP. We disabled the checks until we can find a safe way to add them. - -* `react-dev-utils` - - * [#1226](https://github.com/facebookincubator/create-react-app/pull/1226) Fix weird lint output. ([@n3tr](https://github.com/n3tr)) - - Fixes strange lint message formatting in some edge cases. - - * [#1215](https://github.com/facebookincubator/create-react-app/pull/1215) Fix - openChrome won't open default browser (using Canary). ([@n3tr](https://github.com/n3tr)) - - Fixes a regression that caused stable Google Chrome to be opened even if you are using Canary as the default browser. - -* `create-react-app` - - * [#1223](https://github.com/facebookincubator/create-react-app/pull/1223) Clean up Yarn detection and install code. ([@fson](https://github.com/fson)) - - Fixes noisy output on Windows when Yarn is not installed. - - * [#1224](https://github.com/facebookincubator/create-react-app/pull/1224) Exit with an error code when npm/yarn install fails. ([@fson](https://github.com/fson)) - -#### :nail_care: Enhancement -* `react-scripts` - - * [#1237](https://github.com/facebookincubator/create-react-app/pull/1237) Clear scrollback in test mode. ([@gaearon](https://github.com/gaearon)) - - Ensures test watcher clears the console before running. - - * [#1229](https://github.com/facebookincubator/create-react-app/pull/1229) Disable jest watch mode when --coverage flag is present [#1207]. ([@BenoitAverty](https://github.com/BenoitAverty)) - - Since coverage doesn't work well with watch mode, we don’t run the watcher on `npm test -- --coverage` anymore. - - * [#1212](https://github.com/facebookincubator/create-react-app/pull/1212) Proxy rewrites Origin header to match the target server URL. ([@koles](https://github.com/koles)) - - Makes sure more API endpoints can work with the `proxy` setting. - - * [#1222](https://github.com/facebookincubator/create-react-app/pull/1222) Disable gh-page setup instruction if scripts.deploy has been added. ([@n3tr](https://github.com/n3tr)) - - Suppresses the instructions printed at the end of `npm run build` if `npm run deploy` already exists. - -* `create-react-app` - - * [#1236](https://github.com/facebookincubator/create-react-app/pull/1236) Tweak console messages. ([@gaearon](https://github.com/gaearon)) - - Makes error messages more friendly. - - * [#1195](https://github.com/facebookincubator/create-react-app/pull/1195) Use "commander" for cli argv handling. ([@EnoahNetzach](https://github.com/EnoahNetzach)) - - Adds `create-react-app --help` with a list of options. - -* `react-dev-utils` - - * [#1211](https://github.com/facebookincubator/create-react-app/pull/1211) Use a better clear console sequence. ([@gaearon](https://github.com/gaearon)) - - Ensures the development server clears the terminal when files are changed. - -#### :memo: Documentation -* `react-dev-utils` - - * [#1232](https://github.com/facebookincubator/create-react-app/pull/1232) [documentation] fix html-dev-plugin link in react-dev-utils doc. ([@shogunsea](https://github.com/shogunsea)) - -* `react-scripts` - - * [#1220](https://github.com/facebookincubator/create-react-app/pull/1220) Adding troubleshooting information about Subresource Integrity digests.. ([@dfbaskin](https://github.com/dfbaskin)) - -#### :house: Internal -* `react-scripts` - - * [#1214](https://github.com/facebookincubator/create-react-app/pull/1214) Bump babel-eslint version. ([@existentialism](https://github.com/existentialism)) - -#### Committers: 10 -- Benoit Averty ([BenoitAverty](https://github.com/BenoitAverty)) -- Brian Ng ([existentialism](https://github.com/existentialism)) -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Dave Baskin ([dfbaskin](https://github.com/dfbaskin)) -- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach)) -- Jirat Ki. ([n3tr](https://github.com/n3tr)) -- Joe Haddad ([Timer](https://github.com/Timer)) -- Pavel Kolesnikov ([koles](https://github.com/koles)) -- Shogun Sea ([shogunsea](https://github.com/shogunsea)) -- Ville Immonen ([fson](https://github.com/fson)) - -### Migrating from 0.8.3 to 0.8.4 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.8.4 -``` - -You may also optionally update the global command-line utility: - -``` -npm install -g create-react-app@1.0.2 -``` - -## 0.8.3 (December 8, 2016) - -#### :bug: Bug Fix -* `create-react-app` - * [#1204](https://github.com/facebookincubator/create-react-app/pull/1204) Catch synchronous errors from spawning yarn. ([@gaearon](https://github.com/gaearon)) - - Fixes a crash when running `create-react-app` in some cases. - -* `react-scripts` - * [#1203](https://github.com/facebookincubator/create-react-app/pull/1203) Update webpack-subresource-integrity to fix Windows builds. ([@gaearon](https://github.com/gaearon)) - - Fixes a crash when running `npm run build` on Windows. - - * [#1201](https://github.com/facebookincubator/create-react-app/pull/1201) Instruct Jest to load native components from RNW instead of RN. ([@remon-georgy](https://github.com/remon-georgy)) - - Fixes tests for users of React Native Web. - -#### :memo: Documentation -* `react-scripts` - - * [#806](https://github.com/facebookincubator/create-react-app/pull/806) Add syntax highlighting configuration guide. ([@mareksuscak](https://github.com/mareksuscak)) - -#### Committers: 3 -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Marek Suscak ([mareksuscak](https://github.com/mareksuscak)) -- Remon Georgy ([remon-georgy](https://github.com/remon-georgy)) - -### Migrating from 0.8.2 to 0.8.3 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.8.3 -``` - -You can optionally update the global CLI too: - -``` -npm install -g create-react-app@1.0.1 -``` - -## 0.8.2 (December 7, 2016) - -#### :rocket: New Feature -* `react-scripts` - * [#1176](https://github.com/facebookincubator/create-react-app/pull/1176) Add Subresource Integrity support. ([@XVincentX](https://github.com/XVincentX)) - - The generated HTML now includes [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) attributes ensuring that your users aren't served malicious code if your CDN gets compromised. - -#### :bug: Bug Fix -* `react-scripts` - * [#1197](https://github.com/facebookincubator/create-react-app/pull/1197) Let Jest handle all file types. ([@gaearon](https://github.com/gaearon)) - - Since 0.8.0, we started treating imports of any unknown file extensions as URLs. However, we had to revert this change for the test configuration in 0.8.1 because of a bug causing false positives. In 0.8.2, we are fixing this and making test configuration treat imports with unknown extensions the same way as we do in the browser environment. - - * [#1194](https://github.com/facebookincubator/create-react-app/pull/1194) Only honor relative `NODE_PATH`. ([@gaearon](https://github.com/gaearon)) - - Historically we have allowed specifying `NODE_PATH` environment variable as a way to allow “absolute imports”. For example, running `NODE_PATH=src npm start` in Bash or `set NODE_PATH=src&&npm start` in Windows Cmd would let you import anything inside `src` without specifying a relative path. However, we found a few nasty edge cases when Node.js core modules end up being in `NODE_PATH` and erroneously become bundled. As a result the build would crash on some systems when some libraries are imported. To fix this, we now only honor relative paths from `NODE_PATH` in Create React App. This means the existing use case for absolute imports is still supported (`src` in the example above is relative), but absolute paths in `NODE_PATH` (such as paths to Node.js core modules) will be ignored. - - * [#1188](https://github.com/facebookincubator/create-react-app/pull/1188) Update Webpack to fix source map issues. ([@gaearon](https://github.com/gaearon)) - - Since 0.8.0, we show source maps in development instead of the compiled code. However, it has come to our attention that Webpack's source map implementation had issues interpreting Babel output, and caused source maps to be wrong and breakpoints to be unusable in some cases. Webpack has released a fix for this, and we have updated the minimal version of Webpack that we are using. - - * [#1180](https://github.com/facebookincubator/create-react-app/pull/1180) Use `file-loader` for svgs. ([@bogdansoare](https://github.com/bogdansoare)) - - Since 0.8.0, we are treating all imports with non-JS/CSS extensions the same way. Importing them gives you a string with their URL, and if their content is small enough (less than 10K), the URL is in fact an inlined [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs). However, this doesn't work well with SVGs in case you use them for a sprite system since fragments don't work in data URIs, and it's wasteful to inline the same sprite SVG many times. To fix this, we have added an exception so that SVG files never get inlined. - -* `react-dev-utils` - * [#1165](https://github.com/facebookincubator/create-react-app/pull/1165) Chrome 'open tab' reuse an empty tab when possible. ([@n3tr](https://github.com/n3tr)) - - Fixes an issue that caused two tabs to get opened instead of just one. It also fixes some cases where the window with the existing tab would not get activated. - -* `babel-preset-react-app` - * [#1179](https://github.com/facebookincubator/create-react-app/pull/1179) Fix Babel issues in tests by applying the right transforms. ([@gaearon](https://github.com/gaearon)) - - Fixes regressions in test environment that caused syntax errors with generators and `async` / `await`. - -#### :nail_care: Enhancement -* `eslint-config-react-app` - * [#1191](https://github.com/facebookincubator/create-react-app/pull/1191) Relax peerDependencies for ESLint preset. ([@gaearon](https://github.com/gaearon)) - - This allows the preset to be used in more apps without peer dependency conflicts. We still pin the exact versions in apps that haven't ejected for extra safety. - - * [#1159](https://github.com/facebookincubator/create-react-app/pull/1159) Make jsx-no-undef rule an error. ([@existentialism](https://github.com/existentialism)) - - Using an undefined type in JSX is now treated as a hard lint error because it is guaranteed to crash application at runtime. - -* `react-scripts` - * [#1175](https://github.com/facebookincubator/create-react-app/pull/1175) Remove path module from webpack config on eject. ([@harunhasdal](https://github.com/harunhasdal)) - - This makes the output after ejecting a bit cleaner. - - * [#1120](https://github.com/facebookincubator/create-react-app/pull/1120) Add `testURL` to Jest config. ([@spudly](https://github.com/spudly)) - - This fixes an error when running tests that interact with History API in jsdom. - -#### :memo: Documentation -* `react-scripts` - * [#1143](https://github.com/facebookincubator/create-react-app/pull/1143) Add deploy to Firebase CDN on template's README (Closes [#374](https://github.com/facebookincubator/create-react-app/issues/374)). ([@guilhermebruzzi](https://github.com/guilhermebruzzi)) - * [#1099](https://github.com/facebookincubator/create-react-app/pull/1099) Fix minor typo/grammar. ([@alex-wilmer](https://github.com/alex-wilmer)) - * [#1168](https://github.com/facebookincubator/create-react-app/pull/1168) Add "npm run build silently fails" to Troubleshooting. ([@gaearon](https://github.com/gaearon)) - -#### Committers: 12 -- Alex Wilmer ([alex-wilmer](https://github.com/alex-wilmer)) -- Bogdan Soare ([bogdansoare](https://github.com/bogdansoare)) -- Brian Ng ([existentialism](https://github.com/existentialism)) -- Dan Abramov ([gaearon](https://github.com/gaearon)) -- Fabrizio Castellarin ([EnoahNetzach](https://github.com/EnoahNetzach)) -- Guilherme Heynemann Bruzzi ([guilhermebruzzi](https://github.com/guilhermebruzzi)) -- Harun ([harunhasdal](https://github.com/harunhasdal)) -- James Newell ([jameslnewell](https://github.com/jameslnewell)) -- Jirat Ki. ([n3tr](https://github.com/n3tr)) -- Li Xuanji ([zodiac](https://github.com/zodiac)) -- Stephen John Sorensen ([spudly](https://github.com/spudly)) -- Vincenzo Chianese ([XVincentX](https://github.com/XVincentX)) - -### Migrating from 0.8.1 to 0.8.2 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.8.2 -``` - -## 0.8.1 (December 4, 2016) - -Thanks to [@fson](https://github.com/fson) for cutting this release. - -#### :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 (December 3, 2016) - -Thanks to [@fson](https://github.com/fson) for cutting this release. - -#### :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) - -Thanks to [@fson](https://github.com/fson) for cutting this release. - -### Build Dependency (`react-scripts`) - -* Updates Jest to [version 16.0](http://facebook.github.io/jest/blog/2016/10/03/jest-16.html), with an upgraded CLI, improved snapshot testing, new matchers and more. ([@chase](https://github.com/chase) in [#858](https://github.com/facebookincubator/create-react-app/pull/858)) -* Test setup file `src/setupTests.js` is now called after test framework initialization to support loading custom matchers. ([@just-boris](https://github.com/just-boris) in [#846](https://github.com/facebookincubator/create-react-app/pull/846)) -* Build command shows better instructions for deploying the app to GitHub Pages ([@Janpot](https://github.com/Janpot) in [#841](https://github.com/facebookincubator/create-react-app/pull/841)) -* Build command now generates an asset manifest with mappings from each filename to its final output filename. ([@lukyth](https://github.com/lukyth) in [#891](https://github.com/facebookincubator/create-react-app/pull/891)) -* Build command exits, if there are errors from UglifyJS ([@pdillon](https://github.com/pdillon) in [#859](https://github.com/facebookincubator/create-react-app/pull/859)) -* Eject output is more beautiful now. ([@azakordonets](https://github.com/azakordonets) in [#769](https://github.com/facebookincubator/create-react-app/pull/769)) -* Fixes opening the app in a new tab in Chrome. ([@unixdev](https://github.com/unixdev) in [#831](https://github.com/facebookincubator/create-react-app/pull/831)) -* Fixes environment variables not being defined as normal properties of the `process.env` object. ([@dvkndn](https://github.com/dvkndn) in [#807](https://github.com/facebookincubator/create-react-app/pull/807)) -* Fixes PostCSS autoprefixer not processing CSS files imported with CSS `@import` statements. ([@nhunzaker](https://github.com/nhunzaker) in [#929](https://github.com/facebookincubator/create-react-app/pull/929)) - -### ESLint Config (`eslint-config-react-app`) - -* Adds `import/no-webpack-loader-syntax` rule that forbids using custom Webpack specific syntax to specify Webpack loaders in import statements. ([@fson](https://github.com/fson) in [#803](https://github.com/facebookincubator/create-react-app/pull/803)) -* `react/react-in-jsx-scope` rule ("React must be in scope") is now an error. ([@gaearon](https://github.com/gaearon) in [#822](https://github.com/facebookincubator/create-react-app/pull/822)) -* `no-unused-expressions` rule now allows the use of short circuit and ternary expressions. ([@cannona](https://github.com/cannona) in [#724](https://github.com/facebookincubator/create-react-app/pull/724)) - -### Babel Preset (`babel-preset-react-app`) - -* The preset now detects the Node.js version in test environment and disables unnecessary ES2015 transforms using `babel-preset-env`. ([@shubheksha](https://github.com/shubheksha) in [#878](https://github.com/facebookincubator/create-react-app/pull/878), [@JeffreyATW](https://github.com/JeffreyATW) in [#927 -](https://github.com/facebookincubator/create-react-app/pull/927)) -* Fixes a duplicate dependency on `babel-plugin-transform-regenerator`. ([@akofman](https://github.com/akofman) in [#864](https://github.com/facebookincubator/create-react-app/pull/864)) - -### Utilities (`react-dev-utils`) - -* The error overlay is now disposed after fixing linting errors. ([@jarlef](https://github.com/jarlef) in [#856](https://github.com/facebookincubator/create-react-app/pull/856)) -* Adds support for Webpack 2 to `webpackHotDevClient`. ([@michalkvasnicak](https://github.com/michalkvasnicak) in [#840](https://github.com/facebookincubator/create-react-app/pull/840)) - -### Global CLI (`create-react-app`) - -* Adds support for passing a scoped package name to the `--scripts-version` argument. ([@pdillon](https://github.com/pdillon) in [#826](https://github.com/facebookincubator/create-react-app/pull/826)) -* Fixes installing pre-release versions using a tarball URL with the `--scripts-version` argument. ([@jihchi](https://github.com/jihchi) in [#876](https://github.com/facebookincubator/create-react-app/pull/876)) - -### Migrating from 0.6.1 to 0.7.0 - -You may optionally update the global command (it’s not required): - -``` -npm install -g create-react-app@0.6.0 -``` - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.7.0 -``` - -### Breaking Change in 0.7.0 - -#### Updating Snapshots - -Jest 16 includes [improvements to snapshot testing and changes to the snapshot format](https://facebook.github.io/jest/blog/2016/10/03/jest-16.html#snapshot-updates). If your project uses snapshot testing, you'll need to update the snapshot files. To update the snapshots, run: -``` -npm test -- -u -``` - -## 0.6.1 (September 27, 2016) - -### Build Dependency (`react-scripts`) - -* 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)) - -### Utilities (`react-dev-utils`) - -* Fixes the syntax error overlay padding. ([@fson](https://github.com/fson) in [#758](https://github.com/facebookincubator/create-react-app/pull/758)) - -### Migrating from 0.6.0 to 0.6.1 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.6.1 -``` - -## 0.6.0 (September 25, 2016) - -### Build Dependency (`react-scripts`) - -* Adds an overlay for syntax errors in development. ([@gaearon](https://github.com/gaearon) in [#744](https://github.com/facebookincubator/create-react-app/pull/744)) - -### Utilities (`react-dev-utils`) - -* Adds an alternative WebpackDevServer client that displays the error overlay. ([@gaearon](https://github.com/gaearon) in [#744](https://github.com/facebookincubator/create-react-app/pull/744)) - -### Migrating from 0.5.1 to 0.6.0 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.6.0 -``` - -**Note: If the project fails to start, remove `node_modules`, ensure `react-scripts` is `0.6.0` in your `package.json`, and run `npm install` again. There seems to be an [npm bug](https://github.com/npm/npm/issues/14073) affecting this update.** - -## 0.5.1 (September 23, 2016) - -### Build Dependency (`react-scripts`) - -* Updates `react-dev-utils` dependency - -### Utilities (`react-dev-utils`) - -* Fixes `%PUBLIC_URL%` replacement to work when specified multiple times. ([@fson](https://github.com/fson) in [#731](https://github.com/facebookincubator/create-react-app/pull/731)) - -### Migrating from 0.5.0 to 0.5.1 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.5.1 -``` - -## 0.5.0 (September 23, 2016) - -### Build Dependency (`react-scripts`) - -* Adds [support for `public` folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder) with arbitrary assets. ([@gaearon](https://github.com/gaearon) in [#703](https://github.com/facebookincubator/create-react-app/pull/703)) -* You can now [specify defaults](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-development-environment-variables-in-env) for environment variables with `.env` file. ([@ayrton](https://github.com/ayrton) in [#695](https://github.com/facebookincubator/create-react-app/pull/695)) -* Ejecting now generates proper `.babelrc` and `.eslintrc`. ([@fson](https://github.com/fson) in [#689](https://github.com/facebookincubator/create-react-app/pull/689), [@gaearon](https://github.com/gaearon) in [#705](https://github.com/facebookincubator/create-react-app/pull/705)) -* Some React warnings now [include the component stacktrace](https://twitter.com/dan_abramov/status/779308833399332864). ([@gaearon](https://github.com/gaearon) in [#716](https://github.com/facebookincubator/create-react-app/pull/716)) -* `npm start` doesn’t fail in a composed Docker container. ([@arekkas](https://github.com/arekkas) in [#711](https://github.com/facebookincubator/create-react-app/issues/711)) -* The projects generated with `eject` are now cleaner. ([@gaearon](https://github.com/gaearon) in [#723](https://github.com/facebookincubator/create-react-app/pull/723)) -* The project is now managed as a monorepo. ([@ryanyogan](https://github.com/ryanyogan) in [#419](https://github.com/facebookincubator/create-react-app/pull/419), [@fson](https://github.com/fson) in [#678](https://github.com/facebookincubator/create-react-app/pull/678)) - -### ESLint Config (`eslint-config-react-app`) - -* Published for the first time! ([@fson](https://github.com/fson) in [#689](https://github.com/facebookincubator/create-react-app/pull/689)) -* Added [`react/no-danger-with-children`](https://github.com/yannickcr/eslint-plugin-react/blob/v6.3.0/docs/rules/no-danger-with-children.md) and [`react/style-prop-object`](https://github.com/yannickcr/eslint-plugin-react/blob/v6.3.0/docs/rules/style-prop-object.md) rules. ([@fson](https://github.com/fson) in [#696](https://github.com/facebookincubator/create-react-app/pull/696)) - -### Babel Preset (`babel-preset-react-app`) - -* Published for the first time! ([@fson](https://github.com/fson) in [#701](https://github.com/facebookincubator/create-react-app/pull/701)) - -### Utilities (`react-dev-utils`) - -* Published for the first time! ([@gaearon](https://github.com/gaearon) in [#723](https://github.com/facebookincubator/create-react-app/pull/723)) - -### Global CLI (`create-react-app`) - -* Added `README` to npm. There were no other changes. - -### Migrating from 0.4.3 to 0.5.0 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.5.0 -``` - -### Breaking Changes in 0.5.0 - -#### Global ESLint Plugin Versions - -If you used a global ESLint installation for the editor integration, you’ll need to install [these versions of global ESLint packages](https://github.com/facebookincubator/create-react-app/blob/c092086b1b256fd081f10744f90d216dd5217e29/packages/eslint-config-react-app/package.json#L14-L19). - -#### Moving `index.html` into `public` Folder - -You’ll also need to create a new folder called `public` in the root of your project. Then, move `index.html` and files it references (such as a favicon) into that folder. - -You can no longer reference any files from `./src` in `index.html`. Instead, `public/index.html` can now only reference files other inside of the `public` folder using a special variable called `%PUBLIC_URL%`. - -For example, instead of: - -```js -<link rel="shortcut icon" href="./src/favicon.ico"> -``` - -You would need to move both `index.html` and `src/favicon.ico` into the `public` folder, and change `<link>` to look like this: - -```html -<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico"> -``` - -This ensures it become a part of the build output, and resolves correctly both with client-side routing and non-root `homepage` in `package.json`. Read more about [using the `public` folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder) and [why these changes were made](https://github.com/facebookincubator/create-react-app/pull/703). - -## 0.4.3 (September 18, 2016) - -This is a hotfix release for a broken package.<br> -It contained no changes to the code. - -### Build Dependency (`react-scripts`) - -* Fixes a packaging issue that affected npm 2. ([#676](https://github.com/facebookincubator/create-react-app/issues/676)) - -### Migrating from 0.4.2 to 0.4.3 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.4.3 -``` - -## 0.4.2 (September 18, 2016) - -### Build Dependency (`react-scripts`) - -* Lint output in editor is now opt-in because, due to [this ESLint issue](https://github.com/eslint/eslint/issues/3458), it is broken by default in Atom. ([@fson](https://github.com/fson) in [#649](https://github.com/facebookincubator/create-react-app/pull/649)) -* Fixes an issue causing compile errors when project folder is inside a symlink. ([@motiz88](https://github.com/motiz88) in [#648](https://github.com/facebookincubator/create-react-app/pull/648)) -* You can now import `jpeg`, `wav`, `mp3`, `m4a`, `aac`, and `oga`. ([@mareksuscak](https://github.com/mareksuscak) in [#624](https://github.com/facebookincubator/create-react-app/pull/624), [@danharper](https://github.com/danharper) in [#665](https://github.com/facebookincubator/create-react-app/pull/665)) -* Fixes false positives caused by the case sensitive import warning on Windows. ([@Urthen](https://github.com/Urthen) in [#593](https://github.com/facebookincubator/create-react-app/pull/593)) -* With Docker, `*.json.gzip` files are no longer created in the project folder. ([@thangngoc89](https://github.com/thangngoc89) in [#620](https://github.com/facebookincubator/create-react-app/pull/620)) -* Proxy network errors now abort requests instead of hanging. ([@cloudmu](https://github.com/cloudmu) in [#588](https://github.com/facebookincubator/create-react-app/pull/588)) -* Connection to the development server does not get interrupted in HTTPS mode. ([@dceddia](https://github.com/dceddia) in [#652](https://github.com/facebookincubator/create-react-app/pull/652)) -* Unsupported Node versions now print a warning. ([@fson](https://github.com/fson) in [#575](https://github.com/facebookincubator/create-react-app/pull/575)) -* Importing assets with special characters like `@` now works with tests. ([@fson](https://github.com/fson) in [#584](https://github.com/facebookincubator/create-react-app/pull/584)) -* Undefined variable lint rule is promoted from a warning to an error. ([@gaearon](https://github.com/gaearon) in [#669](https://github.com/facebookincubator/create-react-app/pull/669)) -* Variables starting with underscore no longer trigger the “unused variable” rule. ([@valscion](https://github.com/valscion) in [#640](https://github.com/facebookincubator/create-react-app/pull/640)) -* We now print a friendly error when required files are missing. ([@vnctaing](https://github.com/vnctaing) in [#653](https://github.com/facebookincubator/create-react-app/pull/653)) -* The output after creating a project is better formatted. ([@btnwtn](https://github.com/btnwtn) in [#629](https://github.com/facebookincubator/create-react-app/pull/629)) -* Development server logs are less noisy. ([@gaearon](https://github.com/gaearon) in [122068](https://github.com/facebookincubator/create-react-app/commit/1220683276dd9eb2f2719aece7f40bf2ffb397b4)) - -### Global CLI (`create-react-app`) - -* It now runs on early Node versions to print a friendly warning instead of crashing. ([@sotojuan](https://github.com/sotojuan) in [fc3ab4](https://github.com/facebookincubator/create-react-app/commit/fc3ab46d2a54f142f9287ce7de9ab2fc2514487d)) -* We now print a friendly message when you create a project with invalid name. ([@mareksuscak](https://github.com/mareksuscak) in [#628](https://github.com/facebookincubator/create-react-app/pull/628)) -* Passing a custom fork of `react-scripts` to `create-react-app` with `--scripts-version` works again. ([@yesmeck](https://github.com/yesmeck) in [#632](https://github.com/facebookincubator/create-react-app/pull/632)) - -### Migrating from 0.4.1 to 0.4.2 - -You may optionally update the global command (it’s not required): - -``` -npm install -g create-react-app@0.4.2 -``` - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.4.2 -``` - -## 0.4.1 (September 3, 2016) - -### Build Dependency (`react-scripts`) - -* We now support (but [don’t recommend](https://github.com/facebookincubator/create-react-app/issues/87#issuecomment-234627904)) `.jsx` file extension. ([@tizmagik](https://github.com/tizmagik) in [#563](https://github.com/facebookincubator/create-react-app/pull/563)) -* Proxy request errors are now printed to the console. ([@cloudmu](https://github.com/cloudmu) in [#502](https://github.com/facebookincubator/create-react-app/pull/502)) - -### Migrating from 0.4.0 to 0.4.1 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.4.1 -``` - -## 0.4.0 (September 2, 2016) - -### Build Dependency (`react-scripts`) - -* **Breaking Change:** Disabled implicit serving of source files in development. ([@gaearon](https://github.com/gaearon) in [#551](https://github.com/facebookincubator/create-react-app/pull/551)) -* You can use `NODE_PATH` environment variable for absolute `import` paths. ([@jimmyhmiller](https://github.com/jimmyhmiller) in [#476](https://github.com/facebookincubator/create-react-app/pull/476)) -* If `src/setupTests.js` exists, it will be used to setup the test environment. ([@gaelduplessix](https://github.com/gaelduplessix) in [#548](https://github.com/facebookincubator/create-react-app/pull/548)) -* If `HTTPS` environment variable is set to `true`, development server will run in HTTPS mode. ([@dceddia](https://github.com/dceddia) in [#552](https://github.com/facebookincubator/create-react-app/pull/552)) - -### Migrating from 0.3.1 to 0.4.0 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.4.0 -``` - -### Breaking Change in 0.4.0 - -Paths like `/src/somefile.png` used to be served in development, but only by accident. They never worked in production builds. Since 0.4.0, we [don’t serve static files by default in development anymore either](https://github.com/facebookincubator/create-react-app/pull/551). This removes a dangerous inconsistency that we never intentionally supported. - -If you need a static file to be part for the build, [import it from JavaScript and you will get its filename](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#adding-images-and-fonts). This ensures it gets included into the production build as well, and its filename contains the content hash. - -If you used static files with `<link href>`, [read this new guide](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#referring-to-static-assets-from-link-href) on how to make sure these files get included into the builds. For example, you can replace `<link href="/src/favicons/favicon-32.png">` with `<link href="./src/favicons/favicon-32.png">`, and then Webpack will recognize it and include it into the build. - -If you referenced some other files from `index.html`, please file an issue to discuss your use case. In the meantime, you can serve them from a separate static server until your use case is supported. - -## 0.3.1 (September 2, 2016) - -### Build Dependency (`react-scripts`) - -* Bumps Jest dependency to fix a few issues discovered yesterday. ([@cpojer](https://github.com/cpojer) in [facebook/jest#1580](https://github.com/facebook/jest/pull/1580), [@insin](https://github.com/insin) in [facebook/jest#1574](https://github.com/facebook/jest/pull/1574)) - -### Migrating from 0.3.0 to 0.3.1 - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.3.1 -``` - -## 0.3.0 (September 1, 2016) - -### Build Dependency (`react-scripts`) - -* Testing is [now supported](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#running-tests)! ([Jest project contributors](https://github.com/facebook/jest/pulls?q=is%3Apr+is%3Aclosed), [@cpojer](https://github.com/cpojer) in [#250](https://github.com/facebookincubator/create-react-app/pull/250), [@gaearon](https://github.com/gaearon) in [#378](https://github.com/facebookincubator/create-react-app/pull/378), [#530](https://github.com/facebookincubator/create-react-app/pull/530), [#533](https://github.com/facebookincubator/create-react-app/pull/533)) -* Static files such as CSS, images, and fonts, can now exist outside `src` directory. ([@fson](https://github.com/fson) in [#504](https://github.com/facebookincubator/create-react-app/pull/504)) -* **Breaking Change:** Local paths in `<link href>` in `index.html` will now be correctly resolved, so deleting `favicon.ico` is not an error anymore. ([@andreypopp](https://github.com/andreypopp) in [#428](https://github.com/facebookincubator/create-react-app/pull/428)) -* Removed an annoying lint rule that warned for `<div ref={node => this.node = node}>`. ([@mrscobbler](https://github.com/mrscobbler) in [#529](https://github.com/facebookincubator/create-react-app/pull/529)) -* Temporarily disabled `react-constant-elements` Babel transform because of its bugs. ([@gaearon](https://github.com/gaearon) in [#534](https://github.com/facebookincubator/create-react-app/pull/534)) -* Fixed a permission issue with Docker. ([@gaearon](https://github.com/gaearon) in [73c940](https://github.com/facebookincubator/create-react-app/commit/73c940a73205d761230f8d6bf81ecfd460ba28a9)) -* Fixed an issue with generator syntax in Jest that occurred in an alpha release. ([@gaearon](https://github.com/gaearon) in [#535](https://github.com/facebookincubator/create-react-app/pull/535)) - -### Global CLI (`create-react-app`) - -* You can now create a project in a folder that already contains an `.idea` folder, which is necessary for future WebStorm integration. ([@denofevil](https://github.com/denofevil) in [#522](https://github.com/facebookincubator/create-react-app/pull/522)) - -### Migrating from 0.2.3 to 0.3.0 - -You may optionally update the global command (it’s not required): - -``` -npm install -g create-react-app@0.3.0 -``` - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.3.0 -``` - -#### Breaking Change - -Now `favicon.ico` is not treated specially anymore.<br> -If you use it, move it to `src` and add the following line to `<head>` in your HTML: - -```html -<link rel="shortcut icon" href="./src/favicon.ico"> -``` - -#### New Feature - -Since 0.3.0 added a test runner, we recommend that you add it to the `scripts` section of your `package.json` like this: - -```js - // ... - "scripts": { - // ... - "test": "react-scripts test --env=jsdom" - } -``` - -[Then read the testing guide to learn more about using it!](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#running-tests) - -## 0.2.3 (August 25, 2016) - -### Build Dependency (`react-scripts`) - -* You can now [proxy requests to an API server](https://github.com/facebookincubator/create-react-app/blob/ef94b0561d5afb9b50b905fa5cd3f94e965c69c0/template/README.md#proxying-api-requests-in-development) without worrying about CORS. ([@gaearon](https://github.com/gaearon) in [#282](https://github.com/facebookincubator/create-react-app/pull/282)) -* You can now [pass custom environment variables](https://github.com/facebookincubator/create-react-app/blob/ef94b0561d5afb9b50b905fa5cd3f94e965c69c0/template/README.md#adding-custom-environment-variables) to your application. ([@eliperelman](https://github.com/eliperelman) in [#342](https://github.com/facebookincubator/create-react-app/pull/342)) -* You can now [use `async` and `await`](https://ponyfoo.com/articles/understanding-javascript-async-await) syntax. ([@gaearon](https://github.com/gaearon) in [#327](https://github.com/facebookincubator/create-react-app/pull/327), [@fson](https://github.com/fson) in [#332](https://github.com/facebookincubator/create-react-app/pull/332)) -* Paths with period in them now load successfully on the development server. ([@mxstbr](https://github.com/mxstbr) in [#422](https://github.com/facebookincubator/create-react-app/pull/422)) -* Images with `.webp` extension are now supported. ([@gafemoyano](https://github.com/gafemoyano) in [#458](https://github.com/facebookincubator/create-react-app/pull/458)) -* The most recent version of React is now added to `package.json`. ([@wdhorton](https://github.com/wdhorton) in [#477](https://github.com/facebookincubator/create-react-app/pull/477)) -* Babel configuration is simplified. ([@kripod](https://github.com/kripod) in [#490](https://github.com/facebookincubator/create-react-app/pull/490)) - -### Migrating from 0.2.2 to 0.2.3 - -Update `react-scripts` to point to `0.2.3` in your `package.json` and run `npm install`. You shouldn’t need to do anything else. - -Newly created projects will use `0.2.3` automatically. You **don’t** need to update the global `create-react-app` CLI itself. It stays at `0.2.0` for now because it doesn’t have any changes. - -## 0.2.2 (August 22, 2016) - -### Build Dependency (`react-scripts`) - -* When the bundle size changes, we now display the difference after build. ([@elijahmanor](https://github.com/elijahmanor) in [#340](https://github.com/facebookincubator/create-react-app/pull/340)) -* `npm install`ing a missing dependency now forces a rebuild. ([@gaearon](https://github.com/gaearon) in [#349](https://github.com/facebookincubator/create-react-app/pull/349)) -* Autoprefixer config now includes more commonly supported browsers. ([@kripod](https://github.com/kripod) in [#345](https://github.com/facebookincubator/create-react-app/pull/345)) -* All the configuration is now documented inline so ejecting doesn’t leave you in the dark. ([@gaearon](https://github.com/gaearon) in [#362](https://github.com/facebookincubator/create-react-app/pull/362)) -* `Object.assign()` polyfill is now bundled by default. ([@gaearon](https://github.com/gaearon) in [#399](https://github.com/facebookincubator/create-react-app/pull/399)) -* [React Native Web](https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/) now works out of the box. ([@grigio](https://github.com/grigio) in [#407](https://github.com/facebookincubator/create-react-app/pull/407)) -* Same asset filenames in different folders don’t confuse the server now. ([@arunoda](https://github.com/arunoda) in [#446](https://github.com/facebookincubator/create-react-app/pull/446)) -* The `otf` font format is now supported. ([@A-gambit](https://github.com/A-gambit) in [#434](https://github.com/facebookincubator/create-react-app/pull/434)) -* The `new-cap` linting rule has been disabled thanks to feedback from Immutable.js users. ([@rricard](https://github.com/rricard) in [#470](https://github.com/facebookincubator/create-react-app/pull/470)) - -### Migrating from 0.2.1 to 0.2.2 - -Update `react-scripts` to point to `0.2.2` in your `package.json` and run `npm install`. You shouldn’t need to do anything else. - -Newly created projects will use `0.2.2` automatically. You **don’t** need to update the global `create-react-app` CLI itself. It stays at `0.2.0` for now because it doesn’t have any changes. - -## 0.2.1 (August 1, 2016) - -### Build Dependency (`react-scripts`) - -* Fixes an issue with `npm start` taking a very long time on OS X with Firewall enabled ([@gaearon](https://github.com/gaearon) in [#319](https://github.com/facebookincubator/create-react-app/pull/319)) -* Fixes an issue with Webpack eating a lot of CPU in some cases ([@dceddia](https://github.com/dceddia) in [#294](https://github.com/facebookincubator/create-react-app/pull/294)) -* We now warn if you import a file with mismatched casing because this breaks the watcher ([@alexzherdev](https://github.com/alexzherdev) in [#266](https://github.com/facebookincubator/create-react-app/pull/266)) -* CSS files specifying `?v=` after asset filenames, such as Font Awesome, now works correctly ([@alexzherdev](https://github.com/alexzherdev) in [#298](https://github.com/facebookincubator/create-react-app/pull/298)) -* Issues with `npm link`ing `react-scripts` have been fixed ([@dallonf](https://github.com/dallonf) in [#277](https://github.com/facebookincubator/create-react-app/pull/277)) -* We now use `/static` prefix for assets both in development and production ([@gaearon](https://github.com/gaearon) in [#278](https://github.com/facebookincubator/create-react-app/pull/278)) - -### Migrating from 0.2.0 to 0.2.1 - -Update `react-scripts` to point to `0.2.1` in your `package.json` and run `npm install`. You shouldn’t need to do anything else. If you see a warning about wrong file casing next time you `npm start`, fix your imports to use the correct filename casing. - -Newly created projects will use `0.2.1` automatically. You **don’t** need to update the global `create-react-app` CLI itself. It stays at `0.2.0` for now because it doesn’t have any changes. - -## 0.2.0 (July 28, 2016) - -### Build Dependency (`react-scripts`) - -* You can now enable deployment to GitHub Pages by adding `homepage` field to `package.json` ([@dhruska](https://github.com/dhruska) in [#94](https://github.com/facebookincubator/create-react-app/pull/94)) -* Development server now runs on `0.0.0.0` and works with VirtualBox ([@JWo1F](https://github.com/JWo1F) in [#128](https://github.com/facebookincubator/create-react-app/pull/128)) -* Cloud9 and Nitrous online IDEs are now supported ([@gaearon](http://github.com/gaearon) in [2fe84e](https://github.com/facebookincubator/create-react-app/commit/2fe84ecded55f1d5258d91f9c2c07698ae0d2fb4)) -* When `3000` port is taken, we offer to use another port ([@chocnut](https://github.com/chocnut) in [#101](https://github.com/facebookincubator/create-react-app/pull/101), [2edf21](https://github.com/facebookincubator/create-react-app/commit/2edf2180f2aa6bf647807d0b1fcd95f4cfe4a558)) -* You can now `import` CSS files from npm modules ([@glennreyes](https://github.com/glennreyes) in [#105](https://github.com/facebookincubator/create-react-app/pull/105), [@breaddevil](https://github.com/breaddevil) in [#178](https://github.com/facebookincubator/create-react-app/pull/178)) -* `fetch` and `Promise` polyfills are now always included ([@gaearon](https://github.com/gaearon) in [#235](https://github.com/facebookincubator/create-react-app/pull/235)) -* Regenerator runtime is now included if you use ES6 generators ([@gaearon](https://github.com/gaearon) in [#238](https://github.com/facebookincubator/create-react-app/pull/238)) -* Generated project now contains `.gitignore` ([@npverni](https://github.com/npverni) in [#79](https://github.com/facebookincubator/create-react-app/pull/79), [@chibicode](https://github.com/chibicode) in [#112](https://github.com/facebookincubator/create-react-app/pull/112)) -* ESLint config is now more compatible with Flow ([@gaearon](https://github.com/gaearon) in [#261](https://github.com/facebookincubator/create-react-app/pull/261)) -* A stylistic lint rule about method naming has been removed ([@mxstbr](https://github.com/mxstbr) in [#152](https://github.com/facebookincubator/create-react-app/pull/157)) -* A few unobtrusive accessibility lint rules have been added ([@evcohen](https://github.com/evcohen) in [#175](https://github.com/facebookincubator/create-react-app/pull/175)) -* A `.babelrc` in parent directory no longer causes an error ([@alexzherdev](https://github.com/alexzherdev) in [#236](https://github.com/facebookincubator/create-react-app/pull/236)) -* Files with `.json` extension are now discovered ([@gaearon](https://github.com/gaearon) in [a11d6a](https://github.com/facebookincubator/create-react-app/commit/a11d6a398f487f9163880dd34667b1d3e14b147a)) -* Bug fixes from transitive dependencies are included ([#126](https://github.com/facebookincubator/create-react-app/issues/126)) -* Linting now works with IDEs if you follow [these](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor) instructions ([@keyanzhang](https://github.com/keyanzhang) in [#149](https://github.com/facebookincubator/create-react-app/pull/149)) -* After building, we now print gzipped bundle size ([@lvwrence](https://github.com/lvwrence) in [#229](https://github.com/facebookincubator/create-react-app/pull/229)) - -### Global CLI (`create-react-app`) - -* It enforces that you have Node >= 4 ([@conorhastings](https://github.com/conorhastings) in [#88](https://github.com/facebookincubator/create-react-app/pull/88)) -* It handles `--version` flag correctly ([@mxstbr](https://github.com/mxstbr) in [#152](https://github.com/facebookincubator/create-react-app/pull/152)) - -### Migrating from 0.1.0 to 0.2.0 - -You may optionally update the global command (it’s not required): - -``` -npm install -g create-react-app@0.2.0 -``` - -Inside any created project that has not been ejected, run: - -``` -npm install --save-dev --save-exact react-scripts@0.2.0 -``` -You may need to fix a few lint warnings about missing `<img alt>` tag, but everything else should work out of the box. If you intend to deploy your site to GitHub Pages, you may now [add `homepage` field to `package.json`](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#deploy-to-github-pages). If you had [issues with integrating editor linter plugins](https://github.com/facebookincubator/create-react-app/issues/124), follow [these new instructions](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor). -## 0.1.0 (July 22, 2016) +## Releases Before 0.x -* Initial public release +Please refer to [CHANGELOG-0.x.md](./CHANGELOG-0.x.md) for earlier versions. From bf9eca25f519c73f69cff20ac49ce9500e578fe0 Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Fri, 19 May 2017 05:36:09 +0100 Subject: [PATCH 22/76] Publish - babel-preset-react-app@3.0.0 - create-react-app@1.3.1 - eslint-config-react-app@1.0.0 - react-dev-utils@1.0.0 - react-error-overlay@1.0.0 - react-scripts@1.0.0 --- packages/create-react-app/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-react-app/package.json b/packages/create-react-app/package.json index 918fcbefa56..13a567fa7b4 100644 --- a/packages/create-react-app/package.json +++ b/packages/create-react-app/package.json @@ -1,6 +1,6 @@ { "name": "create-react-app", - "version": "1.3.0", + "version": "1.3.1", "keywords": [ "react" ], From 26c9a3d84f07fa265c164ced3a60dc616faa8492 Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Fri, 19 May 2017 05:42:13 +0100 Subject: [PATCH 23/76] Update CHANGELOG.md --- CHANGELOG.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8261780a7d2..1bb262250d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -111,6 +111,41 @@ The old, 2009 specification for Flexbox is [deprecated and is 2.3x slower than t We are no longer polyfilling it automatically. +#### How to turn my app into a [Progressive Web App](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app)? + +After the regular update procedure above, add these line to `<head>` in `public/index.html`: + +```html + <meta name="theme-color" content="#000000"> + <!-- + manifest.json provides metadata used when your web app is added to the + homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/ + --> + <link rel="manifest" href="%PUBLIC_URL%/manifest.json"> +``` + +Then create a file called `public/manifest.json` that looks like this: + +```js +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "192x192", + "type": "image/png" + } + ], + "start_url": "./index.html", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} +``` + +Finally, create `src/registerServiceWorker.js` with [this template](https://github.com/facebookincubator/create-react-app/blob/bf9eca25f519c73f69cff20ac49ce9500e578fe0/packages/react-scripts/template/src/registerServiceWorker.js), [import it](https://github.com/facebookincubator/create-react-app/blob/bf9eca25f519c73f69cff20ac49ce9500e578fe0/packages/react-scripts/template/src/index.js#L4) from `src/index.js` and [call the function it exports](https://github.com/facebookincubator/create-react-app/blob/bf9eca25f519c73f69cff20ac49ce9500e578fe0/packages/react-scripts/template/src/index.js#L8). + #### Anything missing? This was a large release, and we might have missed something. @@ -358,7 +393,6 @@ Please [file an issue](https://github.com/facebookincubator/create-react-app/iss - moniuch ([moniuch](https://github.com/moniuch)) - pd4d10 ([pd4d10](https://github.com/pd4d10)) - ## Releases Before 0.x Please refer to [CHANGELOG-0.x.md](./CHANGELOG-0.x.md) for earlier versions. From af7fbae994e394553e1ecad14155f5e90675f4b5 Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Fri, 19 May 2017 11:07:34 +0100 Subject: [PATCH 24/76] March -> May --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bb262250d6..3f5c5d15e0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.0.0 (March 18, 2017) +## 1.0.0 (May 18, 2017) We’ve been working on this release for the past few months, and there are many big impovements, from migrating to webpack 2 to a brand new runtime error overlay and built-in support for Progressive Web Apps. From 499adbe7eadee394fa9f14cc3bc23d6ad4f13836 Mon Sep 17 00:00:00 2001 From: Nayef Ghattas <nayef.ghattas@gmail.com> Date: Fri, 19 May 2017 14:04:09 +0200 Subject: [PATCH 25/76] Fix shortcut handling in react-error-overlay (#2238) --- packages/react-error-overlay/src/overlay.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/react-error-overlay/src/overlay.js b/packages/react-error-overlay/src/overlay.js index 9f3587a8641..9cb2772fe77 100644 --- a/packages/react-error-overlay/src/overlay.js +++ b/packages/react-error-overlay/src/overlay.js @@ -110,6 +110,10 @@ function renderErrorByIndex(index: number) { } function switchError(offset) { + if (errorReferences.length === 0) { + return; + } + let nextView = currReferenceIndex + offset; if (nextView < 0) { From 70a7f28e2bbad3179ab637c9038317b8cd7a189d Mon Sep 17 00:00:00 2001 From: Joe Haddad <timer150@gmail.com> Date: Fri, 19 May 2017 08:19:04 -0400 Subject: [PATCH 26/76] Add explicit package dependence (#2243) Closes #2232 --- packages/react-dev-utils/package.json | 3 --- packages/react-error-overlay/package.json | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index f5e26edaf6d..9ea8d1a9d73 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -45,9 +45,6 @@ "recursive-readdir": "2.2.1", "shell-quote": "1.6.1", "sockjs-client": "1.1.4", - "stack-frame-mapper": "0.4.0", - "stack-frame-parser": "0.4.0", - "stack-frame-unmapper": "0.4.0", "strip-ansi": "3.0.1" } } diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index fed921c8f48..7bc6a2f7d4b 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -35,7 +35,8 @@ "babel-code-frame": "6.22.0", "babel-runtime": "6.23.0", "react-dev-utils": "^1.0.0", - "settle-promise": "1.0.0" + "settle-promise": "1.0.0", + "source-map": "0.5.6" }, "devDependencies": { "babel-cli": "6.24.1", From 4a32171331a17c097cc25c4caab5756130efcfb4 Mon Sep 17 00:00:00 2001 From: Oleg Kuzava <olegkuzava@gmail.com> Date: Fri, 19 May 2017 16:47:21 +0300 Subject: [PATCH 27/76] Fix read of .env variables (#2242) --- packages/react-scripts/config/env.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-scripts/config/env.js b/packages/react-scripts/config/env.js index 4213adf69a2..726db48ab5b 100644 --- a/packages/react-scripts/config/env.js +++ b/packages/react-scripts/config/env.js @@ -13,6 +13,9 @@ const fs = require('fs'); const paths = require('./paths'); +// Make sure that including paths.js after env.js will read .env variables. +delete require.cache[require.resolve('./paths')]; + const NODE_ENV = process.env.NODE_ENV; if (!NODE_ENV) { throw new Error( From e0b444e517251f08cf10937e204e2a5e4da532de Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Fri, 19 May 2017 14:59:28 +0100 Subject: [PATCH 28/76] Gracefully shut down the server on signals (#2246) --- packages/react-scripts/scripts/start.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index c9a88d9f5d6..9d6b0e9983f 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -84,6 +84,14 @@ choosePort(HOST, DEFAULT_PORT) console.log(chalk.cyan('Starting the development server...\n')); openBrowser(urls.localUrlForBrowser); }); + + ['SIGINT', 'SIGTERM'].forEach(function(sig) { + process.on(sig, function() { + console.log(`Gracefully shutting down server after ${sig}...`); + server.close(); + process.exit(); + }); + }); }) .catch(err => { if (err && err.message) { From 2023e44126e8655c9a2e5f0fdb73fdea0df342a9 Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Fri, 19 May 2017 16:37:41 +0100 Subject: [PATCH 29/76] Shame on me --- packages/react-scripts/scripts/start.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index 9d6b0e9983f..11c8e382295 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -88,7 +88,7 @@ choosePort(HOST, DEFAULT_PORT) ['SIGINT', 'SIGTERM'].forEach(function(sig) { process.on(sig, function() { console.log(`Gracefully shutting down server after ${sig}...`); - server.close(); + devServer.close(); process.exit(); }); }); From 5410aa4a9ca1368ffe15c4c859befcd0ae46834d Mon Sep 17 00:00:00 2001 From: Alexander James Phillips <ajp.global@gmail.com> Date: Fri, 19 May 2017 16:55:06 +0100 Subject: [PATCH 30/76] Correct docs on which .env.* files are supported. (#2247) * Correct which .env. files are referenced in docs * Highlight this is not available until 1.0.0 * Formatting * Update README.md * Update README.md --- packages/react-scripts/template/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 37528831f87..acccb6a4fa2 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -794,20 +794,20 @@ REACT_APP_SECRET_CODE=abcdef `.env` files **should be** checked into source control (with the exclusion of `.env*.local`). -What other `.env` files are can be used? +#### What other `.env` files are can be used? ->Note: this feature is available with `react-scripts@1.0.0` and higher. +>Note: this feature is **available with `react-scripts@1.0.0` and higher**. -* `.env` - Default -* `.env.development`, `.env.test`, `.env.production` - Environment-specific settings. -* `.env.local` - Local overrides. This file is loaded for all environments except test. -* `.env.development.local`, `.env.test.local`, `.env.production.local` - Local overrides of environment-specific settings. +* `.env`: Default. +* `.env.local`: Local overrides. **This file is loaded for all environments except test.** +* `.env.development`, `.env.test`, `.env.production`: Environment-specific settings. +* `.env.development.local`, `.env.test.local`, `.env.production.local`: Local overrides of environment-specific settings. -File priority, from left to right: +Files on the left have more priority than files on the right: -* npm test - `.env.test.local`, `env.test`, `.env.local`, `.env` -* npm run build - `.env.production.local`, `env.production`, `.env.local`, `.env` -* npm start - `.env.development.local`, `env.development`, `.env.local`, `.env` +* `npm start`: `.env.development.local`, `.env.development`, `.env.local`, `.env` +* `npm run build`: `.env.production.local`, `.env.production`, `.env.local`, `.env` +* `npm test`: `.env.test.local`, `.env.test`, `.env` (note `.env.local` is missing) These variables will act as the defaults if the machine does not explicitly set them.<br> Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details. From 9d98ca911e467639eda67d4d657f75877c66d853 Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Fri, 19 May 2017 17:13:39 +0100 Subject: [PATCH 31/76] Hide React Storybook from the User Guide while it's incompatible (#2252) * Hide React Storybook from the User Guide while it's incompatible * Update README.md --- README.md | 2 ++ packages/react-scripts/template/README.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 286a0cf7993..79fc6c6eaa2 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,9 @@ 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) - [Pre-Rendering into Static HTML Files](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#pre-rendering-into-static-html-files) - [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) - [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index acccb6a4fa2..a7db0622258 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -61,7 +61,9 @@ You can find the most recent version of this guide [here](https://github.com/fac - [Disabling jsdom](#disabling-jsdom) - [Snapshot Testing](#snapshot-testing) - [Editor Integration](#editor-integration) +<!-- - [Developing Components in Isolation](#developing-components-in-isolation) +--> - [Making a Progressive Web App](#making-a-progressive-web-app) - [Offline-First Considerations](#offline-first-considerations) - [Progressive Web App Metadata](#progressive-web-app-metadata) @@ -1282,6 +1284,7 @@ If you use [Visual Studio Code](https://code.visualstudio.com), there is a [Jest ![VS Code Jest Preview](https://cloud.githubusercontent.com/assets/49038/20795349/a032308a-b7c8-11e6-9b34-7eeac781003f.png) +<!-- ## Developing Components in Isolation Usually, in an app, you have a lot of UI components, and each of them has many different states. @@ -1321,6 +1324,7 @@ Learn more about React Storybook: * [GitHub Repo](https://github.com/kadirahq/react-storybook) * [Documentation](https://storybooks.js.org/docs/react-storybook/basics/introduction/) * [Snapshot Testing](https://github.com/kadirahq/storyshots) with React Storybook +--> ## Making a Progressive Web App From 1834cb5dbdedc309ddfb75c61c3dd92cff02f611 Mon Sep 17 00:00:00 2001 From: chyipin <chyipin@gmail.com> Date: Fri, 19 May 2017 09:18:00 -0700 Subject: [PATCH 32/76] Show customized build path for serve instruction (#2229) * Show customized build path for serve instruction * Remove cyan --- packages/react-dev-utils/printHostingInstructions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-dev-utils/printHostingInstructions.js b/packages/react-dev-utils/printHostingInstructions.js index 4b31cbc4499..7b9284d4e59 100644 --- a/packages/react-dev-utils/printHostingInstructions.js +++ b/packages/react-dev-utils/printHostingInstructions.js @@ -106,7 +106,7 @@ function printHostingInstructions( } else { console.log(` ${chalk.cyan('npm')} install -g serve`); } - console.log(` ${chalk.cyan('serve')} -s build`); + console.log(` ${chalk.cyan('serve')} -s ${buildFolder}`); console.log(); } } From f3f559937e005593a703a7c14d300ea566d348b4 Mon Sep 17 00:00:00 2001 From: Dan Abramov <dan.abramov@gmail.com> Date: Fri, 19 May 2017 17:18:29 +0100 Subject: [PATCH 33/76] Ignore .env.local in test environment (#2250) --- packages/react-scripts/config/env.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/config/env.js b/packages/react-scripts/config/env.js index 726db48ab5b..937076b52ba 100644 --- a/packages/react-scripts/config/env.js +++ b/packages/react-scripts/config/env.js @@ -27,9 +27,13 @@ if (!NODE_ENV) { var dotenvFiles = [ `${paths.dotenv}.${NODE_ENV}.local`, `${paths.dotenv}.${NODE_ENV}`, - `${paths.dotenv}.local`, + // Don't include `.env.local` for `test` environment + // since normally you expect tests to produce the same + // results for everyone + NODE_ENV !== 'test' && `${paths.dotenv}.local`, paths.dotenv, -]; +].filter(Boolean); + // Load environment variables from .env* files. Suppress warnings using silent // if this file is missing. dotenv will never modify any environment variables // that have already been set. From c749de7f34df65c393cfda485e751f9c4e4c7acf Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil <viankakrisna@gmail.com> Date: Fri, 19 May 2017 23:55:39 +0700 Subject: [PATCH 34/76] add noscript to template's index.html (#2224) * add noscript to template's index.html * Tweak message --- packages/react-scripts/template/public/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-scripts/template/public/index.html b/packages/react-scripts/template/public/index.html index fc8689a2a29..7bee027101e 100644 --- a/packages/react-scripts/template/public/index.html +++ b/packages/react-scripts/template/public/index.html @@ -22,6 +22,9 @@ <title>React App +
- [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) - [Advanced Configuration](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration) From 95cbcc41b32630afff362277e1db90342a6592d2 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 19 May 2017 23:18:12 +0100 Subject: [PATCH 48/76] Update README.md --- packages/react-scripts/template/README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 53844f6b26b..c7ce127ff40 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -61,9 +61,6 @@ You can find the most recent version of this guide [here](https://github.com/fac - [Disabling jsdom](#disabling-jsdom) - [Snapshot Testing](#snapshot-testing) - [Editor Integration](#editor-integration) - - [Making a Progressive Web App](#making-a-progressive-web-app) - [Offline-First Considerations](#offline-first-considerations) - [Progressive Web App Metadata](#progressive-web-app-metadata) From 4e886f7ab51b4eebf0210c190b5f6ebca3c73e58 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 19 May 2017 23:31:15 +0100 Subject: [PATCH 49/76] Update CHANGELOG.md --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0914c94b92d..cd2fee1f496 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -181,6 +181,17 @@ The old, 2009 specification for Flexbox is [deprecated and is 2.3x slower than t We are no longer polyfilling it automatically. +#### I see "Definition for rule 'jsx-a11y/alt-text' was not found (jsx-a11y/alt-text)" in the editor + +Follow these steps if you see errors about missing lint rules in the editor. + +1. Ensure that in your editor ESLint settings you have "Use Global ESLint" turned off +2. Run `npm install` in your project (or `yarn`) +3. Quit your editor completely (ensure its process doesn't hang around) +4. Start the editor again + +If you still have the problem please file an issue. + #### How to turn my app into a [Progressive Web App](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app)? After the regular update procedure above, add these line to `` in `public/index.html`: From d3e85364fe0161ba52a1fd255f568f562ba8fdad Mon Sep 17 00:00:00 2001 From: Malcolm Date: Sun, 21 May 2017 04:52:58 +1200 Subject: [PATCH 50/76] Add WSL support to launchEditor utility (#2282) --- packages/react-dev-utils/launchEditor.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/react-dev-utils/launchEditor.js b/packages/react-dev-utils/launchEditor.js index 1e9d9822608..8bfa3f3dcc9 100644 --- a/packages/react-dev-utils/launchEditor.js +++ b/packages/react-dev-utils/launchEditor.js @@ -11,6 +11,7 @@ var fs = require('fs'); var path = require('path'); var child_process = require('child_process'); +var os = require('os'); var chalk = require('chalk'); var shellQuote = require('shell-quote'); @@ -43,7 +44,8 @@ function addWorkspaceToArgumentsIfExists(args, workspace) { } function getArgumentsForLineNumber(editor, fileName, lineNumber, workspace) { - switch (path.basename(editor)) { + var editorBasename = path.basename(editor).replace(/\.(exe|cmd|bat)$/i, ''); + switch (editorBasename) { case 'vim': case 'mvim': return [fileName, '+' + lineNumber]; @@ -154,6 +156,20 @@ function launchEditor(fileName, lineNumber) { return; } + if ( + process.platform === 'linux' && + fileName.startsWith('/mnt/') && + /Microsoft/i.test(os.release()) + ) { + // Assume WSL / "Bash on Ubuntu on Windows" is being used, and + // that the file exists on the Windows file system. + // `os.release()` is "4.4.0-43-Microsoft" in the current release + // build of WSL, see: https://github.com/Microsoft/BashOnWindows/issues/423#issuecomment-221627364 + // When a Windows editor is specified, interop functionality can + // handle the path translation, but only if a relative path is used. + fileName = path.relative('', fileName); + } + var workspace = null; if (lineNumber) { args = args.concat( From ba0d0daf9cfcae74c5012c47bf435e532b1355bd Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 20 May 2017 18:34:16 +0100 Subject: [PATCH 51/76] Only enable host check if you use proxy, and add a way to opt out of it (#2288) * Disable host check if you don't use proxy * Add a way to opt out and document it --- .../config/webpackDevServer.config.js | 18 +++++++++++++ packages/react-scripts/template/README.md | 27 +++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/packages/react-scripts/config/webpackDevServer.config.js b/packages/react-scripts/config/webpackDevServer.config.js index 8d7eb0f1b5e..94d8c665197 100644 --- a/packages/react-scripts/config/webpackDevServer.config.js +++ b/packages/react-scripts/config/webpackDevServer.config.js @@ -19,6 +19,24 @@ const host = process.env.HOST || '0.0.0.0'; module.exports = function(proxy, allowedHost) { return { + // WebpackDevServer 2.4.3 introduced a security fix that prevents remote + // websites from potentially accessing local content through DNS rebinding: + // https://github.com/webpack/webpack-dev-server/issues/887 + // https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a + // However, it made several existing use cases such as development in cloud + // environment or subdomains in development significantly more complicated: + // https://github.com/facebookincubator/create-react-app/issues/2271 + // https://github.com/facebookincubator/create-react-app/issues/2233 + // While we're investigating better solutions, for now we will take a + // compromise. Since our WDS configuration only serves files in the `public` + // folder we won't consider accessing them a vulnerability. However, if you + // use the `proxy` feature, it gets more dangerous because it can expose + // remote code execution vulnerabilities in backends like Django and Rails. + // So we will disable the host check normally, but enable it if you have + // specified the `proxy` setting. Finally, we let you override it if you + // really know what you're doing with a special environment variable. + disableHostCheck: !proxy || + process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true', // Enable gzip compression of generated files. compress: true, // Silence WebpackDevServer's own logs since they're generally not useful. diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index c7ce127ff40..25b469fb680 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -42,6 +42,7 @@ You can find the most recent version of this guide [here](https://github.com/fac - [Node](#node) - [Ruby on Rails](#ruby-on-rails) - [Proxying API Requests in Development](#proxying-api-requests-in-development) + - ["Invalid Host Header" Errors After Configuring Proxy](#invalid-host-header-errors-after-configuring-proxy) - [Configuring the Proxy Manually](#configuring-the-proxy-manually) - [Using HTTPS in Development](#using-https-in-development) - [Generating Dynamic `` Tags on the Server](#generating-dynamic-meta-tags-on-the-server) @@ -897,6 +898,32 @@ If the `proxy` option is **not** flexible enough for you, alternatively you can: * Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). * Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. +### "Invalid Host Header" Errors After Configuring Proxy + +When you enable the `proxy` option, you opt into a more strict set of host checks. This is necessary because leaving the backend open to remote hosts makes your computer vulnerable to DNS rebinding attacks. The issue is explained in [this article](https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a) and [this issue](https://github.com/webpack/webpack-dev-server/issues/887). + +This shouldn’t affect you when developing on `localhost`, but if you develop remotely like [described here](https://github.com/facebookincubator/create-react-app/issues/2271), you will see this error in the browser after enabling the `proxy` option: + +>Invalid Host header + +To work around it, you can specify your public development host in a file called `.env.development` in the root of your project: + +``` +HOST=mypublicdevhost.com +``` + +If you restart the development server now and load the app from the specified host, it should work. + +If you are still having issues or if you’re using a more exotic environment like a cloud editor, you can bypass the host check completely by adding a line to `.env.development.local`. **Note that this is dangerous and exposes your machine to remote code execution from malicious websites:** + +``` +# NOTE: THIS IS DANGEROUS! +# It exposes your machine to attacks from the websites you visit. +DANGEROUSLY_DISABLE_HOST_CHECK=true +``` + +We don’t recommend this approach. + ### Configuring the Proxy Manually >Note: this feature is available with `react-scripts@1.0.0` and higher. From a257e7d0fa953b1b40a79593d10108428b2b9d0b Mon Sep 17 00:00:00 2001 From: Milo Kang Date: Sat, 20 May 2017 13:55:16 -0400 Subject: [PATCH 52/76] Ejecting should ensure you have clean git status (#2221) * Ejecting should ensure you have clean git status * Rename function * Style * Minor changes - extract function - exclude error output for missing git - more descriptive error message - no need to mutate answer - fix answering "no" to return 0 exit code --- packages/react-scripts/scripts/eject.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/react-scripts/scripts/eject.js b/packages/react-scripts/scripts/eject.js index 28dd41b8aaf..ce3cf419707 100644 --- a/packages/react-scripts/scripts/eject.js +++ b/packages/react-scripts/scripts/eject.js @@ -18,6 +18,7 @@ process.on('unhandledRejection', err => { const fs = require('fs-extra'); const path = require('path'); +const execSync = require('child_process').execSync; const spawnSync = require('cross-spawn').sync; const chalk = require('chalk'); const inquirer = require('inquirer'); @@ -27,6 +28,17 @@ const createJestConfig = require('./utils/createJestConfig'); const green = chalk.green; const cyan = chalk.cyan; +function getGitStatus() { + try { + let stdout = execSync(`git status --porcelain`, { + stdio: ['pipe', 'pipe', 'ignore'], + }).toString(); + return stdout.trim(); + } catch (e) { + return ''; + } +} + inquirer .prompt({ type: 'confirm', @@ -37,6 +49,19 @@ inquirer .then(answer => { if (!answer.shouldEject) { console.log(cyan('Close one! Eject aborted.')); + return; + } + + const gitStatus = getGitStatus(); + if (gitStatus) { + console.error( + chalk.red( + `This git repository has untracked files or uncommitted changes:\n\n` + + gitStatus.split('\n').map(line => ' ' + line) + + '\n\n' + + 'Remove untracked files, stash or commit any changes, and try again.' + ) + ); process.exit(1); } From f3ff3f247330077ca4be07a09cf37d6ba435a3c0 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 20 May 2017 18:59:22 +0100 Subject: [PATCH 53/76] Add missing license headers --- packages/react-dev-utils/eslintFormatter.js | 9 +++++++++ .../src/__tests__/extract-source-map.js | 9 +++++++++ .../react-error-overlay/src/__tests__/get-source-map.js | 9 +++++++++ .../react-error-overlay/src/__tests__/lines-around.js | 9 +++++++++ packages/react-error-overlay/src/__tests__/mapper.js | 9 +++++++++ .../react-error-overlay/src/__tests__/parser/chrome.js | 9 +++++++++ .../react-error-overlay/src/__tests__/parser/firefox.js | 9 +++++++++ .../react-error-overlay/src/__tests__/parser/generic.js | 9 +++++++++ .../react-error-overlay/src/__tests__/parser/react.js | 9 +++++++++ .../react-error-overlay/src/__tests__/parser/safari.js | 9 +++++++++ .../react-error-overlay/src/__tests__/script-lines.js | 9 +++++++++ packages/react-error-overlay/src/__tests__/setupJest.js | 9 +++++++++ .../react-error-overlay/src/__tests__/stack-frame.js | 9 +++++++++ packages/react-error-overlay/src/__tests__/unmapper.js | 9 +++++++++ .../react-error-overlay/src/components/additional.js | 9 +++++++++ packages/react-error-overlay/src/components/close.js | 9 +++++++++ packages/react-error-overlay/src/components/code.js | 9 +++++++++ packages/react-error-overlay/src/components/footer.js | 9 +++++++++ packages/react-error-overlay/src/components/frame.js | 9 +++++++++ packages/react-error-overlay/src/components/frames.js | 9 +++++++++ packages/react-error-overlay/src/components/overlay.js | 9 +++++++++ packages/react-error-overlay/src/effects/proxyConsole.js | 9 +++++++++ packages/react-error-overlay/src/effects/shortcuts.js | 9 +++++++++ .../react-error-overlay/src/effects/stackTraceLimit.js | 9 +++++++++ .../react-error-overlay/src/effects/unhandledError.js | 9 +++++++++ .../src/effects/unhandledRejection.js | 9 +++++++++ packages/react-error-overlay/src/index.js | 9 +++++++++ packages/react-error-overlay/src/overlay.js | 9 +++++++++ packages/react-error-overlay/src/styles.js | 9 +++++++++ .../react-error-overlay/src/utils/dom/absolutifyCaret.js | 9 +++++++++ .../react-error-overlay/src/utils/dom/consumeEvent.js | 9 +++++++++ packages/react-error-overlay/src/utils/dom/css.js | 9 +++++++++ .../react-error-overlay/src/utils/dom/enableTabClick.js | 9 +++++++++ packages/react-error-overlay/src/utils/errorRegister.js | 9 +++++++++ packages/react-error-overlay/src/utils/getLinesAround.js | 9 +++++++++ packages/react-error-overlay/src/utils/getSourceMap.js | 9 +++++++++ packages/react-error-overlay/src/utils/isInternalFile.js | 9 +++++++++ packages/react-error-overlay/src/utils/mapper.js | 9 +++++++++ packages/react-error-overlay/src/utils/parser.js | 9 +++++++++ packages/react-error-overlay/src/utils/stack-frame.js | 9 +++++++++ packages/react-error-overlay/src/utils/unmapper.js | 9 +++++++++ packages/react-error-overlay/src/utils/warnings.js | 9 +++++++++ 42 files changed, 378 insertions(+) diff --git a/packages/react-dev-utils/eslintFormatter.js b/packages/react-dev-utils/eslintFormatter.js index 7460e760455..96b6ce14beb 100644 --- a/packages/react-dev-utils/eslintFormatter.js +++ b/packages/react-dev-utils/eslintFormatter.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + 'use strict'; const chalk = require('chalk'); diff --git a/packages/react-error-overlay/src/__tests__/extract-source-map.js b/packages/react-error-overlay/src/__tests__/extract-source-map.js index 121d8306bd2..85c30accdee 100644 --- a/packages/react-error-overlay/src/__tests__/extract-source-map.js +++ b/packages/react-error-overlay/src/__tests__/extract-source-map.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { extractSourceMapUrl } from '../utils/getSourceMap'; test('extracts last source map directive', async () => { diff --git a/packages/react-error-overlay/src/__tests__/get-source-map.js b/packages/react-error-overlay/src/__tests__/get-source-map.js index ea23dec4e66..29906926667 100644 --- a/packages/react-error-overlay/src/__tests__/get-source-map.js +++ b/packages/react-error-overlay/src/__tests__/get-source-map.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { getSourceMap } from '../utils/getSourceMap'; import fs from 'fs'; import { resolve } from 'path'; diff --git a/packages/react-error-overlay/src/__tests__/lines-around.js b/packages/react-error-overlay/src/__tests__/lines-around.js index d9ae134859a..0317bd47b5e 100644 --- a/packages/react-error-overlay/src/__tests__/lines-around.js +++ b/packages/react-error-overlay/src/__tests__/lines-around.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { getLinesAround } from '../utils/getLinesAround'; const arr = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight']; diff --git a/packages/react-error-overlay/src/__tests__/mapper.js b/packages/react-error-overlay/src/__tests__/mapper.js index ed8fe219d2d..64c2cf73018 100644 --- a/packages/react-error-overlay/src/__tests__/mapper.js +++ b/packages/react-error-overlay/src/__tests__/mapper.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { map } from '../utils/mapper'; import { parse } from '../utils/parser'; import fs from 'fs'; diff --git a/packages/react-error-overlay/src/__tests__/parser/chrome.js b/packages/react-error-overlay/src/__tests__/parser/chrome.js index fe01cb9c15e..caf95a6fcff 100644 --- a/packages/react-error-overlay/src/__tests__/parser/chrome.js +++ b/packages/react-error-overlay/src/__tests__/parser/chrome.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { parse } from '../../utils/parser'; test('stack with eval', () => { diff --git a/packages/react-error-overlay/src/__tests__/parser/firefox.js b/packages/react-error-overlay/src/__tests__/parser/firefox.js index 85396bd55f6..4f1d19ac2a1 100644 --- a/packages/react-error-overlay/src/__tests__/parser/firefox.js +++ b/packages/react-error-overlay/src/__tests__/parser/firefox.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { parse } from '../../utils/parser'; test('eval 1', () => { diff --git a/packages/react-error-overlay/src/__tests__/parser/generic.js b/packages/react-error-overlay/src/__tests__/parser/generic.js index 1c7619b1fc9..b58c537d365 100644 --- a/packages/react-error-overlay/src/__tests__/parser/generic.js +++ b/packages/react-error-overlay/src/__tests__/parser/generic.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { parse } from '../../utils/parser'; test('throws on null', () => { diff --git a/packages/react-error-overlay/src/__tests__/parser/react.js b/packages/react-error-overlay/src/__tests__/parser/react.js index 92651544362..907fae23994 100644 --- a/packages/react-error-overlay/src/__tests__/parser/react.js +++ b/packages/react-error-overlay/src/__tests__/parser/react.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { parse } from '../../utils/parser'; test('15.y.z', () => { diff --git a/packages/react-error-overlay/src/__tests__/parser/safari.js b/packages/react-error-overlay/src/__tests__/parser/safari.js index a27f2d2569e..69ecf6c78ee 100644 --- a/packages/react-error-overlay/src/__tests__/parser/safari.js +++ b/packages/react-error-overlay/src/__tests__/parser/safari.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { parse } from '../../utils/parser'; test('stack with eval', () => { diff --git a/packages/react-error-overlay/src/__tests__/script-lines.js b/packages/react-error-overlay/src/__tests__/script-lines.js index e66ed864ef2..e26e8d4f893 100644 --- a/packages/react-error-overlay/src/__tests__/script-lines.js +++ b/packages/react-error-overlay/src/__tests__/script-lines.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { ScriptLine } from '../utils/stack-frame'; test('script line shape', () => { diff --git a/packages/react-error-overlay/src/__tests__/setupJest.js b/packages/react-error-overlay/src/__tests__/setupJest.js index c158ca4267d..496826f2c80 100644 --- a/packages/react-error-overlay/src/__tests__/setupJest.js +++ b/packages/react-error-overlay/src/__tests__/setupJest.js @@ -1 +1,10 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + global.fetch = require('jest-fetch-mock'); diff --git a/packages/react-error-overlay/src/__tests__/stack-frame.js b/packages/react-error-overlay/src/__tests__/stack-frame.js index a82fd3e022e..dc6a01b4a06 100644 --- a/packages/react-error-overlay/src/__tests__/stack-frame.js +++ b/packages/react-error-overlay/src/__tests__/stack-frame.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { StackFrame } from '../utils/stack-frame'; test('proper empty shape', () => { diff --git a/packages/react-error-overlay/src/__tests__/unmapper.js b/packages/react-error-overlay/src/__tests__/unmapper.js index b0fa5101c10..fd162ccac5f 100644 --- a/packages/react-error-overlay/src/__tests__/unmapper.js +++ b/packages/react-error-overlay/src/__tests__/unmapper.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + import { unmap } from '../utils/unmapper'; import { parse } from '../utils/parser'; import fs from 'fs'; diff --git a/packages/react-error-overlay/src/components/additional.js b/packages/react-error-overlay/src/components/additional.js index 6e8b13b9a8f..b573c740634 100644 --- a/packages/react-error-overlay/src/components/additional.js +++ b/packages/react-error-overlay/src/components/additional.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ import { applyStyles } from '../utils/dom/css'; import { diff --git a/packages/react-error-overlay/src/components/close.js b/packages/react-error-overlay/src/components/close.js index bba65131bd4..2ced8d0ce92 100644 --- a/packages/react-error-overlay/src/components/close.js +++ b/packages/react-error-overlay/src/components/close.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ import { applyStyles } from '../utils/dom/css'; import { hintsStyle, hintStyle, closeButtonStyle } from '../styles'; diff --git a/packages/react-error-overlay/src/components/code.js b/packages/react-error-overlay/src/components/code.js index 91dd377f0c4..580fe3b1be5 100644 --- a/packages/react-error-overlay/src/components/code.js +++ b/packages/react-error-overlay/src/components/code.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ import type { ScriptLine } from '../utils/stack-frame'; import { applyStyles } from '../utils/dom/css'; diff --git a/packages/react-error-overlay/src/components/footer.js b/packages/react-error-overlay/src/components/footer.js index bfedeef0d44..4586a04ff2b 100644 --- a/packages/react-error-overlay/src/components/footer.js +++ b/packages/react-error-overlay/src/components/footer.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ import { applyStyles } from '../utils/dom/css'; import { footerStyle } from '../styles'; diff --git a/packages/react-error-overlay/src/components/frame.js b/packages/react-error-overlay/src/components/frame.js index dd86e9fb167..3b27406dd16 100644 --- a/packages/react-error-overlay/src/components/frame.js +++ b/packages/react-error-overlay/src/components/frame.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ import { enableTabClick } from '../utils/dom/enableTabClick'; import { createCode } from './code'; diff --git a/packages/react-error-overlay/src/components/frames.js b/packages/react-error-overlay/src/components/frames.js index 3d8d3156c24..8bd50509295 100644 --- a/packages/react-error-overlay/src/components/frames.js +++ b/packages/react-error-overlay/src/components/frames.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ import type { StackFrame } from '../utils/stack-frame'; import { applyStyles } from '../utils/dom/css'; diff --git a/packages/react-error-overlay/src/components/overlay.js b/packages/react-error-overlay/src/components/overlay.js index 1da6340ec35..573db8def5f 100644 --- a/packages/react-error-overlay/src/components/overlay.js +++ b/packages/react-error-overlay/src/components/overlay.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ import { applyStyles } from '../utils/dom/css'; import { containerStyle, overlayStyle, headerStyle } from '../styles'; diff --git a/packages/react-error-overlay/src/effects/proxyConsole.js b/packages/react-error-overlay/src/effects/proxyConsole.js index 9fef4b3ba72..6b40ff0e125 100644 --- a/packages/react-error-overlay/src/effects/proxyConsole.js +++ b/packages/react-error-overlay/src/effects/proxyConsole.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ type ReactFrame = { diff --git a/packages/react-error-overlay/src/effects/shortcuts.js b/packages/react-error-overlay/src/effects/shortcuts.js index a9ff787cd22..bf8fd6d5eb7 100644 --- a/packages/react-error-overlay/src/effects/shortcuts.js +++ b/packages/react-error-overlay/src/effects/shortcuts.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ const SHORTCUT_ESCAPE = 'SHORTCUT_ESCAPE', SHORTCUT_LEFT = 'SHORTCUT_LEFT', diff --git a/packages/react-error-overlay/src/effects/stackTraceLimit.js b/packages/react-error-overlay/src/effects/stackTraceLimit.js index c683ae298fa..ea109cd98ec 100644 --- a/packages/react-error-overlay/src/effects/stackTraceLimit.js +++ b/packages/react-error-overlay/src/effects/stackTraceLimit.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ let stackTraceRegistered: boolean = false; // Default: https://docs.microsoft.com/en-us/scripting/javascript/reference/stacktracelimit-property-error-javascript diff --git a/packages/react-error-overlay/src/effects/unhandledError.js b/packages/react-error-overlay/src/effects/unhandledError.js index 68de9f5075e..12f256c0e7c 100644 --- a/packages/react-error-overlay/src/effects/unhandledError.js +++ b/packages/react-error-overlay/src/effects/unhandledError.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ let boundErrorHandler = null; diff --git a/packages/react-error-overlay/src/effects/unhandledRejection.js b/packages/react-error-overlay/src/effects/unhandledRejection.js index dd71923a488..638729e8d57 100644 --- a/packages/react-error-overlay/src/effects/unhandledRejection.js +++ b/packages/react-error-overlay/src/effects/unhandledRejection.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ let boundRejectionHandler = null; diff --git a/packages/react-error-overlay/src/index.js b/packages/react-error-overlay/src/index.js index 04cb320826a..4f3b2316727 100644 --- a/packages/react-error-overlay/src/index.js +++ b/packages/react-error-overlay/src/index.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ import { inject, uninject } from './overlay'; diff --git a/packages/react-error-overlay/src/overlay.js b/packages/react-error-overlay/src/overlay.js index 9cb2772fe77..181cb02716d 100644 --- a/packages/react-error-overlay/src/overlay.js +++ b/packages/react-error-overlay/src/overlay.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ import { register as registerError, diff --git a/packages/react-error-overlay/src/styles.js b/packages/react-error-overlay/src/styles.js index ce127730761..bf17561d721 100644 --- a/packages/react-error-overlay/src/styles.js +++ b/packages/react-error-overlay/src/styles.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ const black = '#293238', darkGray = '#878e91', diff --git a/packages/react-error-overlay/src/utils/dom/absolutifyCaret.js b/packages/react-error-overlay/src/utils/dom/absolutifyCaret.js index 2adb472d04c..d9216753000 100644 --- a/packages/react-error-overlay/src/utils/dom/absolutifyCaret.js +++ b/packages/react-error-overlay/src/utils/dom/absolutifyCaret.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ function removeNextBr(parent, component: ?Element) { while (component != null && component.tagName.toLowerCase() !== 'br') { diff --git a/packages/react-error-overlay/src/utils/dom/consumeEvent.js b/packages/react-error-overlay/src/utils/dom/consumeEvent.js index 70198d2acf1..90bb9d1e815 100644 --- a/packages/react-error-overlay/src/utils/dom/consumeEvent.js +++ b/packages/react-error-overlay/src/utils/dom/consumeEvent.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ function consumeEvent(e: Event) { e.preventDefault(); diff --git a/packages/react-error-overlay/src/utils/dom/css.js b/packages/react-error-overlay/src/utils/dom/css.js index 558a068575a..60b214b0773 100644 --- a/packages/react-error-overlay/src/utils/dom/css.js +++ b/packages/react-error-overlay/src/utils/dom/css.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ let injectedCount = 0; const injectedCache = {}; diff --git a/packages/react-error-overlay/src/utils/dom/enableTabClick.js b/packages/react-error-overlay/src/utils/dom/enableTabClick.js index 156b06c2ead..b663c055f8c 100644 --- a/packages/react-error-overlay/src/utils/dom/enableTabClick.js +++ b/packages/react-error-overlay/src/utils/dom/enableTabClick.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ function enableTabClick(node: Element) { node.setAttribute('tabindex', '0'); diff --git a/packages/react-error-overlay/src/utils/errorRegister.js b/packages/react-error-overlay/src/utils/errorRegister.js index 3fc1ab6b965..0bd3379cef1 100644 --- a/packages/react-error-overlay/src/utils/errorRegister.js +++ b/packages/react-error-overlay/src/utils/errorRegister.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ import type { StackFrame } from './stack-frame'; import { parse } from './parser'; diff --git a/packages/react-error-overlay/src/utils/getLinesAround.js b/packages/react-error-overlay/src/utils/getLinesAround.js index 42406e28d94..a03e09a5817 100644 --- a/packages/react-error-overlay/src/utils/getLinesAround.js +++ b/packages/react-error-overlay/src/utils/getLinesAround.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + //@flow import { ScriptLine } from './stack-frame'; diff --git a/packages/react-error-overlay/src/utils/getSourceMap.js b/packages/react-error-overlay/src/utils/getSourceMap.js index 1a48171452b..80dd6002e0e 100644 --- a/packages/react-error-overlay/src/utils/getSourceMap.js +++ b/packages/react-error-overlay/src/utils/getSourceMap.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + //@flow import { SourceMapConsumer } from 'source-map'; diff --git a/packages/react-error-overlay/src/utils/isInternalFile.js b/packages/react-error-overlay/src/utils/isInternalFile.js index 8678f13e4b4..71beea7cc57 100644 --- a/packages/react-error-overlay/src/utils/isInternalFile.js +++ b/packages/react-error-overlay/src/utils/isInternalFile.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + /* @flow */ function isInternalFile(sourceFileName: ?string, fileName: ?string) { return sourceFileName == null || diff --git a/packages/react-error-overlay/src/utils/mapper.js b/packages/react-error-overlay/src/utils/mapper.js index 3dbb642a11f..fc3eb2266e6 100644 --- a/packages/react-error-overlay/src/utils/mapper.js +++ b/packages/react-error-overlay/src/utils/mapper.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + // @flow import StackFrame from './stack-frame'; import { getSourceMap } from './getSourceMap'; diff --git a/packages/react-error-overlay/src/utils/parser.js b/packages/react-error-overlay/src/utils/parser.js index 442e6578ce6..bfbb85f7969 100644 --- a/packages/react-error-overlay/src/utils/parser.js +++ b/packages/react-error-overlay/src/utils/parser.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + // @flow import StackFrame from './stack-frame'; diff --git a/packages/react-error-overlay/src/utils/stack-frame.js b/packages/react-error-overlay/src/utils/stack-frame.js index f928cf9c8f6..ae28cb53585 100644 --- a/packages/react-error-overlay/src/utils/stack-frame.js +++ b/packages/react-error-overlay/src/utils/stack-frame.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + //@flow /** A container holding a script line. */ diff --git a/packages/react-error-overlay/src/utils/unmapper.js b/packages/react-error-overlay/src/utils/unmapper.js index d165c249324..74e38955555 100644 --- a/packages/react-error-overlay/src/utils/unmapper.js +++ b/packages/react-error-overlay/src/utils/unmapper.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + // @flow import StackFrame from './stack-frame'; import { getSourceMap } from './getSourceMap'; diff --git a/packages/react-error-overlay/src/utils/warnings.js b/packages/react-error-overlay/src/utils/warnings.js index 87b792bb8e3..8dcd7e1ee30 100644 --- a/packages/react-error-overlay/src/utils/warnings.js +++ b/packages/react-error-overlay/src/utils/warnings.js @@ -1,3 +1,12 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + // @flow import type { ReactFrame } from '../effects/proxyConsole'; From d76c1b78ebbfd060aa998cb13e41bc43fc52e667 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 20 May 2017 19:06:48 +0100 Subject: [PATCH 54/76] Wrap console calls into a check (#2290) --- .../react-dev-utils/webpackHotDevClient.js | 26 ++++++---- .../src/effects/proxyConsole.js | 50 +++++++++++-------- 2 files changed, 45 insertions(+), 31 deletions(-) diff --git a/packages/react-dev-utils/webpackHotDevClient.js b/packages/react-dev-utils/webpackHotDevClient.js index 64725367378..05c2bb2b7ab 100644 --- a/packages/react-dev-utils/webpackHotDevClient.js +++ b/packages/react-dev-utils/webpackHotDevClient.js @@ -172,9 +172,11 @@ var connection = new SockJS( // to avoid spamming the console. Disconnect usually happens // when developer stops the server. connection.onclose = function() { - console.info( - 'The development server has disconnected.\nRefresh the page if necessary.' - ); + if (typeof console !== 'undefined') { + console.info( + 'The development server has disconnected.\nRefresh the page if necessary.' + ); + } }; // Remember some state related to hot module replacement. @@ -184,8 +186,10 @@ var hasCompileErrors = false; function clearOutdatedErrors() { // Clean up outdated compile errors, if any. - if (hasCompileErrors && typeof console.clear === 'function') { - console.clear(); + if (typeof console !== 'undefined') { + if (hasCompileErrors && typeof console.clear === 'function') { + console.clear(); + } } } @@ -222,8 +226,10 @@ function handleWarnings(warnings) { errors: [], }); - for (var i = 0; i < formatted.warnings.length; i++) { - console.warn(stripAnsi(formatted.warnings[i])); + if (typeof console !== 'undefined') { + for (var i = 0; i < formatted.warnings.length; i++) { + console.warn(stripAnsi(formatted.warnings[i])); + } } } @@ -260,8 +266,10 @@ function handleErrors(errors) { showErrorOverlay(formatted.errors[0]); // Also log them to the console. - for (var i = 0; i < formatted.errors.length; i++) { - console.error(stripAnsi(formatted.errors[i])); + if (typeof console !== 'undefined') { + for (var i = 0; i < formatted.errors.length; i++) { + console.error(stripAnsi(formatted.errors[i])); + } } // Do not attempt to reload now. diff --git a/packages/react-error-overlay/src/effects/proxyConsole.js b/packages/react-error-overlay/src/effects/proxyConsole.js index 6b40ff0e125..f17d01890c2 100644 --- a/packages/react-error-overlay/src/effects/proxyConsole.js +++ b/packages/react-error-overlay/src/effects/proxyConsole.js @@ -26,17 +26,21 @@ export type { ReactFrame }; /// TODO: a more comprehensive implementation. const registerReactStack = () => { - // $FlowFixMe - console.reactStack = frames => reactFrameStack.push(frames); - // $FlowFixMe - console.reactStackEnd = frames => reactFrameStack.pop(); + if (typeof console !== 'undefined') { + // $FlowFixMe + console.reactStack = frames => reactFrameStack.push(frames); + // $FlowFixMe + console.reactStackEnd = frames => reactFrameStack.pop(); + } }; const unregisterReactStack = () => { - // $FlowFixMe - console.reactStack = undefined; - // $FlowFixMe - console.reactStackEnd = undefined; + if (typeof console !== 'undefined') { + // $FlowFixMe + console.reactStack = undefined; + // $FlowFixMe + console.reactStackEnd = undefined; + } }; type ConsoleProxyCallback = (message: string, frames: ReactFrame[]) => void; @@ -44,21 +48,23 @@ const permanentRegister = function proxyConsole( type: string, callback: ConsoleProxyCallback ) { - const orig = console[type]; - console[type] = function __stack_frame_overlay_proxy_console__() { - try { - const message = arguments[0]; - if (typeof message === 'string' && reactFrameStack.length > 0) { - callback(message, reactFrameStack[reactFrameStack.length - 1]); + if (typeof console !== 'undefined') { + const orig = console[type]; + console[type] = function __stack_frame_overlay_proxy_console__() { + try { + const message = arguments[0]; + if (typeof message === 'string' && reactFrameStack.length > 0) { + callback(message, reactFrameStack[reactFrameStack.length - 1]); + } + } catch (err) { + // Warnings must never crash. Rethrow with a clean stack. + setTimeout(function() { + throw err; + }); } - } catch (err) { - // Warnings must never crash. Rethrow with a clean stack. - setTimeout(function() { - throw err; - }); - } - return orig.apply(this, arguments); - }; + return orig.apply(this, arguments); + }; + } }; export { permanentRegister, registerReactStack, unregisterReactStack }; From eadfad28f448fffd581c36b8769b32b51474962b Mon Sep 17 00:00:00 2001 From: Jeffrey Posnick Date: Sat, 20 May 2017 11:07:43 -0700 Subject: [PATCH 55/76] Provide a no-op SW that will be served by the dev environment. (#2276) * Provide a no-op SW that will be served by the dev environment. * Hide no-op service worker from user --- packages/react-dev-utils/README.md | 4 ++ .../noopServiceWorkerMiddleware.js | 40 +++++++++++++++++++ packages/react-dev-utils/package.json | 1 + .../config/webpackDevServer.config.js | 7 ++++ 4 files changed, 52 insertions(+) create mode 100644 packages/react-dev-utils/noopServiceWorkerMiddleware.js diff --git a/packages/react-dev-utils/README.md b/packages/react-dev-utils/README.md index c63600b4428..5daa9f062b8 100644 --- a/packages/react-dev-utils/README.md +++ b/packages/react-dev-utils/README.md @@ -240,6 +240,10 @@ getProcessForPort(3000); On macOS, tries to find a known running editor process and opens the file in it. It can also be explicitly configured by `REACT_EDITOR`, `VISUAL`, or `EDITOR` environment variables. For example, you can put `REACT_EDITOR=atom` in your `.env.local` file, and Create React App will respect that. +#### `noopServiceWorkerMiddleware(): ExpressMiddleware` + +Returns Express middleware that serves a `/service-worker.js` that resets any previously set service worker configuration. Useful for development. + #### `openBrowser(url: string): boolean` Attempts to open the browser with a given URL.
diff --git a/packages/react-dev-utils/noopServiceWorkerMiddleware.js b/packages/react-dev-utils/noopServiceWorkerMiddleware.js new file mode 100644 index 00000000000..b6cee735065 --- /dev/null +++ b/packages/react-dev-utils/noopServiceWorkerMiddleware.js @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; + +module.exports = function createNoopServiceWorkerMiddleware() { + return function noopServiceWorkerMiddleware(req, res, next) { + if (req.url === '/service-worker.js') { + res.setHeader('Content-Type', 'text/javascript'); + res.send( + `// This service worker file is effectively a 'no-op' that will reset any +// previous service worker registered for the same host:port combination. +// In the production build, this file is replaced with an actual service worker +// file that will precache your site's local assets. +// See https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432 + +self.addEventListener('install', () => self.skipWaiting()); + +self.addEventListener('activate', () => { + self.clients.matchAll({ type: 'window' }).then(windowClients => { + for (let windowClient of windowClients) { + // Force open pages to refresh, so that they have a chance to load the + // fresh navigation response from the local dev server. + windowClient.navigate(windowClient.url); + } + }); +}); +` + ); + } else { + next(); + } + }; +}; diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index b5d5c127085..fa85d756de1 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -21,6 +21,7 @@ "getProcessForPort.js", "InterpolateHtmlPlugin.js", "launchEditor.js", + "noopServiceWorkerMiddleware.js", "ModuleScopePlugin.js", "openBrowser.js", "openChrome.applescript", diff --git a/packages/react-scripts/config/webpackDevServer.config.js b/packages/react-scripts/config/webpackDevServer.config.js index 94d8c665197..cf7584e5b30 100644 --- a/packages/react-scripts/config/webpackDevServer.config.js +++ b/packages/react-scripts/config/webpackDevServer.config.js @@ -11,6 +11,7 @@ 'use strict'; const errorOverlayMiddleware = require('react-error-overlay/middleware'); +const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware'); const config = require('./webpack.config.dev'); const paths = require('./paths'); @@ -90,6 +91,12 @@ module.exports = function(proxy, allowedHost) { setup(app) { // This lets us open files from the runtime error overlay. app.use(errorOverlayMiddleware()); + // This service worker file is effectively a 'no-op' that will reset any + // previous service worker registered for the same host:port combination. + // We do this in development to avoid hitting the production cache if + // it used the same host and port. + // https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432 + app.use(noopServiceWorkerMiddleware()); }, }; }; From a1749f9154866884e55d2749a1e2255dbe539411 Mon Sep 17 00:00:00 2001 From: pmadar Date: Sat, 20 May 2017 20:08:58 +0200 Subject: [PATCH 56/76] Remove unnecessary dependencies(#751) (#2283) * Remove unnecessary dependencies(#751) * Sort alphabetically --- packages/react-dev-utils/inquirer.js | 14 ++++++++++++++ packages/react-dev-utils/package.json | 1 + packages/react-scripts/package.json | 1 - packages/react-scripts/scripts/eject.js | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 packages/react-dev-utils/inquirer.js diff --git a/packages/react-dev-utils/inquirer.js b/packages/react-dev-utils/inquirer.js new file mode 100644 index 00000000000..9dbc080262c --- /dev/null +++ b/packages/react-dev-utils/inquirer.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; + +var inquirer = require('inquirer'); + +module.exports = inquirer; diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index fa85d756de1..54d61bf0af7 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -19,6 +19,7 @@ "FileSizeReporter.js", "formatWebpackMessages.js", "getProcessForPort.js", + "inquirer.js", "InterpolateHtmlPlugin.js", "launchEditor.js", "noopServiceWorkerMiddleware.js", diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 901f7ce389d..e68c9446e78 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -45,7 +45,6 @@ "file-loader": "0.11.1", "fs-extra": "3.0.1", "html-webpack-plugin": "2.28.0", - "inquirer": "3.0.6", "jest": "20.0.3", "object-assign": "4.1.1", "postcss-flexbugs-fixes": "3.0.0", diff --git a/packages/react-scripts/scripts/eject.js b/packages/react-scripts/scripts/eject.js index ce3cf419707..796e6f63a05 100644 --- a/packages/react-scripts/scripts/eject.js +++ b/packages/react-scripts/scripts/eject.js @@ -21,9 +21,9 @@ const path = require('path'); const execSync = require('child_process').execSync; const spawnSync = require('cross-spawn').sync; const chalk = require('chalk'); -const inquirer = require('inquirer'); const paths = require('../config/paths'); const createJestConfig = require('./utils/createJestConfig'); +const inquirer = require('react-dev-utils/inquirer'); const green = chalk.green; const cyan = chalk.cyan; From 73356a1541808774cf4fe590207a424d261dbe2b Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 20 May 2017 19:20:27 +0100 Subject: [PATCH 57/76] Add changelog for 1.0.2 (#2291) --- CHANGELOG.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd2fee1f496..fa6026df6bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,57 @@ +## 1.0.2 (May 20, 2017) + +#### :bug: Bug Fix + +* `react-dev-utils`, `react-scripts` + + * [#2276](https://github.com/facebookincubator/create-react-app/pull/2276) Serve a no-op service worker in development to ensure it doesn't cache the production build even if it was served on the same port. ([@jeffposnick](https://github.com/jeffposnick)) + +* `react-dev-utils`, `react-error-overlay` + + * [#2290](https://github.com/facebookincubator/create-react-app/pull/2290) Wrap console calls into a check for IE9. ([@gaearon](https://github.com/gaearon)) + +* `react-dev-utils` + + * [#2282](https://github.com/facebookincubator/create-react-app/pull/2282) Add Windows Subsystem for Linux support to the error overlay. ([@noinkling](https://github.com/noinkling)) + * [#2269](https://github.com/facebookincubator/create-react-app/pull/2269) Fix a missing package dependency. ([@GreenGremlin](https://github.com/GreenGremlin)) + +#### :nail_care: Enhancement + +* `react-scripts` + + * [#2221](https://github.com/facebookincubator/create-react-app/pull/2221) Ejecting should ensure you have clean `git status`. ([@milocosmopolitan](https://github.com/milocosmopolitan)) + * [#2288](https://github.com/facebookincubator/create-react-app/pull/2288) Only enable host check if you use proxy, and add a way to opt out of it. ([@gaearon](https://github.com/gaearon)) + +#### :house: Internal + +* `react-dev-utils`, `react-scripts` + + * [#2283](https://github.com/facebookincubator/create-react-app/pull/2283) Remove unnecessary dependencies(#751). ([@pmadar](https://github.com/pmadar)) + +#### Committers: 6 +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- Jeffrey Posnick ([jeffposnick](https://github.com/jeffposnick)) +- Jonathan ([GreenGremlin](https://github.com/GreenGremlin)) +- Malcolm ([noinkling](https://github.com/noinkling)) +- Milo Kang ([milocosmopolitan](https://github.com/milocosmopolitan)) +- [pmadar](https://github.com/pmadar) + +### Migrating from 1.0.1 to 1.0.2 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@1.0.2 +``` + +or + +``` +yarn add --dev --exact react-scripts@1.0.2 +``` + +If you previously had issues with an `Invalid Host Header` error, [follow these new instructions](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#invalid-host-header-errors-after-configuring-proxy) to fix it. + ## 1.0.1 (May 19, 2017) #### :bug: Bug Fix From ae0cb23dc927e1d47c026b8d801cb2a2328822e9 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 20 May 2017 19:20:46 +0100 Subject: [PATCH 58/76] Publish - react-dev-utils@1.0.2 - react-error-overlay@1.0.2 - react-scripts@1.0.2 --- packages/react-dev-utils/package.json | 2 +- packages/react-error-overlay/package.json | 4 ++-- packages/react-scripts/package.json | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index 54d61bf0af7..eb75db06be8 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -1,6 +1,6 @@ { "name": "react-dev-utils", - "version": "1.0.1", + "version": "1.0.2", "description": "Webpack utilities used by Create React App", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index 90a14116062..433b7d0a926 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -1,6 +1,6 @@ { "name": "react-error-overlay", - "version": "1.0.1", + "version": "1.0.2", "description": "An overlay for displaying stack frames.", "main": "lib/index.js", "scripts": { @@ -34,7 +34,7 @@ "anser": "1.2.5", "babel-code-frame": "6.22.0", "babel-runtime": "6.23.0", - "react-dev-utils": "^1.0.1", + "react-dev-utils": "^1.0.2", "settle-promise": "1.0.0", "source-map": "0.5.6" }, diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index e68c9446e78..a304b22d701 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -1,6 +1,6 @@ { "name": "react-scripts", - "version": "1.0.1", + "version": "1.0.2", "description": "Configuration and scripts for Create React App.", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", @@ -50,8 +50,8 @@ "postcss-flexbugs-fixes": "3.0.0", "postcss-loader": "2.0.5", "promise": "7.1.1", - "react-dev-utils": "^1.0.1", - "react-error-overlay": "^1.0.1", + "react-dev-utils": "^1.0.2", + "react-error-overlay": "^1.0.2", "style-loader": "0.17.0", "sw-precache-webpack-plugin": "0.9.1", "url-loader": "0.5.8", From d558eaa94e43edf87db73cad70d4da8116239e2c Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sun, 21 May 2017 20:38:53 +0100 Subject: [PATCH 59/76] Roll back to an older version of case-sensitive-paths-webpack-plugin (#2314) --- packages/react-scripts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index a304b22d701..bf03455abc4 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -28,7 +28,7 @@ "babel-loader": "7.0.0", "babel-preset-react-app": "^3.0.0", "babel-runtime": "6.23.0", - "case-sensitive-paths-webpack-plugin": "2.0.0", + "case-sensitive-paths-webpack-plugin": "1.1.4", "chalk": "1.1.3", "connect-history-api-fallback": "1.3.0", "cross-spawn": "4.0.2", From 7348ca9bd1c1c21ddb6fde5dc8a438e393a053c4 Mon Sep 17 00:00:00 2001 From: Broda Noel Date: Sun, 21 May 2017 16:42:28 -0300 Subject: [PATCH 60/76] Wrap console calls into a check (#2301) * Wrap console calls into a check * Add another check --- .../react-dev-utils/webpackHotDevClient.js | 10 +++---- .../src/effects/proxyConsole.js | 28 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/packages/react-dev-utils/webpackHotDevClient.js b/packages/react-dev-utils/webpackHotDevClient.js index 05c2bb2b7ab..cf4deae7c6d 100644 --- a/packages/react-dev-utils/webpackHotDevClient.js +++ b/packages/react-dev-utils/webpackHotDevClient.js @@ -172,7 +172,7 @@ var connection = new SockJS( // to avoid spamming the console. Disconnect usually happens // when developer stops the server. connection.onclose = function() { - if (typeof console !== 'undefined') { + if (typeof console !== 'undefined' && typeof console.info === 'function') { console.info( 'The development server has disconnected.\nRefresh the page if necessary.' ); @@ -186,8 +186,8 @@ var hasCompileErrors = false; function clearOutdatedErrors() { // Clean up outdated compile errors, if any. - if (typeof console !== 'undefined') { - if (hasCompileErrors && typeof console.clear === 'function') { + if (typeof console !== 'undefined' && typeof console.clear === 'function') { + if (hasCompileErrors) { console.clear(); } } @@ -226,7 +226,7 @@ function handleWarnings(warnings) { errors: [], }); - if (typeof console !== 'undefined') { + if (typeof console !== 'undefined' && typeof console.warn === 'function') { for (var i = 0; i < formatted.warnings.length; i++) { console.warn(stripAnsi(formatted.warnings[i])); } @@ -266,7 +266,7 @@ function handleErrors(errors) { showErrorOverlay(formatted.errors[0]); // Also log them to the console. - if (typeof console !== 'undefined') { + if (typeof console !== 'undefined' && typeof console.error === 'function') { for (var i = 0; i < formatted.errors.length; i++) { console.error(stripAnsi(formatted.errors[i])); } diff --git a/packages/react-error-overlay/src/effects/proxyConsole.js b/packages/react-error-overlay/src/effects/proxyConsole.js index f17d01890c2..ec50ae2ca23 100644 --- a/packages/react-error-overlay/src/effects/proxyConsole.js +++ b/packages/react-error-overlay/src/effects/proxyConsole.js @@ -50,20 +50,22 @@ const permanentRegister = function proxyConsole( ) { if (typeof console !== 'undefined') { const orig = console[type]; - console[type] = function __stack_frame_overlay_proxy_console__() { - try { - const message = arguments[0]; - if (typeof message === 'string' && reactFrameStack.length > 0) { - callback(message, reactFrameStack[reactFrameStack.length - 1]); + if (typeof orig === 'function') { + console[type] = function __stack_frame_overlay_proxy_console__() { + try { + const message = arguments[0]; + if (typeof message === 'string' && reactFrameStack.length > 0) { + callback(message, reactFrameStack[reactFrameStack.length - 1]); + } + } catch (err) { + // Warnings must never crash. Rethrow with a clean stack. + setTimeout(function() { + throw err; + }); } - } catch (err) { - // Warnings must never crash. Rethrow with a clean stack. - setTimeout(function() { - throw err; - }); - } - return orig.apply(this, arguments); - }; + return orig.apply(this, arguments); + }; + } } }; From 3260d17f07ff1200a326065c819c2b52bd8a4085 Mon Sep 17 00:00:00 2001 From: Robert DeLuca Date: Sun, 21 May 2017 14:42:55 -0500 Subject: [PATCH 61/76] Remove `flowtype/require-valid-file-annotation` temporarily. (#2311) Until this issue (https://github.com/gajus/eslint-plugin-flowtype/issues/165) is fixed we're disabling `flowtype/require-valid-file-annotation`. --- packages/eslint-config-react-app/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index 8af2bdb9f8a..3dcce554046 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -282,7 +282,8 @@ module.exports = { // https://github.com/gajus/eslint-plugin-flowtype 'flowtype/define-flow-type': 'warn', - 'flowtype/require-valid-file-annotation': 'warn', + // TODO: Reenable once https://github.com/gajus/eslint-plugin-flowtype/issues/165 is fixed + //'flowtype/require-valid-file-annotation': 'warn', 'flowtype/use-flow-type': 'warn', }, }; From 2430b5615f139321cdeac31caaa369ad83d5b321 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Sun, 21 May 2017 15:44:28 -0400 Subject: [PATCH 62/76] Ensure address is private (#2297) * Ensure address is private Resolves #2296 * adjust rule * Update WebpackDevServerUtils.js --- packages/react-dev-utils/WebpackDevServerUtils.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/react-dev-utils/WebpackDevServerUtils.js b/packages/react-dev-utils/WebpackDevServerUtils.js index 4fcd719087b..02ce10f3e9b 100644 --- a/packages/react-dev-utils/WebpackDevServerUtils.js +++ b/packages/react-dev-utils/WebpackDevServerUtils.js @@ -52,9 +52,22 @@ function prepareUrls(protocol, host, port) { if (isUnspecifiedHost) { prettyHost = 'localhost'; try { + // This can only return an IPv4 address lanUrlForConfig = address.ip(); if (lanUrlForConfig) { - lanUrlForTerminal = prettyPrintUrl(lanUrlForConfig); + // Check if the address is a private ip + // https://en.wikipedia.org/wiki/Private_network#Private_IPv4_address_spaces + if ( + /^10[.]|^172[.](1[6-9]|2[0-9]|3[0-1])[.]|^192[.]168[.]/.test( + lanUrlForConfig + ) + ) { + // Address is private, format it for later use + lanUrlForTerminal = prettyPrintUrl(lanUrlForConfig); + } else { + // Address is not private, so we will discard it + lanUrlForConfig = undefined; + } } } catch (_e) { // ignored From d34a892a6eaaa97391878c0387932f9b19ee3782 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sun, 21 May 2017 20:53:36 +0100 Subject: [PATCH 63/76] Changelog for 1.0.3 (#2315) --- CHANGELOG.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa6026df6bd..a3ae869626c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,39 @@ +## 1.0.3 (May 21, 2017) + +#### :bug: Bug Fix + +* `react-dev-utils` + * [#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)) + +* `eslint-config-react-app` + * [#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)) + +* `react-dev-utils`, `react-error-overlay` + * [#2301](https://github.com/facebookincubator/create-react-app/pull/2301) Wrap more `console` calls into a check. ([@BrodaNoel](https://github.com/BrodaNoel)) + +* `react-scripts` + * [#2314](https://github.com/facebookincubator/create-react-app/pull/2314) Fix a "File not found" false positive. ([@gaearon](https://github.com/gaearon)) + +#### Committers: 4 +- Broda Noel ([BrodaNoel](https://github.com/BrodaNoel)) +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- Joe Haddad ([Timer](https://github.com/Timer)) +- Robert DeLuca ([Robdel12](https://github.com/Robdel12)) + +### Migrating from 1.0.2 to 1.0.3 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@1.0.3 +``` + +or + +``` +yarn add --dev --exact react-scripts@1.0.3 +``` + ## 1.0.2 (May 20, 2017) #### :bug: Bug Fix From d649b8a0de6e94822f60a38637f41ef9efa90b31 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sun, 21 May 2017 20:56:22 +0100 Subject: [PATCH 64/76] Publish - eslint-config-react-app@1.0.2 - react-dev-utils@1.0.3 - react-error-overlay@1.0.3 - react-scripts@1.0.3 --- packages/eslint-config-react-app/package.json | 2 +- packages/react-dev-utils/package.json | 2 +- packages/react-error-overlay/package.json | 6 +++--- packages/react-scripts/package.json | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/eslint-config-react-app/package.json b/packages/eslint-config-react-app/package.json index 3c10bf5dbc3..88fd78a9ead 100644 --- a/packages/eslint-config-react-app/package.json +++ b/packages/eslint-config-react-app/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-react-app", - "version": "1.0.1", + "version": "1.0.2", "description": "ESLint configuration used by Create React App", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index eb75db06be8..16eb847e8f5 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -1,6 +1,6 @@ { "name": "react-dev-utils", - "version": "1.0.2", + "version": "1.0.3", "description": "Webpack utilities used by Create React App", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index 433b7d0a926..7b14acc1b70 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -1,6 +1,6 @@ { "name": "react-error-overlay", - "version": "1.0.2", + "version": "1.0.3", "description": "An overlay for displaying stack frames.", "main": "lib/index.js", "scripts": { @@ -34,7 +34,7 @@ "anser": "1.2.5", "babel-code-frame": "6.22.0", "babel-runtime": "6.23.0", - "react-dev-utils": "^1.0.2", + "react-dev-utils": "^1.0.3", "settle-promise": "1.0.0", "source-map": "0.5.6" }, @@ -44,7 +44,7 @@ "babel-preset-react-app": "^3.0.0", "cross-env": "5.0.0", "eslint": "3.19.0", - "eslint-config-react-app": "^1.0.1", + "eslint-config-react-app": "^1.0.2", "eslint-plugin-flowtype": "2.33.0", "eslint-plugin-import": "2.2.0", "eslint-plugin-jsx-a11y": "5.0.1", diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index bf03455abc4..633b221ba96 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -1,6 +1,6 @@ { "name": "react-scripts", - "version": "1.0.2", + "version": "1.0.3", "description": "Configuration and scripts for Create React App.", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", @@ -35,7 +35,7 @@ "css-loader": "0.28.1", "dotenv": "4.0.0", "eslint": "3.19.0", - "eslint-config-react-app": "^1.0.1", + "eslint-config-react-app": "^1.0.2", "eslint-loader": "1.7.1", "eslint-plugin-flowtype": "2.33.0", "eslint-plugin-import": "2.2.0", @@ -50,8 +50,8 @@ "postcss-flexbugs-fixes": "3.0.0", "postcss-loader": "2.0.5", "promise": "7.1.1", - "react-dev-utils": "^1.0.2", - "react-error-overlay": "^1.0.2", + "react-dev-utils": "^1.0.3", + "react-error-overlay": "^1.0.3", "style-loader": "0.17.0", "sw-precache-webpack-plugin": "0.9.1", "url-loader": "0.5.8", From 6c9b574fc3e5a967339dbc03db2c1e8ffdde5d9d Mon Sep 17 00:00:00 2001 From: Geoffroy Warin Date: Mon, 22 May 2017 13:28:12 +0200 Subject: [PATCH 65/76] Remove tarec from README (#2323) I no longer support this package. Create-react-app is so great I can no longer call tarec a credible alternative :smile: --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index e6f039fcbd8..eee9d7da9ff 100644 --- a/README.md +++ b/README.md @@ -244,7 +244,6 @@ Notable alternatives also include: * [aik](https://github.com/d4rkr00t/aik) * [react-app](https://github.com/kriasoft/react-app) * [dev-toolkit](https://github.com/stoikerty/dev-toolkit) -* [tarec](https://github.com/geowarin/tarec) * [sku](https://github.com/seek-oss/sku) You can also use module bundlers like [webpack](http://webpack.github.io) and [Browserify](http://browserify.org/) directly.
From 812658a14d2bbcd88d2ba879304212e45031c543 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 22 May 2017 12:41:32 +0100 Subject: [PATCH 66/76] 1.0.4 changelog --- CHANGELOG.md | 21 +++++++++++++++++++++ tasks/release.sh | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3ae869626c..9955191c6b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +## 1.0.4 (May 22, 2017) + +#### :bug: Bug Fix + +* `react-error-overlay` + * Fix a regression in published package. + +### Migrating from 1.0.3 to 1.0.4 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@1.0.4 +``` + +or + +``` +yarn add --dev --exact react-scripts@1.0.4 +``` + ## 1.0.3 (May 21, 2017) #### :bug: Bug Fix diff --git a/tasks/release.sh b/tasks/release.sh index 49a7302852f..d72a2bb4462 100755 --- a/tasks/release.sh +++ b/tasks/release.sh @@ -40,5 +40,9 @@ if [ -n "$(git status --porcelain)" ]; then fi cd "$root_path" +# Compile +cd packages/react-error-overlay/ +npm run build:prod +cd ../.. # Go! ./node_modules/.bin/lerna publish --independent "$@" From 7e25c9a6046fe057d3b4cc2eae20a0661d0273f3 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 22 May 2017 12:43:47 +0100 Subject: [PATCH 67/76] Publish - react-error-overlay@1.0.4 - react-scripts@1.0.4 --- packages/react-error-overlay/package.json | 2 +- packages/react-scripts/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index 7b14acc1b70..1b368c41da7 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -1,6 +1,6 @@ { "name": "react-error-overlay", - "version": "1.0.3", + "version": "1.0.4", "description": "An overlay for displaying stack frames.", "main": "lib/index.js", "scripts": { diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 633b221ba96..402dc6dd54e 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -1,6 +1,6 @@ { "name": "react-scripts", - "version": "1.0.3", + "version": "1.0.4", "description": "Configuration and scripts for Create React App.", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", @@ -51,7 +51,7 @@ "postcss-loader": "2.0.5", "promise": "7.1.1", "react-dev-utils": "^1.0.3", - "react-error-overlay": "^1.0.3", + "react-error-overlay": "^1.0.4", "style-loader": "0.17.0", "sw-precache-webpack-plugin": "0.9.1", "url-loader": "0.5.8", From 0d1521aabf5a0201ea1bcccc33e286afe048f820 Mon Sep 17 00:00:00 2001 From: Pavol Madar Date: Mon, 22 May 2017 13:46:51 +0200 Subject: [PATCH 68/76] Remove connect-history-api-fallback and cross-spawn dependencies from react-scripts (#751) (#2320) --- packages/react-dev-utils/crossSpawn.js | 14 ++++++++++++++ packages/react-dev-utils/package.json | 1 + packages/react-scripts/bin/react-scripts.js | 2 +- packages/react-scripts/package.json | 2 -- packages/react-scripts/scripts/eject.js | 2 +- packages/react-scripts/scripts/init.js | 2 +- 6 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 packages/react-dev-utils/crossSpawn.js diff --git a/packages/react-dev-utils/crossSpawn.js b/packages/react-dev-utils/crossSpawn.js new file mode 100644 index 00000000000..8424dcf090e --- /dev/null +++ b/packages/react-dev-utils/crossSpawn.js @@ -0,0 +1,14 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; + +var crossSpawn = require('cross-spawn'); + +module.exports = crossSpawn; diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index 16eb847e8f5..ccd160971e1 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -15,6 +15,7 @@ "checkRequiredFiles.js", "clearConsole.js", "crashOverlay.js", + "crossSpawn.js", "eslintFormatter.js", "FileSizeReporter.js", "formatWebpackMessages.js", diff --git a/packages/react-scripts/bin/react-scripts.js b/packages/react-scripts/bin/react-scripts.js index 7bf1e7503e2..cb52fe71b09 100755 --- a/packages/react-scripts/bin/react-scripts.js +++ b/packages/react-scripts/bin/react-scripts.js @@ -10,7 +10,7 @@ 'use strict'; -const spawn = require('cross-spawn'); +const spawn = require('react-dev-utils/crossSpawn'); const script = process.argv[2]; const args = process.argv.slice(3); diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 402dc6dd54e..b8c0f69574b 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -30,8 +30,6 @@ "babel-runtime": "6.23.0", "case-sensitive-paths-webpack-plugin": "1.1.4", "chalk": "1.1.3", - "connect-history-api-fallback": "1.3.0", - "cross-spawn": "4.0.2", "css-loader": "0.28.1", "dotenv": "4.0.0", "eslint": "3.19.0", diff --git a/packages/react-scripts/scripts/eject.js b/packages/react-scripts/scripts/eject.js index 796e6f63a05..c771e075d35 100644 --- a/packages/react-scripts/scripts/eject.js +++ b/packages/react-scripts/scripts/eject.js @@ -19,11 +19,11 @@ process.on('unhandledRejection', err => { const fs = require('fs-extra'); const path = require('path'); const execSync = require('child_process').execSync; -const spawnSync = require('cross-spawn').sync; const chalk = require('chalk'); const paths = require('../config/paths'); const createJestConfig = require('./utils/createJestConfig'); const inquirer = require('react-dev-utils/inquirer'); +const spawnSync = require('react-dev-utils/crossSpawn').sync; const green = chalk.green; const cyan = chalk.cyan; diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js index 87d87e621e7..a50704d1cf7 100644 --- a/packages/react-scripts/scripts/init.js +++ b/packages/react-scripts/scripts/init.js @@ -18,8 +18,8 @@ process.on('unhandledRejection', err => { const fs = require('fs-extra'); const path = require('path'); -const spawn = require('cross-spawn'); const chalk = require('chalk'); +const spawn = require('react-dev-utils/crossSpawn'); module.exports = function( appPath, From 42efedbeb24c5370ea52340f7c62300d52dbc23b Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 22 May 2017 16:04:35 +0100 Subject: [PATCH 69/76] Allow declaring variables before use in a scope above (#2325) --- packages/eslint-config-react-app/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index 3dcce554046..2cbcae04c69 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -195,7 +195,14 @@ module.exports = { ignoreRestSiblings: true, }, ], - 'no-use-before-define': ['warn', 'nofunc'], + 'no-use-before-define': [ + 'warn', + { + functions: false, + classes: false, + variables: false, + }, + ], 'no-useless-computed-key': 'warn', 'no-useless-concat': 'warn', 'no-useless-constructor': 'warn', From 9cfa3552ba68875e0cc2a9cf283dd7dd161f8f14 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 22 May 2017 16:36:53 +0100 Subject: [PATCH 70/76] Limit console warnings to 5 files at most (#2327) --- packages/react-dev-utils/webpackHotDevClient.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/react-dev-utils/webpackHotDevClient.js b/packages/react-dev-utils/webpackHotDevClient.js index cf4deae7c6d..7d6a979e270 100644 --- a/packages/react-dev-utils/webpackHotDevClient.js +++ b/packages/react-dev-utils/webpackHotDevClient.js @@ -228,6 +228,13 @@ function handleWarnings(warnings) { if (typeof console !== 'undefined' && typeof console.warn === 'function') { for (var i = 0; i < formatted.warnings.length; i++) { + if (i === 5) { + console.warn( + 'There were more warnings in other files.\n' + + 'You can find a complete log in the terminal.' + ); + break; + } console.warn(stripAnsi(formatted.warnings[i])); } } From 25f81f2bea6fd1553425bc8fe10b4a6aa16a58f2 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 22 May 2017 17:04:17 +0100 Subject: [PATCH 71/76] Files in public/ folder should not be requested through proxy (#2326) --- packages/react-dev-utils/README.md | 2 +- .../react-dev-utils/WebpackDevServerUtils.js | 20 +++++++++---------- packages/react-scripts/scripts/start.js | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/react-dev-utils/README.md b/packages/react-dev-utils/README.md index 5daa9f062b8..166e1bfaea3 100644 --- a/packages/react-dev-utils/README.md +++ b/packages/react-dev-utils/README.md @@ -283,7 +283,7 @@ Returns a Promise resolving to either `defaultPort` or next available port if th Creates a Webpack compiler instance for WebpackDevServer with built-in helpful messages. Takes the `require('webpack')` entry point as the first argument. To provide the `urls` argument, use `prepareUrls()` described below. -##### `prepareProxy(proxySetting: string): Object` +##### `prepareProxy(proxySetting: string, appPublicFolder: string): Object` Creates a WebpackDevServer `proxy` configuration object from the `proxy` setting in `package.json`. diff --git a/packages/react-dev-utils/WebpackDevServerUtils.js b/packages/react-dev-utils/WebpackDevServerUtils.js index 02ce10f3e9b..70b5e6a7eab 100644 --- a/packages/react-dev-utils/WebpackDevServerUtils.js +++ b/packages/react-dev-utils/WebpackDevServerUtils.js @@ -9,6 +9,8 @@ 'use strict'; const address = require('address'); +const fs = require('fs'); +const path = require('path'); const url = require('url'); const chalk = require('chalk'); const detect = require('@timer/detect-port'); @@ -240,7 +242,7 @@ function onProxyError(proxy) { }; } -function prepareProxy(proxy) { +function prepareProxy(proxy, appPublicFolder) { // `proxy` lets you specify alternate servers for specific requests. // It can either be a string or an object conforming to the Webpack dev server proxy configuration // https://webpack.github.io/docs/webpack-dev-server.html @@ -264,13 +266,11 @@ function prepareProxy(proxy) { process.exit(1); } - // Otherwise, if proxy is specified, we will let it handle any request. - // There are a few exceptions which we won't send to the proxy: - // - /index.html (served as HTML5 history API fallback) - // - /*.hot-update.json (WebpackDevServer uses this too for hot reloading) - // - /sockjs-node/* (WebpackDevServer uses this for hot reloading) - // Tip: use https://jex.im/regulex/ to visualize the regex - const mayProxy = /^(?!\/(index\.html$|.*\.hot-update\.json$|sockjs-node\/)).*$/; + // Otherwise, if proxy is specified, we will let it handle any request except for files in the public folder. + function mayProxy(pathname) { + const maybePublicPath = path.resolve(appPublicFolder, pathname.slice(1)); + return !fs.existsSync(maybePublicPath); + } // Support proxy as a string for those who are using the simple proxy option if (typeof proxy === 'string') { @@ -301,7 +301,7 @@ function prepareProxy(proxy) { // However API calls like `fetch()` won’t generally accept text/html. // If this heuristic doesn’t work well for you, use a custom `proxy` object. context: function(pathname, req) { - return mayProxy.test(pathname) && + return mayProxy(pathname) && req.headers.accept && req.headers.accept.indexOf('text/html') === -1; }, @@ -341,7 +341,7 @@ function prepareProxy(proxy) { } return Object.assign({}, proxy[context], { context: function(pathname) { - return mayProxy.test(pathname) && pathname.match(context); + return mayProxy(pathname) && pathname.match(context); }, onProxyReq: proxyReq => { // Browers may send Origin headers even with same-origin diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index 92d4f562fdd..a451228df8b 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -66,7 +66,7 @@ choosePort(HOST, DEFAULT_PORT) const compiler = createCompiler(webpack, config, appName, urls, useYarn); // Load proxy config const proxySetting = require(paths.appPackageJson).proxy; - const proxyConfig = prepareProxy(proxySetting); + const proxyConfig = prepareProxy(proxySetting, paths.appPublic); // Serve webpack assets generated by the compiler over a web sever. const serverConfig = createDevServerConfig( proxyConfig, From d72b6b4df02325e014025ea73abe27cde2efebab Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 22 May 2017 17:07:25 +0100 Subject: [PATCH 72/76] Add changelog for 1.0.5 (#2329) --- CHANGELOG.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9955191c6b3..67596103f33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,28 @@ +## 1.0.5 (May 22, 2017) + +#### :bug: Bug Fix +* `react-dev-utils`, `react-scripts` + + * [#2326](https://github.com/facebookincubator/create-react-app/pull/2326) Files in `public/` folder should not be requested through proxy. ([@gaearon](https://github.com/gaearon)) + +#### :nail_care: Enhancement +* `react-dev-utils` + + * [#2327](https://github.com/facebookincubator/create-react-app/pull/2327) Limit console warnings to 5 files at most. ([@gaearon](https://github.com/gaearon)) + +* `eslint-config-react-app` + + * [#2325](https://github.com/facebookincubator/create-react-app/pull/2325) Allow declaring variables before use in a scope above. ([@gaearon](https://github.com/gaearon)) + +#### :house: Internal +* `react-dev-utils`, `react-scripts` + + * [#2320](https://github.com/facebookincubator/create-react-app/pull/2320) Remove unnecessary dependencies. ([@pmadar](https://github.com/pmadar)) + +#### Committers: 2 +- Dan Abramov ([gaearon](https://github.com/gaearon)) +- Pavol Madar ([pmadar](https://github.com/pmadar)) + ## 1.0.4 (May 22, 2017) #### :bug: Bug Fix From 6e9b73014a0dd9a9e66362be4251e67c3d4ff41a Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 22 May 2017 17:09:02 +0100 Subject: [PATCH 73/76] Add "Migrating" section --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67596103f33..acc30ee7958 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,20 @@ - Dan Abramov ([gaearon](https://github.com/gaearon)) - Pavol Madar ([pmadar](https://github.com/pmadar)) +### Migrating from 1.0.4 to 1.0.5 + +Inside any created project that has not been ejected, run: + +``` +npm install --save-dev --save-exact react-scripts@1.0.5 +``` + +or + +``` +yarn add --dev --exact react-scripts@1.0.5 +``` + ## 1.0.4 (May 22, 2017) #### :bug: Bug Fix From 2558c3e32fbf9292a95671501abe0da4de4e893e Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 22 May 2017 17:08:26 +0100 Subject: [PATCH 74/76] Publish - eslint-config-react-app@1.0.3 - react-dev-utils@2.0.0 - react-error-overlay@1.0.5 - react-scripts@1.0.5 --- packages/eslint-config-react-app/package.json | 2 +- packages/react-dev-utils/package.json | 2 +- packages/react-error-overlay/package.json | 6 +++--- packages/react-scripts/package.json | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/eslint-config-react-app/package.json b/packages/eslint-config-react-app/package.json index 88fd78a9ead..cef6568b8a1 100644 --- a/packages/eslint-config-react-app/package.json +++ b/packages/eslint-config-react-app/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-react-app", - "version": "1.0.2", + "version": "1.0.3", "description": "ESLint configuration used by Create React App", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index ccd160971e1..6bffe7182ba 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -1,6 +1,6 @@ { "name": "react-dev-utils", - "version": "1.0.3", + "version": "2.0.0", "description": "Webpack utilities used by Create React App", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index 1b368c41da7..890dda43bcb 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -1,6 +1,6 @@ { "name": "react-error-overlay", - "version": "1.0.4", + "version": "1.0.5", "description": "An overlay for displaying stack frames.", "main": "lib/index.js", "scripts": { @@ -34,7 +34,7 @@ "anser": "1.2.5", "babel-code-frame": "6.22.0", "babel-runtime": "6.23.0", - "react-dev-utils": "^1.0.3", + "react-dev-utils": "^2.0.0", "settle-promise": "1.0.0", "source-map": "0.5.6" }, @@ -44,7 +44,7 @@ "babel-preset-react-app": "^3.0.0", "cross-env": "5.0.0", "eslint": "3.19.0", - "eslint-config-react-app": "^1.0.2", + "eslint-config-react-app": "^1.0.3", "eslint-plugin-flowtype": "2.33.0", "eslint-plugin-import": "2.2.0", "eslint-plugin-jsx-a11y": "5.0.1", diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index b8c0f69574b..06b0d6b76c4 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -1,6 +1,6 @@ { "name": "react-scripts", - "version": "1.0.4", + "version": "1.0.5", "description": "Configuration and scripts for Create React App.", "repository": "facebookincubator/create-react-app", "license": "BSD-3-Clause", @@ -33,7 +33,7 @@ "css-loader": "0.28.1", "dotenv": "4.0.0", "eslint": "3.19.0", - "eslint-config-react-app": "^1.0.2", + "eslint-config-react-app": "^1.0.3", "eslint-loader": "1.7.1", "eslint-plugin-flowtype": "2.33.0", "eslint-plugin-import": "2.2.0", @@ -48,8 +48,8 @@ "postcss-flexbugs-fixes": "3.0.0", "postcss-loader": "2.0.5", "promise": "7.1.1", - "react-dev-utils": "^1.0.3", - "react-error-overlay": "^1.0.4", + "react-dev-utils": "^2.0.0", + "react-error-overlay": "^1.0.5", "style-loader": "0.17.0", "sw-precache-webpack-plugin": "0.9.1", "url-loader": "0.5.8", From bef503e752af9d5ac4fc5f19753a83cf97318dba Mon Sep 17 00:00:00 2001 From: Jesse Palmer Date: Mon, 22 May 2017 23:00:30 -0700 Subject: [PATCH 75/76] Add missing files to README (#2334) * add missing files * Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index eee9d7da9ff..8cd74f24f86 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ my-app/ public/ favicon.ico index.html + manifest.json src/ App.css App.js @@ -72,6 +73,7 @@ my-app/ index.css index.js logo.svg + registerServiceWorker.js ``` No configuration or complicated folder structures, just the files you need to build your app.
From 913689fa4b6a778a39a28b0b5d87168f5090d94f Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Tue, 23 May 2017 16:58:52 +0100 Subject: [PATCH 76/76] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index acc30ee7958..cf0d78ca930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -342,6 +342,10 @@ Follow these steps if you see errors about missing lint rules in the editor. If you still have the problem please file an issue. +#### Some of my tests started crashing because of unhandled rejections + +Unhandled Promise rejections will now crash tests. You can fix them by explicitly catching the errors you don’t care about. + #### How to turn my app into a [Progressive Web App](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app)? After the regular update procedure above, add these line to `` in `public/index.html`: