diff --git a/.eslintrc b/.eslintrc
index d4e6d4774..44a504e40 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -11,6 +11,7 @@
},
"rules": {
"no-console": "off",
- "strict": ["error", "global"]
+ "strict": ["error", "global"],
+ "curly": "warn"
}
}
diff --git a/.travis.yml b/.travis.yml
index 194a15b5b..babfaa638 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
---
language: node_js
node_js:
- - 4
- 6
- 7
cache:
@@ -24,5 +23,7 @@ matrix:
include:
- node_js: 0.10
env: TEST_SUITE=simple
- - node_js: 6
- env: USE_YARN=yes TEST_SUITE=simple
+# There's a weird Yarn/Lerna bug related to prerelease versions.
+# TODO: reenable after we ship 1.0.
+# - node_js: 6
+# env: USE_YARN=yes TEST_SUITE=simple
diff --git a/CHANGELOG-0.x.md b/CHANGELOG-0.x.md
new file mode 100644
index 000000000..9614986ff
--- /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.
+
+
+
+#### :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.
+ `react-scripts` will now function as expected when linking to a development version.
+ 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
+```
+
+## 0.9.1 (February 25, 2017)
+
+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
+
+```
+
+You would need to move both `index.html` and `src/favicon.ico` into the `public` folder, and change `` to look like this:
+
+```html
+
+```
+
+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.
+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 ``, [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 `` with ``, 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 `` 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 `
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.
+If you use it, move it to `src` and add the following line to `` in your HTML:
+
+```html
+
+```
+
+#### 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 `` 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 a790aaff7..1bb262250 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,1324 +1,398 @@
-## 0.9.4 (March 6, 2017)
+## 1.0.0 (March 18, 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))
+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.
-#### :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))
+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
-* `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))
+Have you read it? Now let's see how to update your app to the latest version.
-#### 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.5 to 1.0.0
-### Migrating from 0.9.3 to 0.9.4
+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.4
+npm install --save-dev --save-exact react-scripts@1.0.0
```
-You may also optionally update the global command-line utility for scoped package support:
+You may also optionally update the global command-line utility for bug fixes:
```
-npm install -g create-react-app@1.3.0
+npm install -g create-react-app
```
-## 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.
-
-
-
-#### :bug: Bug Fix
+#### Ensure application and test files reside in `src/`
-* `react-scripts`
+We've never supported importing files from outside `src/`, nor have we supported running tests outside of `src/`.
+We also never explicitly forbid doing so, which caused confusion when things didn't work like they should.
- * [#1665](https://github.com/facebookincubator/create-react-app/pull/1665) Temporarily disable ESLint caching because of a bug. ([@gaearon](https://github.com/gaearon))
+When running or building your application, you may see a message like so:
+```
+You attempted to import ... which falls outside of the project src/ directory.
+```
-* `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))
+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).
-#### :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.
+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))
-
- * [#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))
+#### Confusing window globals can no longer be used without `window` qualifier
-* `react-scripts`
- * [#1578](https://github.com/facebookincubator/create-react-app/pull/1578) Enable lint caching in development. ([@viankakrisna](https://github.com/viankakrisna))
+Please prefix any global method with `window.`, you may experience this with methods such as `confirm`.
- * [#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))
+Simply update references from `confirm` to `window.confirm`.
- * [#1567](https://github.com/facebookincubator/create-react-app/pull/1567) Remove .bin files after eject. ([@tuchk4](https://github.com/tuchk4))
+Note that this new lint error will likely uncover legitimate accidental uses of global variables where you meant to define a local variable instead.
- * [#1560](https://github.com/facebookincubator/create-react-app/pull/1560) Bump `recursive-readdir`. ([@wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg))
+#### Why is my import erroring out?
-#### :bug: Bug Fix
-* `react-scripts`
+You can no longer use AMD import syntax, nor define an import anywhere other than the top of the file.
- * [#1635](https://github.com/facebookincubator/create-react-app/pull/1635) **Fix Jest configuration.** ([@Timer](https://github.com/Timer))
+This is to reduce confusion around import statements, which do not allow you to evaluate code between them.
- Fixes ejecting on Windows for macOS and Linux machines.
+#### I see many accessibility warnings
- * [#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))
+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.
- Advanced users may opt to fork `react-scripts` instead of ejecting so they still receive upstream updates.
- `react-scripts` will now function as expected when linking to a development version.
- Previously, you could not test changes with an existing application via linking.
+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.
- * [#1585](https://github.com/facebookincubator/create-react-app/pull/1585) Ensure PORT environment variable is an integer. ([@matoilic](https://github.com/matoilic))
+#### I see many warnings about PropTypes and createClass
- * [#1628](https://github.com/facebookincubator/create-react-app/pull/1628) Show correct port for pushstate-server URL text. ([@mattccrampton](https://github.com/mattccrampton))
+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).
- * [#1647](https://github.com/facebookincubator/create-react-app/pull/1647) Fix `npm test` on Windows ([@gaearon](https://github.com/gaearon))
+#### How do I make my tests work with Jest 20?
+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.
-#### :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))
+If you use snapshots, you will likely need to update them once because of the change in format.
-#### :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))
+#### Flexbox 2009 spec is no longer polyfilled
-#### 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))
+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).
-### Migrating from 0.9.0 to 0.9.2
+We are no longer polyfilling it automatically.
-**Note:** 0.9.1 had known issues so you should skip it.
+#### 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)?
-Inside any created project that has not been ejected, run:
+After the regular update procedure above, add these line to `` in `public/index.html`:
-```
-npm install --save-dev --save-exact react-scripts@0.9.2
+```html
+
+
+
```
-You may also optionally update the global command-line utility for more efficient installs (thanks [@n3tr](https://github.com/n3tr)):
+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"
+}
```
-npm install -g create-react-app@1.1.0
-```
-
-## 0.9.1 (February 25, 2017)
-
-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))
+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).
- 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).
+#### Anything missing?
- * [#937](https://github.com/facebookincubator/create-react-app/pull/1504) Add `PUBLIC_URL` environment variable for advanced use. ([@EnoahNetzach](https://github.com/EnoahNetzach))
+This was a large release, and we might have missed something.
- 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`
+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
-
-```
-
-You would need to move both `index.html` and `src/favicon.ico` into the `public` folder, and change `` to look like this:
-
-```html
-
-```
-
-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.
-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 ``, [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 `` with ``, 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 `` 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 `
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.
-If you use it, move it to `src` and add the following line to `` in your HTML:
-
-```html
-
-```
-
-#### 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 `` 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.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3a6402606..a4e3414be 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -41,6 +41,36 @@ Please **ask first** if somebody else is already working on this or the core dev
Please also provide a **test plan**, i.e. specify how you verified that your addition works.
+## Folder Structure of Create React App
+`create-react-app` is a monorepo, meaning it is divided into independent sub-packages.
+These packages can be found in the [`packages/`](https://github.com/facebookincubator/create-react-app/tree/master/packages) directory.
+
+### Overview of directory structure
+```
+packages/
+ babel-preset-react-app/
+ create-react-app/
+ eslint-config-react-app/
+ react-dev-utils/
+ react-scripts/
+```
+### Package Descriptions
+#### [babel-preset-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/babel-preset-react-app)
+This package is a babel preset intended to be used with `react-scripts`.
+It targets platforms that React is designed to support (IE 9+) and enables experimental features used heavily at Facebook.
+This package is enabled by default for all `create-react-app` scaffolded applications.
+#### [create-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/create-react-app)
+The global CLI command code can be found in this directory, and shouldn't often be changed. It should run on Node 0.10+.
+#### [eslint-config-react-app](https://github.com/facebookincubator/create-react-app/tree/master/packages/eslint-config-react-app)
+This package contains a conservative set of rules focused on making errors apparent and enforces no style rules.
+This package is enabled by default for all `create-react-app` scaffolded applications.
+#### [react-dev-utils](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-dev-utils)
+This package contains utilities used for `react-scripts` and sister packages.
+Its main purpose is to conceal code which the user shouldn't be burdened with upon ejecting.
+#### [react-scripts](https://github.com/facebookincubator/create-react-app/tree/master/packages/react-scripts)
+This package is the heart of the project, which contains the scripts for setting up the development server, building production builds, configuring all software used, etc.
+All functionality must be retained (and configuration given to the user) if they choose to eject.
+
## Setting Up a Local Copy
1. Clone the repo with `git clone https://github.com/facebookincubator/create-react-app`
@@ -58,6 +88,8 @@ cd my-app
and then run `npm start` or `npm run build`.
+*Note: if you are using yarn, we suggest that you use `yarn install --no-lockfile` instead of the bare `yarn` or `yarn install` because we [intentionally](https://github.com/facebookincubator/create-react-app/pull/2014#issuecomment-300811661) do not ignore or add yarn.lock to our repo.*
+
## Cutting a Release
1. Tag all merged pull requests that go into the release with the relevant milestone. Each merged PR should also be labeled with one of the [labels](https://github.com/facebookincubator/create-react-app/labels) named `tag: ...` to indicate what kind of change it is.
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 000000000..87acf9c2f
--- /dev/null
+++ b/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,8 @@
+
diff --git a/README.md b/README.md
index 7b3a9d8e6..286a0cf79 100644
--- a/README.md
+++ b/README.md
@@ -1,61 +1,251 @@
-# `react-scripts-ts` [](https://badge.fury.io/js/react-scripts-ts)
+# Create React App [](https://travis-ci.org/facebookincubator/create-react-app)
-Create React apps (with Typescript) with no build configuration.
+Create React apps with no build configuration.
-_Do you know react and want to try out typescript? Or do you know typescript and want to try out react?_ Get all the benefits from `create-react-app` but you use typescript! 🚀
+* [Getting Started](#getting-started) – How to create a new app.
+* [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.
-## tl;dr
+Create React App works on macOS, Windows, and Linux.
+If something doesn’t work please [file an issue](https://github.com/facebookincubator/create-react-app/issues/new).
+
+## Quick Overview
```sh
npm install -g create-react-app
-create-react-app my-app --scripts-version=react-scripts-ts
+create-react-app my-app
cd my-app/
npm start
```
-## Features
+Then open [http://localhost:3000/](http://localhost:3000/) to see your app.
+When you’re ready to deploy to production, create a minified bundle with `npm run build`.
+
+
+
+### Get Started Immediately
+
+You **don’t** need to install or configure tools like Webpack or Babel.
+They are preconfigured and hidden so that you can focus on the code.
+
+Just create a project, and you’re good to go.
+
+## Getting Started
+
+### Installation
+
+Install it once globally:
+
+```sh
+npm install -g create-react-app
+```
+
+**You’ll need to have Node >= 6 on your machine**. You can use [nvm](https://github.com/creationix/nvm#usage) to easily switch Node versions between different projects.
+
+**This tool doesn’t assume a Node backend**. The Node installation is only required for Create React App itself.
+
+### Creating an App
+
+To create a new app, run:
+
+```sh
+create-react-app my-app
+cd my-app
+```
+
+It will create a directory called `my-app` inside the current folder.
+Inside that directory, it will generate the initial project structure and install the transitive dependencies:
+
+```
+my-app/
+ README.md
+ node_modules/
+ package.json
+ .gitignore
+ public/
+ favicon.ico
+ index.html
+ src/
+ App.css
+ App.js
+ App.test.js
+ index.css
+ index.js
+ logo.svg
+```
+
+No configuration or complicated folder structures, just the files you need to build your app.
+Once the installation is done, you can run some commands inside the project folder:
+
+### `npm start` or `yarn start`
+
+Runs the app in development mode.
+Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
+
+The page will reload if you make edits.
+You will see the build errors and lint warnings in the console.
+
+
+
+### `npm test` or `yarn test`
+
+Runs the test watcher in an interactive mode.
+By default, runs tests related to files changed since the last commit.
+
+[Read more about testing.](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#running-tests)
+
+### `npm run build` or `yarn build`
+
+Builds the app for production to the `build` folder.
+It correctly bundles React in production mode and optimizes the build for the best performance.
+
+The build is minified and the filenames include the hashes.
+A [service worker](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) using an [offline-first caching strategy](https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-falling-back-to-network) is automatically generated.
+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
+
+The [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md) includes information on different topics, such as:
+
+- [Updating to New Releases](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#updating-to-new-releases)
+- [Folder Structure](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#folder-structure)
+- [Available Scripts](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#available-scripts)
+- [Supported Language Features and Polyfills](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#supported-language-features-and-polyfills)
+- [Syntax Highlighting in the Editor](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#syntax-highlighting-in-the-editor)
+- [Displaying Lint Output in the Editor](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#displaying-lint-output-in-the-editor)
+- [Debugging in the Editor](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#debugging-in-the-editor)
+- [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)
+- [Adding Images, Fonts, and Files](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-images-fonts-and-files)
+- [Using the `public` Folder](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder)
+- [Using Global Variables](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-global-variables)
+- [Adding Bootstrap](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-bootstrap)
+- [Adding Flow](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-flow)
+- [Adding Custom Environment Variables](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-custom-environment-variables)
+- [Can I Use Decorators?](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#can-i-use-decorators)
+- [Integrating with an API Backend](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#integrating-with-an-api-backend)
+- [Proxying API Requests in Development](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#proxying-api-requests-in-development)
+- [Using HTTPS in Development](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#using-https-in-development)
+- [Generating Dynamic `` 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)
+- [Troubleshooting](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#troubleshooting)
+
+A copy of the user guide will be created as `README.md` in your project folder.
+
+## How to Update to New Versions?
+
+Please refer to the [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#updating-to-new-releases) for this and other information.
+
+## Philosophy
+
+* **One Dependency:** There is just one build dependency. It uses Webpack, Babel, ESLint, and other amazing projects, but provides a cohesive curated experience on top of them.
+
+* **No Configuration Required:** You don't need to configure anything. Reasonably good configuration of both development and production builds is handled for you so you can focus on writing code.
+
+* **No Lock-In:** You can “eject” to a custom setup at any time. Run a single command, and all the configuration and build dependencies will be moved directly into your project, so you can pick up right where you left off.
+
+## Why Use This?
+
+**If you’re getting started** with React, use `create-react-app` to automate the build of your app. There is no configuration file, and `react-scripts` is the only extra build dependency in your `package.json`. Your environment will have everything you need to build a modern React app:
+
+* React, JSX, ES6, and Flow syntax support.
+* Language extras beyond ES6 like the object spread operator.
+* A dev server that lints for common errors.
+* 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.
+* An offline-first [service worker](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers) and a [web app manifest](https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/), meeting all the [Progressive Web App](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app) criteria.
+
+**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.
+
+**You don’t have to use this.** Historically it has been easy to [gradually adopt](https://www.youtube.com/watch?v=BF58ZJ1ZQxY) React. However many people create new single-page React apps from scratch every day. We’ve heard [loud](https://medium.com/@ericclemmons/javascript-fatigue-48d4011b6fc4) and [clear](https://twitter.com/thomasfuchs/status/708675139253174273) that this process can be error-prone and tedious, especially if this is your first JavaScript build stack. This project is an attempt to figure out a good way to start developing React apps.
+
+### Converting to a Custom Setup
+
+**If you’re a power user** and you aren’t happy with the default configuration, you can “eject” from the tool and use it as a boilerplate generator.
+
+Running `npm run eject` copies all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. Commands like `npm start` and `npm run build` will still work, but they will point to the copied scripts so you can tweak them. At this point, you’re on your own.
+
+**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
+
+You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
+
+## Limitations
+
+Some features are currently **not supported**:
+
+* Server rendering.
+* Some experimental syntax extensions (e.g. decorators).
+* CSS Modules.
+* Importing LESS or Sass directly ([but you still can use them](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc)).
+* Hot reloading of components.
+
+Some of them might get added in the future if they are stable, are useful to majority of React apps, don’t conflict with existing tools, and don’t introduce additional configuration.
+
+## What’s Inside?
+
+The tools used by Create React App are subject to change.
+Currently it is a thin layer on top of many amazing community projects, such as:
+
+* [webpack](https://webpack.github.io/) with [webpack-dev-server](https://github.com/webpack/webpack-dev-server), [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) and [style-loader](https://github.com/webpack/style-loader)
+* [Babel](http://babeljs.io/) with ES6 and extensions used by Facebook (JSX, [object spread](https://github.com/sebmarkbage/ecmascript-rest-spread/commits/master), [class properties](https://github.com/jeffmo/es-class-public-fields))
+* [Autoprefixer](https://github.com/postcss/autoprefixer)
+* [ESLint](http://eslint.org/)
+* [Jest](http://facebook.github.io/jest)
+* and others.
+
+All of them are transitive dependencies of the provided npm package.
-### Code highlighting on error
-When you run `npm run build` the terminal will output the error, including the highlighted sourecode (like babel)!
+## Contributing
-
+We'd love to have your helping hand on `create-react-app`! See [CONTRIBUTING.md](CONTRIBUTING.md) for more information on what we're looking for and how to get started.
-## Changelog
+## React Native
-### 1.4.0
-* Upgrade to typescript@2.3.2 - thanks to @patrick91
-* Add tests around react-scripts-ts - thanks to @migerh
+Looking for something similar, but for React Native?
+Check out [Create React Native App](https://github.com/react-community/create-react-native-app/).
-### 1.3.0
-* Upgrade to typescript@2.2.2 - thanks to @jeremistadler
+## Acknowledgements
-### 1.1.8
-* Fix regression where no `@types` were being installed on init
+We are grateful to the authors of existing related projects for their ideas and collaboration:
-### 1.1.7
-* Merge facebookincubator/create-react-app@0.9.5 into react-scripts-ts
-* Merge facebookincubator/create-react-app@0.9.4 into react-scripts-ts
-* Merge facebookincubator/create-react-app@0.9.3 into react-scripts-ts
-* Merge facebookincubator/create-react-app@0.9.2 into react-scripts-ts
-* Merge facebookincubator/create-react-app@0.9.1 into react-scripts-ts
+* [@eanplatter](https://github.com/eanplatter)
+* [@insin](https://github.com/insin)
+* [@mxstbr](https://github.com/mxstbr)
-### 1.1.6
-* Merge facebookincubator/create-react-app@0.9.0 into react-scripts-ts
+## Alternatives
-### 1.0.6
-* Add missing `cli-highlight` dependency
+If you don’t agree with the choices made in this project, you might want to explore alternatives with different tradeoffs.
+Some of the more popular and actively maintained ones are:
-### 1.0.5
-* Print file names when running `npm run build`
-* Add support for `setupTest.ts`
-* Highlight source code when erroring in `npm run build`
+* [insin/nwb](https://github.com/insin/nwb)
+* [mozilla-neutrino/neutrino-dev](https://github.com/mozilla-neutrino/neutrino-dev)
+* [NYTimes/kyt](https://github.com/NYTimes/kyt)
+* [zeit/next.js](https://github.com/zeit/next.js)
+* [gatsbyjs/gatsby](https://github.com/gatsbyjs/gatsby)
-### 1.0.4
-* Change mentions of `eslint` to `tslint`
+Notable alternatives also include:
-### 1.0.3
-* Remove hidden character from `tsconfig.json`
+* [enclave](https://github.com/eanplatter/enclave)
+* [motion](https://github.com/motion/motion)
+* [quik](https://github.com/satya164/quik)
+* [sagui](https://github.com/saguijs/sagui)
+* [roc](https://github.com/rocjs/roc)
+* [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)
-### 1.0.2
-* Copy `typescriptTransform.js` when running `npm run eject`
+You can also use module bundlers like [webpack](http://webpack.github.io) and [Browserify](http://browserify.org/) directly.
+React documentation includes [a walkthrough](https://facebook.github.io/react/docs/package-management.html) on this topic.
diff --git a/appveyor.yml b/appveyor.yml
index 3a69d68e1..e00da3943 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,3 +1,5 @@
+image: Visual Studio 2017
+
environment:
matrix:
- nodejs_version: 7
@@ -12,12 +14,6 @@ environment:
test_suite: "installs"
- nodejs_version: 6
test_suite: "kitchensink"
- - nodejs_version: 4
- test_suite: "simple"
- - nodejs_version: 4
- test_suite: "installs"
- - nodejs_version: 4
- test_suite: "kitchensink"
cache:
- node_modules -> appveyor.cleanup-cache.txt
@@ -32,6 +28,8 @@ platform:
- x64
install:
+ # TODO: Remove after https://github.com/appveyor/ci/issues/1426 is fixed
+ - set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
- ps: Install-Product node $env:nodejs_version $env:platform
build: off
diff --git a/package.json b/package.json
index 46bc55b02..e6bd7b0c3 100644
--- a/package.json
+++ b/package.json
@@ -5,14 +5,25 @@
"changelog": "lerna-changelog",
"create-react-app": "tasks/cra.sh",
"e2e": "tasks/e2e-simple.sh",
- "postinstall": "lerna bootstrap",
+ "postinstall": "lerna bootstrap && cd packages/react-error-overlay/ && npm run build:prod",
"publish": "tasks/release.sh",
"start": "node packages/react-scripts/scripts/start.js",
- "test": "node packages/react-scripts/scripts/test.js --env=jsdom"
+ "test": "node packages/react-scripts/scripts/test.js --env=jsdom",
+ "format": "prettier --trailing-comma es5 --single-quote --write 'packages/*/*.js' 'packages/*/!(node_modules)/**/*.js'",
+ "precommit": "lint-staged"
},
"devDependencies": {
- "eslint": "3.16.1",
+ "eslint": "3.19.0",
+ "husky": "^0.13.2",
"lerna": "2.0.0-beta.38",
- "lerna-changelog": "^0.2.3"
+ "lerna-changelog": "^0.2.3",
+ "lint-staged": "^3.3.1",
+ "prettier": "^0.21.0"
+ },
+ "lint-staged": {
+ "*.js": [
+ "prettier --trailing-comma es5 --single-quote --write",
+ "git add"
+ ]
}
}
diff --git a/packages/babel-preset-react-app/index.js b/packages/babel-preset-react-app/index.js
index 35a0dafda..c8f20dde6 100644
--- a/packages/babel-preset-react-app/index.js
+++ b/packages/babel-preset-react-app/index.js
@@ -8,29 +8,34 @@
*/
'use strict';
-var path = require('path');
-
const plugins = [
// class { handleClick = () => { } }
require.resolve('babel-plugin-transform-class-properties'),
// The following two plugins use Object.assign directly, instead of Babel's
// extends helper. Note that this assumes `Object.assign` is available.
// { ...todo, completed: true }
- [require.resolve('babel-plugin-transform-object-rest-spread'), {
- useBuiltIns: true
- }],
+ [
+ require.resolve('babel-plugin-transform-object-rest-spread'),
+ {
+ useBuiltIns: true,
+ },
+ ],
// Transforms JSX
- [require.resolve('babel-plugin-transform-react-jsx'), {
- useBuiltIns: true
- }],
+ [
+ require.resolve('babel-plugin-transform-react-jsx'),
+ {
+ useBuiltIns: true,
+ },
+ ],
// Polyfills the runtime needed for async/await and generators
- [require.resolve('babel-plugin-transform-runtime'), {
- helpers: false,
- polyfill: false,
- regenerator: true,
- // Resolve the Babel runtime relative to the config.
- moduleName: path.dirname(require.resolve('babel-runtime/package'))
- }]
+ [
+ require.resolve('babel-plugin-transform-runtime'),
+ {
+ helpers: false,
+ polyfill: false,
+ regenerator: true,
+ },
+ ],
];
// This is similar to how `env` works in Babel:
@@ -42,9 +47,11 @@ const plugins = [
var env = process.env.BABEL_ENV || process.env.NODE_ENV;
if (env !== 'development' && env !== 'test' && env !== 'production') {
throw new Error(
- 'Using `babel-preset-react-app` requires that you specify `NODE_ENV` or '+
- '`BABEL_ENV` environment variables. Valid values are "development", ' +
- '"test", and "production". Instead, received: ' + JSON.stringify(env) + '.'
+ 'Using `babel-preset-react-app` requires that you specify `NODE_ENV` or ' +
+ '`BABEL_ENV` environment variables. Valid values are "development", ' +
+ '"test", and "production". Instead, received: ' +
+ JSON.stringify(env) +
+ '.'
);
}
@@ -59,7 +66,7 @@ if (env === 'development' || env === 'test') {
// Adds component stack to warning messages
require.resolve('babel-plugin-transform-react-jsx-source'),
// Adds __self attribute to JSX which React will use for some warnings
- require.resolve('babel-plugin-transform-react-jsx-self')
+ require.resolve('babel-plugin-transform-react-jsx-self'),
]);
}
@@ -67,41 +74,57 @@ if (env === 'test') {
module.exports = {
presets: [
// ES features necessary for user's Node version
- [require('babel-preset-env').default, {
- targets: {
- node: 'current',
+ [
+ require('babel-preset-env').default,
+ {
+ targets: {
+ node: 'current',
+ },
},
- }],
+ ],
// JSX, Flow
- require.resolve('babel-preset-react')
+ require.resolve('babel-preset-react'),
],
- plugins: plugins
+ plugins: plugins.concat([
+ // Compiles import() to a deferred require()
+ require.resolve('babel-plugin-dynamic-import-node'),
+ ]),
};
} else {
module.exports = {
presets: [
// Latest stable ECMAScript features
- [require.resolve('babel-preset-env'), {
- targets: {
- // React parses on ie 9, so we should too
- ie: 9,
- // We currently minify with uglify
- // Remove after https://github.com/mishoo/UglifyJS2/issues/448
- uglify: true
+ [
+ require.resolve('babel-preset-env'),
+ {
+ targets: {
+ // React parses on ie 9, so we should too
+ ie: 9,
+ // We currently minify with uglify
+ // Remove after https://github.com/mishoo/UglifyJS2/issues/448
+ uglify: true,
+ },
+ // Disable polyfill transforms
+ useBuiltIns: false,
+ // Do not transform modules to CJS
+ modules: false,
},
- // Disable polyfill transforms
- useBuiltIns: false
- }],
+ ],
// JSX, Flow
- require.resolve('babel-preset-react')
+ require.resolve('babel-preset-react'),
],
plugins: plugins.concat([
// function* () { yield 42; yield 43; }
- [require.resolve('babel-plugin-transform-regenerator'), {
- // Async functions are converted to generators by babel-preset-latest
- async: false
- }],
- ])
+ [
+ require.resolve('babel-plugin-transform-regenerator'),
+ {
+ // Async functions are converted to generators by babel-preset-env
+ async: false,
+ },
+ ],
+ // Adds syntax support for import()
+ require.resolve('babel-plugin-syntax-dynamic-import'),
+ ]),
};
if (env === 'production') {
diff --git a/packages/babel-preset-react-app/package.json b/packages/babel-preset-react-app/package.json
index 3c14aa0c8..175b7b129 100644
--- a/packages/babel-preset-react-app/package.json
+++ b/packages/babel-preset-react-app/package.json
@@ -1,6 +1,6 @@
{
"name": "babel-preset-react-app",
- "version": "2.1.1",
+ "version": "3.0.0",
"description": "Babel preset used by Create React App",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
@@ -11,16 +11,20 @@
"index.js"
],
"dependencies": {
- "babel-plugin-transform-class-properties": "6.22.0",
- "babel-plugin-transform-object-rest-spread": "6.22.0",
- "babel-plugin-transform-react-constant-elements": "6.22.0",
- "babel-plugin-transform-react-jsx": "6.22.0",
+ "babel-plugin-dynamic-import-node": "1.0.2",
+ "babel-plugin-syntax-dynamic-import": "6.18.0",
+ "babel-plugin-transform-class-properties": "6.24.1",
+ "babel-plugin-transform-object-rest-spread": "6.23.0",
+ "babel-plugin-transform-react-constant-elements": "6.23.0",
+ "babel-plugin-transform-react-jsx": "6.24.1",
"babel-plugin-transform-react-jsx-self": "6.22.0",
"babel-plugin-transform-react-jsx-source": "6.22.0",
- "babel-plugin-transform-regenerator": "6.22.0",
- "babel-plugin-transform-runtime": "6.22.0",
- "babel-preset-env": "1.2.1",
- "babel-preset-react": "6.22.0",
- "babel-runtime": "6.22.0"
+ "babel-plugin-transform-regenerator": "6.24.1",
+ "babel-plugin-transform-runtime": "6.23.0",
+ "babel-preset-env": "1.4.0",
+ "babel-preset-react": "6.24.1"
+ },
+ "peerDependencies": {
+ "babel-runtime": "^6.23.0"
}
}
diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js
new file mode 100755
index 000000000..b3d0638e9
--- /dev/null
+++ b/packages/create-react-app/createReactApp.js
@@ -0,0 +1,588 @@
+/**
+ * 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.
+ */
+
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// /!\ DO NOT MODIFY THIS FILE /!\
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// create-react-app is installed globally on people's computers. This means
+// that it is extremely difficult to have them upgrade the version and
+// because there's only one global version installed, it is very prone to
+// breaking changes.
+//
+// The only job of create-react-app is to init the repository and then
+// forward all the commands to the local version of create-react-app.
+//
+// If you need to add a new command, please add it to the scripts/ folder.
+//
+// The only reason to modify this file is to add more warnings and
+// troubleshooting information for the `create-react-app` command.
+//
+// Do not make breaking changes! We absolutely don't want to have to
+// tell people to update their global version of create-react-app.
+//
+// Also be careful with new language features.
+// This file must work on Node 6+.
+//
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// /!\ DO NOT MODIFY THIS FILE /!\
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+'use strict';
+
+const validateProjectName = require('validate-npm-package-name');
+const chalk = require('chalk');
+const commander = require('commander');
+const fs = require('fs-extra');
+const path = require('path');
+const execSync = require('child_process').execSync;
+const spawn = require('cross-spawn');
+const semver = require('semver');
+const dns = require('dns');
+const tmp = require('tmp');
+const unpack = require('tar-pack').unpack;
+const hyperquest = require('hyperquest');
+
+const packageJson = require('./package.json');
+
+let projectName;
+
+const program = new commander.Command(packageJson.name)
+ .version(packageJson.version)
+ .arguments('')
+ .usage(`${chalk.green('')} [options]`)
+ .action(name => {
+ projectName = name;
+ })
+ .option('--verbose', 'print additional logs')
+ .option(
+ '--scripts-version ',
+ 'use a non-standard version of react-scripts'
+ )
+ .allowUnknownOption()
+ .on('--help', () => {
+ console.log(` Only ${chalk.green('')} is required.`);
+ console.log();
+ console.log(
+ ` A custom ${chalk.cyan('--scripts-version')} can be one of:`
+ );
+ console.log(` - a specific npm version: ${chalk.green('0.8.2')}`);
+ console.log(
+ ` - a custom fork published on npm: ${chalk.green('my-react-scripts')}`
+ );
+ console.log(
+ ` - a .tgz archive: ${chalk.green('https://mysite.com/my-react-scripts-0.8.2.tgz')}`
+ );
+ console.log(
+ ` It is not needed unless you specifically want to use a fork.`
+ );
+ console.log();
+ console.log(
+ ` If you have any problems, do not hesitate to file an issue:`
+ );
+ console.log(
+ ` ${chalk.cyan('https://github.com/facebookincubator/create-react-app/issues/new')}`
+ );
+ console.log();
+ })
+ .parse(process.argv);
+
+if (typeof projectName === 'undefined') {
+ console.error('Please specify the project directory:');
+ console.log(
+ ` ${chalk.cyan(program.name())} ${chalk.green('')}`
+ );
+ console.log();
+ console.log('For example:');
+ console.log(` ${chalk.cyan(program.name())} ${chalk.green('my-react-app')}`);
+ console.log();
+ console.log(
+ `Run ${chalk.cyan(`${program.name()} --help`)} to see all options.`
+ );
+ process.exit(1);
+}
+
+function printValidationResults(results) {
+ if (typeof results !== 'undefined') {
+ results.forEach(error => {
+ console.error(chalk.red(` * ${error}`));
+ });
+ }
+}
+
+const hiddenProgram = new commander.Command()
+ .option(
+ '--internal-testing-template ',
+ '(internal usage only, DO NOT RELY ON THIS) ' +
+ 'use a non-standard application template'
+ )
+ .parse(process.argv);
+
+createApp(
+ projectName,
+ program.verbose,
+ program.scriptsVersion,
+ hiddenProgram.internalTestingTemplate
+);
+
+function createApp(name, verbose, version, template) {
+ const root = path.resolve(name);
+ const appName = path.basename(root);
+
+ checkAppName(appName);
+ fs.ensureDirSync(name);
+ if (!isSafeToCreateProjectIn(root)) {
+ console.log(
+ `The directory ${chalk.green(name)} contains files that could conflict.`
+ );
+ console.log('Try using a new directory name.');
+ process.exit(1);
+ }
+
+ console.log(`Creating a new React app in ${chalk.green(root)}.`);
+ console.log();
+
+ const packageJson = {
+ name: appName,
+ version: '0.1.0',
+ private: true,
+ };
+ fs.writeFileSync(
+ path.join(root, 'package.json'),
+ JSON.stringify(packageJson, null, 2)
+ );
+ const originalDirectory = process.cwd();
+ process.chdir(root);
+
+ if (!semver.satisfies(process.version, '>=6.0.0')) {
+ console.log(
+ chalk.yellow(
+ `You are using Node ${process.version} so the project will be boostrapped with an old unsupported version of tools.\n\n` +
+ `Please update to Node 6 or higher for a better, fully supported experience.\n`
+ )
+ );
+ // Fall back to latest supported react-scripts on Node 4
+ version = 'react-scripts@0.9.x';
+ }
+
+ const useYarn = shouldUseYarn();
+ if (!useYarn) {
+ const npmInfo = checkNpmVersion();
+ if (!npmInfo.hasMinNpm) {
+ if (npmInfo.npmVersion) {
+ console.log(
+ chalk.yellow(
+ `You are using npm ${npmInfo.npmVersion} so the project will be boostrapped with an old unsupported version of tools.\n\n` +
+ `Please update to npm 3 or higher for a better, fully supported experience.\n`
+ )
+ );
+ }
+ // Fall back to latest supported react-scripts for npm 3
+ version = 'react-scripts@0.9.x';
+ }
+ }
+ run(root, appName, version, verbose, originalDirectory, template, useYarn);
+}
+
+function shouldUseYarn() {
+ try {
+ execSync('yarnpkg --version', { stdio: 'ignore' });
+ return true;
+ } catch (e) {
+ return false;
+ }
+}
+
+function install(useYarn, dependencies, verbose, isOnline) {
+ return new Promise((resolve, reject) => {
+ let command;
+ let args;
+ if (useYarn) {
+ command = 'yarnpkg';
+ args = ['add', '--exact'];
+ if (!isOnline) {
+ args.push('--offline');
+ }
+ [].push.apply(args, dependencies);
+
+ if (!isOnline) {
+ console.log(chalk.yellow('You appear to be offline.'));
+ console.log(chalk.yellow('Falling back to the local Yarn cache.'));
+ console.log();
+ }
+ } else {
+ command = 'npm';
+ args = ['install', '--save', '--save-exact'].concat(dependencies);
+ }
+
+ if (verbose) {
+ args.push('--verbose');
+ }
+
+ const child = spawn(command, args, { stdio: 'inherit' });
+ child.on('close', code => {
+ if (code !== 0) {
+ reject({
+ command: `${command} ${args.join(' ')}`,
+ });
+ return;
+ }
+ resolve();
+ });
+ });
+}
+
+function run(
+ root,
+ appName,
+ version,
+ verbose,
+ originalDirectory,
+ template,
+ useYarn
+) {
+ const packageToInstall = getInstallPackage(version);
+ const allDependencies = ['react', 'react-dom', packageToInstall];
+
+ console.log('Installing packages. This might take a couple minutes.');
+ getPackageName(packageToInstall)
+ .then(packageName => checkIfOnline(useYarn).then(isOnline => ({
+ isOnline: isOnline,
+ packageName: packageName,
+ })))
+ .then(info => {
+ const isOnline = info.isOnline;
+ const packageName = info.packageName;
+ console.log(
+ `Installing ${chalk.cyan('react')}, ${chalk.cyan('react-dom')}, and ${chalk.cyan(packageName)}...`
+ );
+ console.log();
+
+ return install(useYarn, allDependencies, verbose, isOnline).then(
+ () => packageName
+ );
+ })
+ .then(packageName => {
+ checkNodeVersion(packageName);
+
+ // Since react-scripts has been installed with --save
+ // we need to move it into devDependencies and rewrite package.json
+ // also ensure react dependencies have caret version range
+ fixDependencies(packageName);
+
+ const scriptsPath = path.resolve(
+ process.cwd(),
+ 'node_modules',
+ packageName,
+ 'scripts',
+ 'init.js'
+ );
+ const init = require(scriptsPath);
+ init(root, appName, verbose, originalDirectory, template);
+
+ if (version === 'react-scripts@0.9.x') {
+ console.log(
+ chalk.yellow(
+ `\nNote: the project was boostrapped with an old unsupported version of tools.\n` +
+ `Please update to Node >=6 and npm >=3 to get supported tools in new projects.\n`
+ )
+ );
+ }
+ })
+ .catch(reason => {
+ console.log();
+ console.log('Aborting installation.');
+ if (reason.command) {
+ console.log(` ${chalk.cyan(reason.command)} has failed.`);
+ } else {
+ console.log(chalk.red('Unexpected error. Please report it as a bug:'));
+ console.log(reason);
+ }
+ console.log();
+
+ // On 'exit' we will delete these files from target directory.
+ const knownGeneratedFiles = [
+ 'package.json',
+ 'npm-debug.log',
+ 'yarn-error.log',
+ 'yarn-debug.log',
+ 'node_modules',
+ ];
+ const currentFiles = fs.readdirSync(path.join(root));
+ currentFiles.forEach(file => {
+ knownGeneratedFiles.forEach(fileToMatch => {
+ // This will catch `(npm-debug|yarn-error|yarn-debug).log*` files
+ // and the rest of knownGeneratedFiles.
+ if (
+ (fileToMatch.match(/.log/g) && file.indexOf(fileToMatch) === 0) ||
+ file === fileToMatch
+ ) {
+ console.log(`Deleting generated file... ${chalk.cyan(file)}`);
+ fs.removeSync(path.join(root, file));
+ }
+ });
+ });
+ const remainingFiles = fs.readdirSync(path.join(root));
+ if (!remainingFiles.length) {
+ // Delete target folder if empty
+ console.log(
+ `Deleting ${chalk.cyan(`${appName} /`)} from ${chalk.cyan(path.resolve(root, '..'))}`
+ );
+ process.chdir(path.resolve(root, '..'));
+ fs.removeSync(path.join(root));
+ }
+ console.log('Done.');
+ process.exit(1);
+ });
+}
+
+function getInstallPackage(version) {
+ let packageToInstall = 'react-scripts';
+ const validSemver = semver.valid(version);
+ if (validSemver) {
+ packageToInstall += `@${validSemver}`;
+ } else if (version) {
+ // for tar.gz or alternative paths
+ packageToInstall = version;
+ }
+ return packageToInstall;
+}
+
+function getTemporaryDirectory() {
+ return new Promise((resolve, reject) => {
+ // Unsafe cleanup lets us recursively delete the directory if it contains
+ // contents; by default it only allows removal if it's empty
+ tmp.dir({ unsafeCleanup: true }, (err, tmpdir, callback) => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve({
+ tmpdir: tmpdir,
+ cleanup: () => {
+ try {
+ callback();
+ } catch (ignored) {
+ // Callback might throw and fail, since it's a temp directory the
+ // OS will clean it up eventually...
+ }
+ },
+ });
+ }
+ });
+ });
+}
+
+function extractStream(stream, dest) {
+ return new Promise((resolve, reject) => {
+ stream.pipe(
+ unpack(dest, err => {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(dest);
+ }
+ })
+ );
+ });
+}
+
+// Extract package name from tarball url or path.
+function getPackageName(installPackage) {
+ if (installPackage.indexOf('.tgz') > -1) {
+ return getTemporaryDirectory()
+ .then(obj => {
+ let stream;
+ if (/^http/.test(installPackage)) {
+ stream = hyperquest(installPackage);
+ } else {
+ stream = fs.createReadStream(installPackage);
+ }
+ return extractStream(stream, obj.tmpdir).then(() => obj);
+ })
+ .then(obj => {
+ const packageName = require(path.join(obj.tmpdir, 'package.json')).name;
+ obj.cleanup();
+ return packageName;
+ })
+ .catch(err => {
+ // The package name could be with or without semver version, e.g. react-scripts-0.2.0-alpha.1.tgz
+ // However, this function returns package name only without semver version.
+ console.log(
+ `Could not extract the package name from the archive: ${err.message}`
+ );
+ const assumedProjectName = installPackage.match(
+ /^.+\/(.+?)(?:-\d+.+)?\.tgz$/
+ )[1];
+ console.log(
+ `Based on the filename, assuming it is "${chalk.cyan(assumedProjectName)}"`
+ );
+ return Promise.resolve(assumedProjectName);
+ });
+ } else if (installPackage.indexOf('git+') === 0) {
+ // Pull package name out of git urls e.g:
+ // git+https://github.com/mycompany/react-scripts.git
+ // git+ssh://github.com/mycompany/react-scripts.git#v1.2.3
+ return Promise.resolve(installPackage.match(/([^\/]+)\.git(#.*)?$/)[1]);
+ } else if (installPackage.indexOf('@') > 0) {
+ // Do not match @scope/ when stripping off @version or @tag
+ return Promise.resolve(
+ installPackage.charAt(0) + installPackage.substr(1).split('@')[0]
+ );
+ }
+ return Promise.resolve(installPackage);
+}
+
+function checkNpmVersion() {
+ let hasMinNpm = false;
+ let npmVersion = null;
+ try {
+ npmVersion = execSync('npm --version').toString().trim();
+ hasMinNpm = semver.gte(npmVersion, '3.0.0');
+ } catch (err) {
+ // ignore
+ }
+ return {
+ hasMinNpm: hasMinNpm,
+ npmVersion: npmVersion,
+ };
+}
+
+function checkNodeVersion(packageName) {
+ const packageJsonPath = path.resolve(
+ process.cwd(),
+ 'node_modules',
+ packageName,
+ 'package.json'
+ );
+ const packageJson = require(packageJsonPath);
+ if (!packageJson.engines || !packageJson.engines.node) {
+ return;
+ }
+
+ if (!semver.satisfies(process.version, packageJson.engines.node)) {
+ console.error(
+ chalk.red(
+ 'You are running Node %s.\n' +
+ 'Create React App requires Node %s or higher. \n' +
+ 'Please update your version of Node.'
+ ),
+ process.version,
+ packageJson.engines.node
+ );
+ process.exit(1);
+ }
+}
+
+function checkAppName(appName) {
+ const validationResult = validateProjectName(appName);
+ if (!validationResult.validForNewPackages) {
+ console.error(
+ `Could not create a project called ${chalk.red(`"${appName}"`)} because of npm naming restrictions:`
+ );
+ printValidationResults(validationResult.errors);
+ printValidationResults(validationResult.warnings);
+ process.exit(1);
+ }
+
+ // TODO: there should be a single place that holds the dependencies
+ const dependencies = ['react', 'react-dom'];
+ const devDependencies = ['react-scripts'];
+ const allDependencies = dependencies.concat(devDependencies).sort();
+ if (allDependencies.indexOf(appName) >= 0) {
+ console.error(
+ chalk.red(
+ `We cannot create a project called ${chalk.green(appName)} because a dependency with the same name exists.\n` +
+ `Due to the way npm works, the following names are not allowed:\n\n`
+ ) +
+ chalk.cyan(allDependencies.map(depName => ` ${depName}`).join('\n')) +
+ chalk.red('\n\nPlease choose a different project name.')
+ );
+ process.exit(1);
+ }
+}
+
+function makeCaretRange(dependencies, name) {
+ const version = dependencies[name];
+
+ if (typeof version === 'undefined') {
+ console.error(chalk.red(`Missing ${name} dependency in package.json`));
+ process.exit(1);
+ }
+
+ let patchedVersion = `^${version}`;
+
+ if (!semver.validRange(patchedVersion)) {
+ console.error(
+ `Unable to patch ${name} dependency version because version ${chalk.red(version)} will become invalid ${chalk.red(patchedVersion)}`
+ );
+ patchedVersion = version;
+ }
+
+ dependencies[name] = patchedVersion;
+}
+
+function fixDependencies(packageName) {
+ const packagePath = path.join(process.cwd(), 'package.json');
+ const packageJson = require(packagePath);
+
+ if (typeof packageJson.dependencies === 'undefined') {
+ console.error(chalk.red('Missing dependencies in package.json'));
+ process.exit(1);
+ }
+
+ const packageVersion = packageJson.dependencies[packageName];
+
+ if (typeof packageVersion === 'undefined') {
+ console.error(chalk.red(`Unable to find ${packageName} in package.json`));
+ process.exit(1);
+ }
+
+ packageJson.devDependencies = packageJson.devDependencies || {};
+ packageJson.devDependencies[packageName] = packageVersion;
+ delete packageJson.dependencies[packageName];
+
+ makeCaretRange(packageJson.dependencies, 'react');
+ makeCaretRange(packageJson.dependencies, 'react-dom');
+
+ fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2));
+}
+
+// If project only contains files generated by GH, it’s safe.
+// We also special case IJ-based products .idea because it integrates with CRA:
+// https://github.com/facebookincubator/create-react-app/pull/368#issuecomment-243446094
+function isSafeToCreateProjectIn(root) {
+ const validFiles = [
+ '.DS_Store',
+ 'Thumbs.db',
+ '.git',
+ '.gitignore',
+ '.idea',
+ 'README.md',
+ 'LICENSE',
+ 'web.iml',
+ '.hg',
+ '.hgignore',
+ '.hgcheck',
+ ];
+ return fs.readdirSync(root).every(file => validFiles.indexOf(file) >= 0);
+}
+
+function checkIfOnline(useYarn) {
+ if (!useYarn) {
+ // Don't ping the Yarn registry.
+ // We'll just assume the best case.
+ return Promise.resolve(true);
+ }
+
+ return new Promise(resolve => {
+ dns.lookup('registry.yarnpkg.com', err => {
+ resolve(err === null);
+ });
+ });
+}
diff --git a/packages/create-react-app/index.js b/packages/create-react-app/index.js
index ebeae5b41..4df90f53f 100755
--- a/packages/create-react-app/index.js
+++ b/packages/create-react-app/index.js
@@ -39,489 +39,22 @@
'use strict';
var chalk = require('chalk');
-var validateProjectName = require("validate-npm-package-name");
var currentNodeVersion = process.versions.node;
-if (currentNodeVersion.split('.')[0] < 4) {
+var semver = currentNodeVersion.split('.');
+var major = semver[0];
+
+if (major < 4) {
console.error(
chalk.red(
- 'You are running Node ' + currentNodeVersion + '.\n' +
- 'Create React App requires Node 4 or higher. \n' +
- 'Please update your version of Node.'
+ 'You are running Node ' +
+ currentNodeVersion +
+ '.\n' +
+ 'Create React App requires Node 4 or higher. \n' +
+ 'Please update your version of Node.'
)
);
process.exit(1);
}
-var commander = require('commander');
-var fs = require('fs-extra');
-var path = require('path');
-var execSync = require('child_process').execSync;
-var spawn = require('cross-spawn');
-var semver = require('semver');
-var dns = require('dns');
-var tmp = require('tmp');
-var unpack = require('tar-pack').unpack;
-var hyperquest = require('hyperquest');
-
-var projectName;
-
-var program = commander
- .version(require('./package.json').version)
- .arguments('')
- .usage(chalk.green('') + ' [options]')
- .action(function (name) {
- projectName = name;
- })
- .option('--verbose', 'print additional logs')
- .option('--scripts-version ', 'use a non-standard version of react-scripts')
- .allowUnknownOption()
- .on('--help', function () {
- console.log(' Only ' + chalk.green('') + ' is required.');
- console.log();
- console.log(' A custom ' + chalk.cyan('--scripts-version') + ' can be one of:');
- console.log(' - a specific npm version: ' + chalk.green('0.8.2'));
- console.log(' - a custom fork published on npm: ' + chalk.green('my-react-scripts'));
- console.log(' - a .tgz archive: ' + chalk.green('https://mysite.com/my-react-scripts-0.8.2.tgz'));
- console.log(' It is not needed unless you specifically want to use a fork.');
- console.log();
- console.log(' If you have any problems, do not hesitate to file an issue:');
- console.log(' ' + chalk.cyan('https://github.com/facebookincubator/create-react-app/issues/new'));
- console.log();
- })
- .parse(process.argv);
-
-if (typeof projectName === 'undefined') {
- console.error('Please specify the project directory:');
- console.log(' ' + chalk.cyan(program.name()) + chalk.green(' '));
- console.log();
- console.log('For example:');
- console.log(' ' + chalk.cyan(program.name()) + chalk.green(' my-react-app'));
- console.log();
- console.log('Run ' + chalk.cyan(program.name() + ' --help') + ' to see all options.');
- process.exit(1);
-}
-
-function printValidationResults(results) {
- if (typeof results !== 'undefined') {
- results.forEach(function (error) {
- console.error(chalk.red(' * ' + error));
- });
- }
-}
-
-var hiddenProgram = new commander.Command()
- .option('--internal-testing-template ', '(internal usage only, DO NOT RELY ON THIS) ' +
- 'use a non-standard application template')
- .parse(process.argv)
-
-createApp(projectName, program.verbose, program.scriptsVersion, hiddenProgram.internalTestingTemplate);
-
-function createApp(name, verbose, version, template) {
- var root = path.resolve(name);
- var appName = path.basename(root);
-
- checkAppName(appName);
- fs.ensureDirSync(name);
- if (!isSafeToCreateProjectIn(root)) {
- console.log('The directory ' + chalk.green(name) + ' contains files that could conflict.');
- console.log('Try using a new directory name.');
- process.exit(1);
- }
-
- console.log(
- 'Creating a new React app in ' + chalk.green(root) + '.'
- );
- console.log();
-
- var packageJson = {
- name: appName,
- version: '0.1.0',
- private: true
- };
- fs.writeFileSync(
- path.join(root, 'package.json'),
- JSON.stringify(packageJson, null, 2)
- );
- var originalDirectory = process.cwd();
- process.chdir(root);
-
- run(root, appName, version, verbose, originalDirectory, template);
-}
-
-function shouldUseYarn() {
- try {
- execSync('yarnpkg --version', {stdio: 'ignore'});
- return true;
- } catch (e) {
- return false;
- }
-}
-
-function install(useYarn, dependencies, verbose, isOnline) {
- return new Promise(function(resolve, reject) {
- var command;
- var args;
- if (useYarn) {
- command = 'yarnpkg';
- args = [
- 'add',
- '--exact',
- ];
- if (!isOnline) {
- args.push('--offline');
- }
- [].push.apply(args, dependencies);
-
- if (!isOnline) {
- console.log(chalk.yellow('You appear to be offline.'));
- console.log(chalk.yellow('Falling back to the local Yarn cache.'));
- console.log();
- }
-
- } else {
- checkNpmVersion();
- command = 'npm';
- args = ['install', '--save', '--save-exact'].concat(dependencies);
- }
-
- if (verbose) {
- args.push('--verbose');
- }
-
- var child = spawn(command, args, {stdio: 'inherit'});
- child.on('close', function(code) {
- if (code !== 0) {
- reject({
- command: command + ' ' + args.join(' ')
- });
- return;
- }
- resolve();
- });
- });
-}
-
-function run(root, appName, version, verbose, originalDirectory, template) {
- var packageToInstall = getInstallPackage(version);
- var allDependencies = ['react', 'react-dom', packageToInstall];
-
- console.log('Installing packages. This might take a couple minutes.');
-
- var useYarn = shouldUseYarn();
- getPackageName(packageToInstall)
- .then(function(packageName) {
- return checkIfOnline(useYarn).then(function(isOnline) {
- return {
- isOnline: isOnline,
- packageName: packageName,
- };
- });
- })
- .then(function(info) {
- var isOnline = info.isOnline;
- var packageName = info.packageName;
- console.log(
- 'Installing ' + chalk.cyan('react') + ', ' + chalk.cyan('react-dom') +
- ', and ' + chalk.cyan(packageName) + '...'
- );
- console.log();
-
- return install(useYarn, allDependencies, verbose, isOnline).then(function() {
- return packageName;
- });
- })
- .then(function(packageName) {
- checkNodeVersion(packageName);
-
- // Since react-scripts has been installed with --save
- // we need to move it into devDependencies and rewrite package.json
- // also ensure react dependencies have caret version range
- fixDependencies(packageName);
-
- var scriptsPath = path.resolve(
- process.cwd(),
- 'node_modules',
- packageName,
- 'scripts',
- 'init.js'
- );
- var init = require(scriptsPath);
- init(root, appName, verbose, originalDirectory, template);
- })
- .catch(function(reason) {
- console.log();
- console.log('Aborting installation.');
- if (reason.command) {
- console.log(' ' + chalk.cyan(reason.command), 'has failed.')
- } else {
- console.log(chalk.red('Unexpected error. Please report it as a bug:'));
- console.log(reason);
- }
- console.log();
-
- // On 'exit' we will delete these files from target directory.
- var knownGeneratedFiles = [
- 'package.json', 'npm-debug.log', 'yarn-error.log', 'yarn-debug.log', 'node_modules'
- ];
- var currentFiles = fs.readdirSync(path.join(root));
- currentFiles.forEach(function (file) {
- knownGeneratedFiles.forEach(function (fileToMatch) {
- // This will catch `(npm-debug|yarn-error|yarn-debug).log*` files
- // and the rest of knownGeneratedFiles.
- if ((fileToMatch.match(/.log/g) && file.indexOf(fileToMatch) === 0) || file === fileToMatch) {
- console.log('Deleting generated file...', chalk.cyan(file));
- fs.removeSync(path.join(root, file));
- }
- });
- });
- var remainingFiles = fs.readdirSync(path.join(root));
- if (!remainingFiles.length) {
- // Delete target folder if empty
- console.log('Deleting', chalk.cyan(appName + '/'), 'from', chalk.cyan(path.resolve(root, '..')));
- process.chdir(path.resolve(root, '..'));
- fs.removeSync(path.join(root));
- }
- console.log('Done.');
- process.exit(1);
- });
-}
-
-function getInstallPackage(version) {
- var packageToInstall = 'react-scripts';
- var validSemver = semver.valid(version);
- if (validSemver) {
- packageToInstall += '@' + validSemver;
- } else if (version) {
- // for tar.gz or alternative paths
- packageToInstall = version;
- }
- return packageToInstall;
-}
-
-function getTemporaryDirectory() {
- return new Promise(function(resolve, reject) {
- // Unsafe cleanup lets us recursively delete the directory if it contains
- // contents; by default it only allows removal if it's empty
- tmp.dir({ unsafeCleanup: true }, function(err, tmpdir, callback) {
- if (err) {
- reject(err);
- } else {
- resolve({
- tmpdir: tmpdir,
- cleanup: function() {
- try {
- callback();
- } catch (ignored) {
- // Callback might throw and fail, since it's a temp directory the
- // OS will clean it up eventually...
- }
- }
- });
- }
- });
- });
-}
-
-function extractStream(stream, dest) {
- return new Promise(function(resolve, reject) {
- stream.pipe(unpack(dest, function(err) {
- if (err) {
- reject(err);
- } else {
- resolve(dest);
- }
- }));
- });
-}
-
-// Extract package name from tarball url or path.
-function getPackageName(installPackage) {
- if (installPackage.indexOf('.tgz') > -1) {
- return getTemporaryDirectory().then(function(obj) {
- var stream;
- if (/^http/.test(installPackage)) {
- stream = hyperquest(installPackage);
- } else {
- stream = fs.createReadStream(installPackage);
- }
- return extractStream(stream, obj.tmpdir).then(function() {
- return obj;
- });
- }).then(function(obj) {
- var packageName = require(path.join(obj.tmpdir, 'package.json')).name;
- obj.cleanup();
- return packageName;
- }).catch(function(err) {
- // The package name could be with or without semver version, e.g. react-scripts-0.2.0-alpha.1.tgz
- // However, this function returns package name only without semver version.
- console.log('Could not extract the package name from the archive: ' + err.message);
- var assumedProjectName = installPackage.match(/^.+\/(.+?)(?:-\d+.+)?\.tgz$/)[1];
- console.log('Based on the filename, assuming it is "' + chalk.cyan(assumedProjectName) + '"');
- return Promise.resolve(assumedProjectName);
- });
- } else if (installPackage.indexOf('git+') === 0) {
- // Pull package name out of git urls e.g:
- // git+https://github.com/mycompany/react-scripts.git
- // git+ssh://github.com/mycompany/react-scripts.git#v1.2.3
- return Promise.resolve(installPackage.match(/([^\/]+)\.git(#.*)?$/)[1]);
- } else if (installPackage.indexOf('@') > 0) {
- // Do not match @scope/ when stripping off @version or @tag
- return Promise.resolve(installPackage.charAt(0) + installPackage.substr(1).split('@')[0]);
- }
- return Promise.resolve(installPackage);
-}
-
-function checkNpmVersion() {
- var isNpm2 = false;
- try {
- var npmVersion = execSync('npm --version').toString();
- isNpm2 = semver.lt(npmVersion, '3.0.0');
- } catch (err) {
- return;
- }
- if (!isNpm2) {
- return;
- }
- console.log(chalk.yellow('It looks like you are using npm 2.'));
- console.log(chalk.yellow(
- 'We suggest using npm 3 or Yarn for faster install times ' +
- 'and less disk space usage.'
- ));
- console.log();
-}
-
-function checkNodeVersion(packageName) {
- var packageJsonPath = path.resolve(
- process.cwd(),
- 'node_modules',
- packageName,
- 'package.json'
- );
- var packageJson = require(packageJsonPath);
- if (!packageJson.engines || !packageJson.engines.node) {
- return;
- }
-
- if (!semver.satisfies(process.version, packageJson.engines.node)) {
- console.error(
- chalk.red(
- 'You are running Node %s.\n' +
- 'Create React App requires Node %s or higher. \n' +
- 'Please update your version of Node.'
- ),
- process.version,
- packageJson.engines.node
- );
- process.exit(1);
- }
-}
-
-function checkAppName(appName) {
- var validationResult = validateProjectName(appName);
- if (!validationResult.validForNewPackages) {
- console.error('Could not create a project called ' + chalk.red('"' + appName + '"') + ' because of npm naming restrictions:');
- printValidationResults(validationResult.errors);
- printValidationResults(validationResult.warnings);
- process.exit(1);
- }
-
- // TODO: there should be a single place that holds the dependencies
- var dependencies = ['react', 'react-dom'];
- var devDependencies = ['react-scripts'];
- var allDependencies = dependencies.concat(devDependencies).sort();
- if (allDependencies.indexOf(appName) >= 0) {
- console.error(
- chalk.red(
- 'We cannot create a project called ' + chalk.green(appName) + ' because a dependency with the same name exists.\n' +
- 'Due to the way npm works, the following names are not allowed:\n\n'
- ) +
- chalk.cyan(
- allDependencies.map(function(depName) {
- return ' ' + depName;
- }).join('\n')
- ) +
- chalk.red('\n\nPlease choose a different project name.')
- );
- process.exit(1);
- }
-}
-
-function makeCaretRange(dependencies, name) {
- var version = dependencies[name];
-
- if (typeof version === 'undefined') {
- console.error(
- chalk.red('Missing ' + name + ' dependency in package.json')
- );
- process.exit(1);
- }
-
- var patchedVersion = '^' + version;
-
- if (!semver.validRange(patchedVersion)) {
- console.error(
- 'Unable to patch ' + name + ' dependency version because version ' + chalk.red(version) + ' will become invalid ' + chalk.red(patchedVersion)
- );
- patchedVersion = version;
- }
-
- dependencies[name] = patchedVersion;
-}
-
-function fixDependencies(packageName) {
- var packagePath = path.join(process.cwd(), 'package.json');
- var packageJson = require(packagePath);
-
- if (typeof packageJson.dependencies === 'undefined') {
- console.error(
- chalk.red('Missing dependencies in package.json')
- );
- process.exit(1);
- }
-
- var packageVersion = packageJson.dependencies[packageName];
-
- if (typeof packageVersion === 'undefined') {
- console.error(
- chalk.red('Unable to find ' + packageName + ' in package.json')
- );
- process.exit(1);
- }
-
- packageJson.devDependencies = packageJson.devDependencies || {};
- packageJson.devDependencies[packageName] = packageVersion;
- delete packageJson.dependencies[packageName];
-
- makeCaretRange(packageJson.dependencies, 'react');
- makeCaretRange(packageJson.dependencies, 'react-dom');
-
- fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2));
-}
-
-// If project only contains files generated by GH, it’s safe.
-// We also special case IJ-based products .idea because it integrates with CRA:
-// https://github.com/facebookincubator/create-react-app/pull/368#issuecomment-243446094
-function isSafeToCreateProjectIn(root) {
- var validFiles = [
- '.DS_Store', 'Thumbs.db', '.git', '.gitignore', '.idea', 'README.md', 'LICENSE', 'web.iml'
- ];
- return fs.readdirSync(root)
- .every(function(file) {
- return validFiles.indexOf(file) >= 0;
- });
-}
-
-function checkIfOnline(useYarn) {
- if (!useYarn) {
- // Don't ping the Yarn registry.
- // We'll just assume the best case.
- return Promise.resolve(true);
- }
-
- return new Promise(function(resolve) {
- dns.resolve('registry.yarnpkg.com', function(err) {
- resolve(err === null);
- });
- });
-}
+require('./createReactApp');
diff --git a/packages/create-react-app/package.json b/packages/create-react-app/package.json
index 4450add25..13a567fa7 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"
],
@@ -14,7 +14,8 @@
"url": "https://github.com/facebookincubator/create-react-app/issues"
},
"files": [
- "index.js"
+ "index.js",
+ "createReactApp.js"
],
"bin": {
"create-react-app": "./index.js"
diff --git a/packages/eslint-config-react-app/README.md b/packages/eslint-config-react-app/README.md
index 8eace6eff..0679552a2 100644
--- a/packages/eslint-config-react-app/README.md
+++ b/packages/eslint-config-react-app/README.md
@@ -8,7 +8,9 @@ Please refer to its documentation:
## Usage in Create React App Projects
-The easiest way to use this configuration is with [Create React App](https://github.com/facebookincubator/create-react-app), which includes it by default. **You don’t need to install it separately in Create React App projects.**
+The easiest way to use this configuration is with [Create React App](https://github.com/facebookincubator/create-react-app), which includes it by default.
+
+**You don’t need to install it separately in Create React App projects.**
## Usage Outside of Create React App
@@ -17,7 +19,7 @@ If you want to use this ESLint configuration in a project not built with Create
First, install this package, ESLint and the necessary plugins.
```sh
- npm install --save-dev eslint-config-react-app babel-eslint@7.1.1 eslint@3.16.1 eslint-plugin-flowtype@2.21.0 eslint-plugin-import@2.0.1 eslint-plugin-jsx-a11y@4.0.0 eslint-plugin-react@6.4.1
+ npm install --save-dev eslint-config-react-app babel-eslint@7.2.3 eslint@3.19.0 eslint-plugin-flowtype@2.33.0 eslint-plugin-import@2.2.0 eslint-plugin-jsx-a11y@5.0.1 eslint-plugin-react@7.0.1
```
Then create a file named `.eslintrc` with following contents in the root folder of your project:
@@ -29,3 +31,37 @@ Then create a file named `.eslintrc` with following contents in the root folder
```
That's it! You can override the settings from `eslint-config-react-app` by editing the `.eslintrc` file. Learn more about [configuring ESLint](http://eslint.org/docs/user-guide/configuring) on the ESLint website.
+
+## Accessibility Checks
+
+The following rules from the [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) plugin are activated:
+
+- [accessible-emoji](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md)
+- [alt-text](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md)
+- [anchor-has-content](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md)
+- [aria-activedescendant-has-tabindex](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md)
+- [aria-props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md)
+- [aria-proptypes](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md)
+- [aria-role](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md)
+- [aria-unsupported-elements](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md)
+- [heading-has-content](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md)
+- [href-no-hash](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/href-no-hash.md)
+- [iframe-has-title](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md)
+- [img-redundant-alt](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md)
+- [no-access-key](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md)
+- [no-distracting-elements](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md)
+- [no-redundant-roles](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md)
+- [role-has-required-aria-props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md)
+- [role-supports-aria-props](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md)
+- [scope](https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md)
+
+If you want to enable even more accessibility rules, you can create an `.eslintrc` file in the root of your project with this content:
+
+ ```json
+ {
+ "extends": ["react-app", "plugin:jsx-a11y/recommended"],
+ "plugins": ["jsx-a11y"]
+ }
+ ```
+
+However, if you are using [Create React App](https://github.com/facebookincubator/create-react-app) and have not ejected, any additional rules will only be displayed in the [IDE integrations](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#displaying-lint-output-in-the-editor), but not in the browser or the terminal.
diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js
index 3310c9296..163389768 100644
--- a/packages/eslint-config-react-app/index.js
+++ b/packages/eslint-config-react-app/index.js
@@ -18,6 +18,72 @@
// In the future, we might create a separate list of rules for production.
// It would probably be more strict.
+// The ESLint browser environment defines all browser globals as valid,
+// even though most people don't know some of them exist (e.g. `name` or `status`).
+// This is dangerous as it hides accidentally undefined variables.
+// We blacklist the globals that we deem potentially confusing.
+// To use them, explicitly reference them, e.g. `window.name` or `window.status`.
+var restrictedGlobals = [
+ 'addEventListener',
+ 'blur',
+ 'close',
+ 'closed',
+ 'confirm',
+ 'defaultStatus',
+ 'defaultstatus',
+ 'event',
+ 'external',
+ 'find',
+ 'focus',
+ 'frameElement',
+ 'frames',
+ 'history',
+ 'innerHeight',
+ 'innerWidth',
+ 'length',
+ 'location',
+ 'locationbar',
+ 'menubar',
+ 'moveBy',
+ 'moveTo',
+ 'name',
+ 'onblur',
+ 'onerror',
+ 'onfocus',
+ 'onload',
+ 'onresize',
+ 'onunload',
+ 'open',
+ 'opener',
+ 'opera',
+ 'outerHeight',
+ 'outerWidth',
+ 'pageXOffset',
+ 'pageYOffset',
+ 'parent',
+ 'print',
+ 'removeEventListener',
+ 'resizeBy',
+ 'resizeTo',
+ 'screen',
+ 'screenLeft',
+ 'screenTop',
+ 'screenX',
+ 'screenY',
+ 'scroll',
+ 'scrollbars',
+ 'scrollBy',
+ 'scrollTo',
+ 'scrollX',
+ 'scrollY',
+ 'self',
+ 'status',
+ 'statusbar',
+ 'stop',
+ 'toolbar',
+ 'top',
+];
+
module.exports = {
root: true,
@@ -30,7 +96,7 @@ module.exports = {
commonjs: true,
es6: true,
jest: true,
- node: true
+ node: true,
},
parserOptions: {
@@ -39,20 +105,8 @@ module.exports = {
ecmaFeatures: {
jsx: true,
generators: true,
- experimentalObjectRestSpread: true
- }
- },
-
- settings: {
- 'import/ignore': [
- 'node_modules'
- ],
- 'import/extensions': ['.js'],
- 'import/resolver': {
- node: {
- extensions: ['.js', '.json']
- }
- }
+ experimentalObjectRestSpread: true,
+ },
},
rules: {
@@ -85,18 +139,21 @@ module.exports = {
'no-invalid-regexp': 'warn',
'no-iterator': 'warn',
'no-label-var': 'warn',
- 'no-labels': ['warn', { allowLoop: false, allowSwitch: false }],
+ 'no-labels': ['warn', { allowLoop: true, allowSwitch: false }],
'no-lone-blocks': 'warn',
'no-loop-func': 'warn',
- 'no-mixed-operators': ['warn', {
- groups: [
- ['&', '|', '^', '~', '<<', '>>', '>>>'],
- ['==', '!=', '===', '!==', '>', '>=', '<', '<='],
- ['&&', '||'],
- ['in', 'instanceof']
- ],
- allowSamePrecedence: false
- }],
+ 'no-mixed-operators': [
+ 'warn',
+ {
+ groups: [
+ ['&', '|', '^', '~', '<<', '>>', '>>>'],
+ ['==', '!=', '===', '!==', '>', '>=', '<', '<='],
+ ['&&', '||'],
+ ['in', 'instanceof'],
+ ],
+ allowSamePrecedence: false,
+ },
+ ],
'no-multi-str': 'warn',
'no-native-reassign': 'warn',
'no-negated-in-lhs': 'warn',
@@ -109,11 +166,7 @@ module.exports = {
'no-octal-escape': 'warn',
'no-redeclare': 'warn',
'no-regex-spaces': 'warn',
- 'no-restricted-syntax': [
- 'warn',
- 'LabeledStatement',
- 'WithStatement',
- ],
+ 'no-restricted-syntax': ['warn', 'WithStatement'],
'no-script-url': 'warn',
'no-self-assign': 'warn',
'no-self-compare': 'warn',
@@ -124,29 +177,37 @@ module.exports = {
'no-this-before-super': 'warn',
'no-throw-literal': 'warn',
'no-undef': 'error',
+ 'no-restricted-globals': ['error'].concat(restrictedGlobals),
'no-unexpected-multiline': 'warn',
'no-unreachable': 'warn',
- 'no-unused-expressions': ['warn', {
- 'allowShortCircuit': true,
- 'allowTernary': true
- }],
+ 'no-unused-expressions': [
+ 'warn',
+ {
+ allowShortCircuit: true,
+ allowTernary: true,
+ },
+ ],
'no-unused-labels': 'warn',
- 'no-unused-vars': ['warn', {
- vars: 'local',
- varsIgnorePattern: '^_',
- args: 'none',
- ignoreRestSiblings: true,
- }],
+ 'no-unused-vars': [
+ 'warn',
+ {
+ args: 'none',
+ ignoreRestSiblings: true,
+ },
+ ],
'no-use-before-define': ['warn', 'nofunc'],
'no-useless-computed-key': 'warn',
'no-useless-concat': 'warn',
'no-useless-constructor': 'warn',
'no-useless-escape': 'warn',
- 'no-useless-rename': ['warn', {
- ignoreDestructuring: false,
- ignoreImport: false,
- ignoreExport: false,
- }],
+ 'no-useless-rename': [
+ 'warn',
+ {
+ ignoreDestructuring: false,
+ ignoreImport: false,
+ ignoreExport: false,
+ },
+ ],
'no-with': 'warn',
'no-whitespace-before-property': 'warn',
'operator-assignment': ['warn', 'always'],
@@ -157,45 +218,39 @@ module.exports = {
'unicode-bom': ['warn', 'never'],
'use-isnan': 'warn',
'valid-typeof': 'warn',
+ 'no-restricted-properties': [
+ 'error',
+ // TODO: reenable once import() is no longer slow.
+ // https://github.com/facebookincubator/create-react-app/issues/2176
+ // {
+ // object: 'require',
+ // property: 'ensure',
+ // 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://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#code-splitting',
+ },
+ ],
- // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/
-
- // TODO: import rules are temporarily disabled because they don't play well
- // with how eslint-loader only checks the file you change. So if module A
- // imports module B, and B is missing a default export, the linter will
- // record this as an issue in module A. Now if you fix module B, the linter
- // will not be aware that it needs to re-lint A as well, so the error
- // will stay until the next restart, which is really confusing.
-
- // This is probably fixable with a patch to eslint-loader.
- // When file A is saved, we want to invalidate all files that import it
- // *and* that currently have lint errors. This should fix the problem.
- // (As an exception, import/no-webpack-loader-syntax can be enabled already
- // because it doesn't depend on whether the file exists, so this issue
- // doesn't apply to it.)
-
- // 'import/default': 'warn',
- // 'import/export': 'warn',
- // 'import/named': 'warn',
- // 'import/namespace': 'warn',
- // 'import/no-amd': 'warn',
- // 'import/no-duplicates': 'warn',
- // 'import/no-extraneous-dependencies': 'warn',
- // 'import/no-named-as-default': 'warn',
- // 'import/no-named-as-default-member': 'warn',
- // 'import/no-unresolved': ['warn', { commonjs: true }],
- // We don't support configuring Webpack using import source strings, so this
- // is always an error.
+ // https://github.com/benmosher/eslint-plugin-import/tree/master/docs/rules
+ 'import/first': 'error',
+ 'import/no-amd': 'error',
'import/no-webpack-loader-syntax': 'error',
// https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
- 'react/jsx-equals-spacing': ['warn', 'never'],
+ 'react/jsx-no-comment-textnodes': 'warn',
'react/jsx-no-duplicate-props': ['warn', { ignoreCase: true }],
+ 'react/jsx-no-target-blank': 'warn',
'react/jsx-no-undef': 'error',
- 'react/jsx-pascal-case': ['warn', {
- allowAllCaps: true,
- ignore: [],
- }],
+ 'react/jsx-pascal-case': [
+ 'warn',
+ {
+ allowAllCaps: true,
+ ignore: [],
+ },
+ ],
'react/jsx-uses-react': 'warn',
'react/jsx-uses-vars': 'warn',
'react/no-danger-with-children': 'warn',
@@ -203,18 +258,32 @@ module.exports = {
'react/no-direct-mutation-state': 'warn',
'react/no-is-mounted': 'warn',
'react/react-in-jsx-scope': 'error',
- 'react/require-render-return': 'warn',
+ 'react/require-render-return': 'error',
'react/style-prop-object': 'warn',
// https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules
+ 'jsx-a11y/accessible-emoji': 'warn',
+ 'jsx-a11y/alt-text': 'warn',
+ 'jsx-a11y/anchor-has-content': 'warn',
+ 'jsx-a11y/aria-activedescendant-has-tabindex': 'warn',
+ 'jsx-a11y/aria-props': 'warn',
+ 'jsx-a11y/aria-proptypes': 'warn',
'jsx-a11y/aria-role': 'warn',
- 'jsx-a11y/img-has-alt': 'warn',
+ 'jsx-a11y/aria-unsupported-elements': 'warn',
+ 'jsx-a11y/heading-has-content': 'warn',
+ 'jsx-a11y/href-no-hash': 'warn',
+ 'jsx-a11y/iframe-has-title': 'warn',
'jsx-a11y/img-redundant-alt': 'warn',
'jsx-a11y/no-access-key': 'warn',
+ 'jsx-a11y/no-distracting-elements': 'warn',
+ 'jsx-a11y/no-redundant-roles': 'warn',
+ 'jsx-a11y/role-has-required-aria-props': 'warn',
+ 'jsx-a11y/role-supports-aria-props': 'warn',
+ 'jsx-a11y/scope': 'warn',
// https://github.com/gajus/eslint-plugin-flowtype
'flowtype/define-flow-type': 'warn',
'flowtype/require-valid-file-annotation': 'warn',
- 'flowtype/use-flow-type': 'warn'
- }
+ 'flowtype/use-flow-type': 'warn',
+ },
};
diff --git a/packages/eslint-config-react-app/package.json b/packages/eslint-config-react-app/package.json
index 855713e4f..4a815c4e2 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": "0.6.1",
+ "version": "1.0.0",
"description": "ESLint configuration used by Create React App",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
@@ -11,11 +11,11 @@
"index.js"
],
"peerDependencies": {
- "babel-eslint": "^7.0.0",
- "eslint": "^3.16.1",
- "eslint-plugin-flowtype": "^2.21.0",
- "eslint-plugin-import": "^2.0.1",
- "eslint-plugin-jsx-a11y": "^2.0.0 || ^3.0.0 || ^4.0.0",
- "eslint-plugin-react": "^6.4.1"
+ "babel-eslint": "^7.2.3",
+ "eslint": "^3.19.0",
+ "eslint-plugin-flowtype": "^2.33.0",
+ "eslint-plugin-import": "^2.2.0",
+ "eslint-plugin-jsx-a11y": "^5.0.1",
+ "eslint-plugin-react": "^7.0.1"
}
}
diff --git a/packages/react-dev-utils/FileSizeReporter.js b/packages/react-dev-utils/FileSizeReporter.js
index 08273673f..a0db0684f 100644
--- a/packages/react-dev-utils/FileSizeReporter.js
+++ b/packages/react-dev-utils/FileSizeReporter.js
@@ -33,7 +33,7 @@ function printFileSizesAfterBuild(webpackStats, previousSizeMap) {
folder: path.join('build', path.dirname(asset.name)),
name: path.basename(asset.name),
size: size,
- sizeLabel: filesize(size) + (difference ? ' (' + difference + ')' : '')
+ sizeLabel: filesize(size) + (difference ? ' (' + difference + ')' : ''),
};
});
assets.sort((a, b) => b.size - a.size);
@@ -88,12 +88,15 @@ function measureFileSizesBeforeBuild(buildFolder) {
if (!err && fileNames) {
sizes = fileNames
.filter(fileName => /\.(js|css)$/.test(fileName))
- .reduce((memo, fileName) => {
- var contents = fs.readFileSync(fileName);
- var key = removeFileNameHash(buildFolder, fileName);
- memo[key] = gzipSize(contents);
- return memo;
- }, {});
+ .reduce(
+ (memo, fileName) => {
+ var contents = fs.readFileSync(fileName);
+ var key = removeFileNameHash(buildFolder, fileName);
+ memo[key] = gzipSize(contents);
+ return memo;
+ },
+ {}
+ );
}
resolve({
root: buildFolder,
diff --git a/packages/react-dev-utils/InterpolateHtmlPlugin.js b/packages/react-dev-utils/InterpolateHtmlPlugin.js
index 07558f478..ac1d3e996 100644
--- a/packages/react-dev-utils/InterpolateHtmlPlugin.js
+++ b/packages/react-dev-utils/InterpolateHtmlPlugin.js
@@ -25,7 +25,8 @@ class InterpolateHtmlPlugin {
apply(compiler) {
compiler.plugin('compilation', compilation => {
- compilation.plugin('html-webpack-plugin-before-html-processing',
+ compilation.plugin(
+ 'html-webpack-plugin-before-html-processing',
(data, callback) => {
// Run HTML through a series of user-specified string replacements.
Object.keys(this.replacements).forEach(key => {
diff --git a/packages/react-dev-utils/ModuleScopePlugin.js b/packages/react-dev-utils/ModuleScopePlugin.js
new file mode 100644
index 000000000..fd70a2f40
--- /dev/null
+++ b/packages/react-dev-utils/ModuleScopePlugin.js
@@ -0,0 +1,68 @@
+/**
+ * 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');
+const path = require('path');
+
+class ModuleScopePlugin {
+ constructor(appSrc) {
+ this.appSrc = appSrc;
+ }
+
+ apply(resolver) {
+ const { appSrc } = this;
+ resolver.plugin('file', (request, callback) => {
+ // Unknown issuer, probably webpack internals
+ if (!request.context.issuer) {
+ return callback();
+ }
+ if (
+ // If this resolves to a node_module, we don't care what happens next
+ request.descriptionFileRoot.indexOf('/node_modules/') !== -1 ||
+ request.descriptionFileRoot.indexOf('\\node_modules\\') !== -1 ||
+ // Make sure this request was manual
+ !request.__innerRequest_request
+ ) {
+ return callback();
+ }
+ // Resolve the issuer from our appSrc and make sure it's one of our files
+ // Maybe an indexOf === 0 would be better?
+ const relative = path.relative(appSrc, request.context.issuer);
+ // If it's not in src/ or a subdirectory, not our request!
+ if (relative[0] === '.') {
+ return callback();
+ }
+ // Find path from src to the requested file
+ const requestRelative = path.relative(
+ appSrc,
+ path.resolve(
+ path.dirname(request.context.issuer),
+ request.__innerRequest_request
+ )
+ );
+ // Error if in a parent directory of src/
+ if (requestRelative[0] === '.') {
+ callback(
+ new Error(
+ `You attempted to import ${chalk.cyan(request.__innerRequest_request)} which falls outside of the project ${chalk.cyan('src/')} directory. ` +
+ `Relative imports outside of ${chalk.cyan('src/')} are not supported. ` +
+ `You can either move it inside ${chalk.cyan('src/')}, or add a symlink to it from project's ${chalk.cyan('node_modules/')}.`
+ ),
+ request
+ );
+ } else {
+ callback();
+ }
+ });
+ }
+}
+
+module.exports = ModuleScopePlugin;
diff --git a/packages/react-dev-utils/README.md b/packages/react-dev-utils/README.md
index 26d762c35..c63600b44 100644
--- a/packages/react-dev-utils/README.md
+++ b/packages/react-dev-utils/README.md
@@ -34,7 +34,7 @@ var publicUrl = '/my-custom-url';
module.exports = {
output: {
// ...
- publicPath: publicUrl + '/'
+ publicPath: publicUrl + '/'
},
// ...
plugins: [
@@ -56,6 +56,30 @@ module.exports = {
}
```
+
+#### `new ModuleScopePlugin(appSrc: string)`
+
+This Webpack plugin ensures that relative imports from app's source directory don't reach outside of it.
+
+```js
+var path = require('path');
+var ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
+
+
+module.exports = {
+ // ...
+ resolve: {
+ // ...
+ plugins: [
+ new ModuleScopePlugin(paths.appSrc),
+ // ...
+ ],
+ // ...
+ },
+ // ...
+}
+```
+
#### `new WatchMissingNodeModulesPlugin(nodeModulesPath: string)`
This Webpack plugin ensures `npm install ` forces a project rebuild.
@@ -110,6 +134,36 @@ clearConsole();
console.log('Just cleared the screen!');
```
+#### `eslintFormatter(results: Object): string`
+
+This is our custom ESLint formatter that integrates well with Create React App console output.
+You can use the default one instead if you prefer so.
+
+```js
+const eslintFormatter = require('react-dev-utils/eslintFormatter');
+
+// In your webpack config:
+// ...
+module: {
+ rules: [
+ {
+ test: /\.(js|jsx)$/,
+ include: paths.appSrc,
+ enforce: 'pre',
+ use: [
+ {
+ loader: 'eslint-loader',
+ options: {
+ // Pass the formatter:
+ formatter: eslintFormatter,
+ },
+ },
+ ],
+ }
+ ]
+}
+```
+
#### `FileSizeReporter`
##### `measureFileSizesBeforeBuild(buildFolder: string): Promise`
@@ -182,6 +236,10 @@ var getProcessForPort = require('react-dev-utils/getProcessForPort');
getProcessForPort(3000);
```
+#### `launchEditor(fileName: string, lineNumber: number): void`
+
+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.
+
#### `openBrowser(url: string): boolean`
Attempts to open the browser with a given URL.
@@ -198,30 +256,38 @@ if (openBrowser('http://localhost:3000')) {
}
```
-#### `prompt(message: string, isYesDefault: boolean): Promise`
+#### `printHostingInstructions(appPackage: Object, publicUrl: string, publicPath: string, buildFolder: string, useYarn: boolean): void`
-This function displays a console prompt to the user.
+Prints hosting instructions after the project is built.
-By convention, "no" should be the conservative choice.
-If you mistype the answer, we'll always take it as a "no".
-You can control the behavior on `` with `isYesDefault`.
+Pass your parsed `package.json` object as `appPackage`, your the URL where you plan to host the app as `publicUrl`, `output.publicPath` from your Webpack configuration as `publicPath`, the `buildFolder` name, and whether to `useYarn` in instructions.
```js
-var prompt = require('react-dev-utils/prompt');
-
-prompt(
- 'Are you sure you want to eat all the candy?',
- /* isYesDefault */ false
-).then(shouldEat => {
- if (shouldEat) {
- console.log('You have successfully consumed all the candy.');
- } else {
- console.log('Phew, candy is still available!');
- }
-});
+const appPackage = require(paths.appPackageJson);
+const publicUrl = paths.publicUrl;
+const publicPath = config.output.publicPath;
+printHostingInstructions(appPackage, publicUrl, publicPath, 'build', true);
```
-#### `webpackHotDevClient.js`
+#### `WebpackDevServerUtils`
+
+##### `choosePort(host: string, defaultPort: number): Promise`
+
+Returns a Promise resolving to either `defaultPort` or next available port if the user confirms it is okay to do. If the port is taken and the user has refused to use another port, or if the terminal is not interactive and can’t present user with the choice, resolves to `null`.
+
+##### `createCompiler(webpack: Function, config: Object, appName: string, urls: Object, useYarn: boolean): WebpackCompiler`
+
+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`
+
+Creates a WebpackDevServer `proxy` configuration object from the `proxy` setting in `package.json`.
+
+##### `prepareUrls(protocol: string, host: string, port: number): Object`
+
+Returns an object with local and remote URLs for the development server. Pass this object to `createCompiler()` described above.
+
+#### `webpackHotDevClient`
This is an alternative client for [WebpackDevServer](https://github.com/webpack/webpack-dev-server) that shows a syntax error overlay.
diff --git a/packages/react-dev-utils/WebpackDevServerUtils.js b/packages/react-dev-utils/WebpackDevServerUtils.js
new file mode 100644
index 000000000..4fcd71908
--- /dev/null
+++ b/packages/react-dev-utils/WebpackDevServerUtils.js
@@ -0,0 +1,395 @@
+/**
+ * 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 address = require('address');
+const url = require('url');
+const chalk = require('chalk');
+const detect = require('@timer/detect-port');
+const inquirer = require('inquirer');
+const clearConsole = require('./clearConsole');
+const formatWebpackMessages = require('./formatWebpackMessages');
+const getProcessForPort = require('./getProcessForPort');
+
+const isInteractive = process.stdout.isTTY;
+let handleCompile;
+
+// You can safely remove this after ejecting.
+// We only use this block for testing of Create React App itself:
+const isSmokeTest = process.argv.some(arg => arg.indexOf('--smoke-test') > -1);
+if (isSmokeTest) {
+ handleCompile = (err, stats) => {
+ if (err || stats.hasErrors() || stats.hasWarnings()) {
+ process.exit(1);
+ } else {
+ process.exit(0);
+ }
+ };
+}
+
+function prepareUrls(protocol, host, port) {
+ const formatUrl = hostname => url.format({
+ protocol,
+ hostname,
+ port,
+ pathname: '/',
+ });
+ const prettyPrintUrl = hostname => url.format({
+ protocol,
+ hostname,
+ port: chalk.bold(port),
+ pathname: '/',
+ });
+
+ const isUnspecifiedHost = host === '0.0.0.0' || host === '::';
+ let prettyHost, lanUrlForConfig, lanUrlForTerminal;
+ if (isUnspecifiedHost) {
+ prettyHost = 'localhost';
+ try {
+ lanUrlForConfig = address.ip();
+ if (lanUrlForConfig) {
+ lanUrlForTerminal = prettyPrintUrl(lanUrlForConfig);
+ }
+ } catch (_e) {
+ // ignored
+ }
+ } else {
+ prettyHost = host;
+ }
+ const localUrlForTerminal = prettyPrintUrl(prettyHost);
+ const localUrlForBrowser = formatUrl(prettyHost);
+ return {
+ lanUrlForConfig,
+ lanUrlForTerminal,
+ localUrlForTerminal,
+ localUrlForBrowser,
+ };
+}
+
+function printInstructions(appName, urls, useYarn) {
+ console.log();
+ console.log(`You can now view ${chalk.bold(appName)} in the browser.`);
+ console.log();
+
+ if (urls.lanUrlForTerminal) {
+ console.log(
+ ` ${chalk.bold('Local:')} ${urls.localUrlForTerminal}`
+ );
+ console.log(
+ ` ${chalk.bold('On Your Network:')} ${urls.lanUrlForTerminal}`
+ );
+ } else {
+ console.log(` ${urls.localUrlForTerminal}`);
+ }
+
+ console.log();
+ console.log('Note that the development build is not optimized.');
+ console.log(
+ `To create a production build, use ` +
+ `${chalk.cyan(`${useYarn ? 'yarn' : 'npm'} run build`)}.`
+ );
+ console.log();
+}
+
+function createCompiler(webpack, config, appName, urls, useYarn) {
+ // "Compiler" is a low-level interface to Webpack.
+ // It lets us listen to some events and provide our own custom messages.
+ let compiler;
+ try {
+ compiler = webpack(config, handleCompile);
+ } catch (err) {
+ console.log(chalk.red('Failed to compile.'));
+ console.log();
+ console.log(err.message || err);
+ console.log();
+ process.exit(1);
+ }
+
+ // "invalid" event fires when you have changed a file, and Webpack is
+ // recompiling a bundle. WebpackDevServer takes care to pause serving the
+ // bundle, so if you refresh, it'll wait instead of serving the old one.
+ // "invalid" is short for "bundle invalidated", it doesn't imply any errors.
+ compiler.plugin('invalid', () => {
+ if (isInteractive) {
+ clearConsole();
+ }
+ console.log('Compiling...');
+ });
+
+ let isFirstCompile = true;
+
+ // "done" event fires when Webpack has finished recompiling the bundle.
+ // Whether or not you have warnings or errors, you will get this event.
+ compiler.plugin('done', stats => {
+ if (isInteractive) {
+ clearConsole();
+ }
+
+ // We have switched off the default Webpack output in WebpackDevServer
+ // options so we are going to "massage" the warnings and errors and present
+ // them in a readable focused way.
+ const messages = formatWebpackMessages(stats.toJson({}, true));
+ const isSuccessful = !messages.errors.length && !messages.warnings.length;
+ if (isSuccessful) {
+ console.log(chalk.green('Compiled successfully!'));
+ }
+ if (isSuccessful && (isInteractive || isFirstCompile)) {
+ printInstructions(appName, urls, useYarn);
+ }
+ isFirstCompile = false;
+
+ // If errors exist, only show errors.
+ if (messages.errors.length) {
+ console.log(chalk.red('Failed to compile.\n'));
+ console.log(messages.errors.join('\n\n'));
+ return;
+ }
+
+ // Show warnings if no errors were found.
+ if (messages.warnings.length) {
+ console.log(chalk.yellow('Compiled with warnings.\n'));
+ console.log(messages.warnings.join('\n\n'));
+
+ // Teach some ESLint tricks.
+ console.log(
+ '\nSearch for the ' +
+ chalk.underline(chalk.yellow('keywords')) +
+ ' to learn more about each warning.'
+ );
+ console.log(
+ 'To ignore, add ' +
+ chalk.cyan('// eslint-disable-next-line') +
+ ' to the line before.\n'
+ );
+ }
+ });
+ return compiler;
+}
+
+function resolveLoopback(proxy) {
+ const o = url.parse(proxy);
+ o.host = undefined;
+ if (o.hostname !== 'localhost') {
+ return proxy;
+ }
+ try {
+ o.hostname = address.ipv6() ? '::1' : '127.0.0.1';
+ } catch (_ignored) {
+ o.hostname = '127.0.0.1';
+ }
+ return url.format(o);
+}
+
+// We need to provide a custom onError function for httpProxyMiddleware.
+// It allows us to log custom error messages on the console.
+function onProxyError(proxy) {
+ return (err, req, res) => {
+ const host = req.headers && req.headers.host;
+ console.log(
+ chalk.red('Proxy error:') +
+ ' Could not proxy request ' +
+ chalk.cyan(req.url) +
+ ' from ' +
+ chalk.cyan(host) +
+ ' to ' +
+ chalk.cyan(proxy) +
+ '.'
+ );
+ console.log(
+ 'See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (' +
+ chalk.cyan(err.code) +
+ ').'
+ );
+ console.log();
+
+ // And immediately send the proper error response to the client.
+ // Otherwise, the request will eventually timeout with ERR_EMPTY_RESPONSE on the client side.
+ if (res.writeHead && !res.headersSent) {
+ res.writeHead(500);
+ }
+ res.end(
+ 'Proxy error: Could not proxy request ' +
+ req.url +
+ ' from ' +
+ host +
+ ' to ' +
+ proxy +
+ ' (' +
+ err.code +
+ ').'
+ );
+ };
+}
+
+function prepareProxy(proxy) {
+ // `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
+ if (!proxy) {
+ return undefined;
+ }
+ if (typeof proxy !== 'object' && typeof proxy !== 'string') {
+ console.log(
+ chalk.red(
+ 'When specified, "proxy" in package.json must be a string or an object.'
+ )
+ );
+ console.log(
+ chalk.red('Instead, the type of "proxy" was "' + typeof proxy + '".')
+ );
+ console.log(
+ chalk.red(
+ 'Either remove "proxy" from package.json, or make it an object.'
+ )
+ );
+ 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\/)).*$/;
+
+ // Support proxy as a string for those who are using the simple proxy option
+ if (typeof proxy === 'string') {
+ if (!/^http(s)?:\/\//.test(proxy)) {
+ console.log(
+ chalk.red(
+ 'When "proxy" is specified in package.json it must start with either http:// or https://'
+ )
+ );
+ process.exit(1);
+ }
+
+ let target;
+ if (process.platform === 'win32') {
+ target = resolveLoopback(proxy);
+ } else {
+ target = proxy;
+ }
+ return [
+ {
+ target,
+ logLevel: 'silent',
+ // For single page apps, we generally want to fallback to /index.html.
+ // However we also want to respect `proxy` for API calls.
+ // So if `proxy` is specified as a string, we need to decide which fallback to use.
+ // We use a heuristic: if request `accept`s text/html, we pick /index.html.
+ // Modern browsers include text/html into `accept` header when navigating.
+ // 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) &&
+ req.headers.accept &&
+ req.headers.accept.indexOf('text/html') === -1;
+ },
+ onProxyReq: proxyReq => {
+ // Browers may send Origin headers even with same-origin
+ // requests. To prevent CORS issues, we have to change
+ // the Origin to match the target URL.
+ if (proxyReq.getHeader('origin')) {
+ proxyReq.setHeader('origin', target);
+ }
+ },
+ onError: onProxyError(target),
+ secure: false,
+ changeOrigin: true,
+ ws: true,
+ xfwd: true,
+ },
+ ];
+ }
+
+ // Otherwise, proxy is an object so create an array of proxies to pass to webpackDevServer
+ return Object.keys(proxy).map(function(context) {
+ if (!proxy[context].hasOwnProperty('target')) {
+ console.log(
+ chalk.red(
+ 'When `proxy` in package.json is as an object, each `context` object must have a ' +
+ '`target` property specified as a url string'
+ )
+ );
+ process.exit(1);
+ }
+ let target;
+ if (process.platform === 'win32') {
+ target = resolveLoopback(proxy[context].target);
+ } else {
+ target = proxy[context].target;
+ }
+ return Object.assign({}, proxy[context], {
+ context: function(pathname) {
+ return mayProxy.test(pathname) && pathname.match(context);
+ },
+ onProxyReq: proxyReq => {
+ // Browers may send Origin headers even with same-origin
+ // requests. To prevent CORS issues, we have to change
+ // the Origin to match the target URL.
+ if (proxyReq.getHeader('origin')) {
+ proxyReq.setHeader('origin', target);
+ }
+ },
+ target,
+ onError: onProxyError(target),
+ });
+ });
+}
+
+function choosePort(host, defaultPort) {
+ return detect(defaultPort, host).then(
+ port => new Promise(resolve => {
+ if (port === defaultPort) {
+ return resolve(port);
+ }
+ if (isInteractive) {
+ clearConsole();
+ const existingProcess = getProcessForPort(defaultPort);
+ const question = {
+ type: 'confirm',
+ name: 'shouldChangePort',
+ message: chalk.yellow(
+ `Something is already running on port ${defaultPort}.` +
+ `${existingProcess ? ` Probably:\n ${existingProcess}` : ''}`
+ ) + '\n\nWould you like to run the app on another port instead?',
+ default: true,
+ };
+ inquirer.prompt(question).then(answer => {
+ if (answer.shouldChangePort) {
+ resolve(port);
+ } else {
+ resolve(null);
+ }
+ });
+ } else {
+ console.log(
+ chalk.red(`Something is already running on port ${defaultPort}.`)
+ );
+ resolve(null);
+ }
+ }),
+ err => {
+ throw new Error(
+ chalk.red(`Could not find an open port at ${chalk.bold(host)}.`) +
+ '\n' +
+ ('Network error message: ' + err.message || err) +
+ '\n'
+ );
+ }
+ );
+}
+
+module.exports = {
+ choosePort,
+ createCompiler,
+ prepareProxy,
+ prepareUrls,
+};
diff --git a/packages/react-dev-utils/ansiHTML.js b/packages/react-dev-utils/ansiHTML.js
new file mode 100644
index 000000000..5d3e79203
--- /dev/null
+++ b/packages/react-dev-utils/ansiHTML.js
@@ -0,0 +1,104 @@
+/**
+ * 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 Anser = require('anser');
+
+// Color scheme inspired by https://chriskempson.github.io/base16/css/base16-github.css
+// var base00 = 'ffffff'; // Default Background
+var base01 = 'f5f5f5'; // Lighter Background (Used for status bars)
+// var base02 = 'c8c8fa'; // Selection Background
+var base03 = '6e6e6e'; // Comments, Invisibles, Line Highlighting
+// var base04 = 'e8e8e8'; // Dark Foreground (Used for status bars)
+var base05 = '333333'; // Default Foreground, Caret, Delimiters, Operators
+// var base06 = 'ffffff'; // Light Foreground (Not often used)
+// var base07 = 'ffffff'; // Light Background (Not often used)
+var base08 = '881280'; // Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted
+// var base09 = '0086b3'; // Integers, Boolean, Constants, XML Attributes, Markup Link Url
+// var base0A = '795da3'; // Classes, Markup Bold, Search Text Background
+var base0B = '1155cc'; // Strings, Inherited Class, Markup Code, Diff Inserted
+var base0C = '994500'; // Support, Regular Expressions, Escape Characters, Markup Quotes
+// var base0D = '795da3'; // Functions, Methods, Attribute IDs, Headings
+var base0E = 'c80000'; // Keywords, Storage, Selector, Markup Italic, Diff Changed
+// var base0F = '333333'; // Deprecated, Opening/Closing Embedded Language Tags e.g.
+
+// Map ANSI colors from what babel-code-frame uses to base16-github
+// See: https://github.com/babel/babel/blob/e86f62b304d280d0bab52c38d61842b853848ba6/packages/babel-code-frame/src/index.js#L9-L22
+var colors = {
+ reset: [base05, 'transparent'],
+ black: base05,
+ red: base08 /* marker, bg-invalid */,
+ green: base0B /* string */,
+ yellow: base08 /* capitalized, jsx_tag, punctuator */,
+ blue: base0C,
+ magenta: base0C /* regex */,
+ cyan: base0E /* keyword */,
+ gray: base03 /* comment, gutter */,
+ lightgrey: base01,
+ darkgrey: base03,
+};
+
+var anserMap = {
+ 'ansi-bright-black': 'black',
+ 'ansi-bright-yellow': 'yellow',
+ 'ansi-yellow': 'yellow',
+ 'ansi-bright-green': 'green',
+ 'ansi-green': 'green',
+ 'ansi-bright-cyan': 'cyan',
+ 'ansi-cyan': 'cyan',
+ 'ansi-bright-red': 'red',
+ 'ansi-red': 'red',
+ 'ansi-bright-magenta': 'magenta',
+ 'ansi-magenta': 'magenta',
+ 'ansi-white': 'darkgrey',
+};
+
+function ansiHTML(txt) {
+ var arr = new Anser().ansiToJson(txt, {
+ use_classes: true,
+ });
+
+ var result = '';
+ var open = false;
+ for (var index = 0; index < arr.length; ++index) {
+ var c = arr[index];
+ var content = c.content, fg = c.fg;
+
+ var contentParts = content.split('\n');
+ for (var _index = 0; _index < contentParts.length; ++_index) {
+ if (!open) {
+ result += '';
+ open = true;
+ }
+ var part = contentParts[_index].replace('\r', '');
+ var color = colors[anserMap[fg]];
+ if (color != null) {
+ result += '' + part + '';
+ } else {
+ if (fg != null) {
+ console.log('Missing color mapping: ', fg);
+ }
+ result += '' + part + '';
+ }
+ if (_index < contentParts.length - 1) {
+ result += '';
+ open = false;
+ result += ' ';
+ }
+ }
+ }
+ if (open) {
+ result += '';
+ open = false;
+ }
+ return result;
+}
+
+module.exports = ansiHTML;
diff --git a/packages/react-dev-utils/clearConsole.js b/packages/react-dev-utils/clearConsole.js
index 743362847..05ab28c44 100644
--- a/packages/react-dev-utils/clearConsole.js
+++ b/packages/react-dev-utils/clearConsole.js
@@ -10,7 +10,9 @@
'use strict';
function clearConsole() {
- process.stdout.write(process.platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H');
+ process.stdout.write(
+ process.platform === 'win32' ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H'
+ );
}
module.exports = clearConsole;
diff --git a/packages/react-dev-utils/eslintFormatter.js b/packages/react-dev-utils/eslintFormatter.js
new file mode 100644
index 000000000..7460e7604
--- /dev/null
+++ b/packages/react-dev-utils/eslintFormatter.js
@@ -0,0 +1,84 @@
+'use strict';
+
+const chalk = require('chalk');
+const table = require('text-table');
+
+function isError(message) {
+ if (message.fatal || message.severity === 2) {
+ return true;
+ }
+ return false;
+}
+
+function formatter(results) {
+ let output = '\n';
+ let hasErrors = false;
+ let reportContainsErrorRuleIDs = false;
+
+ results.forEach(result => {
+ let messages = result.messages;
+ if (messages.length === 0) {
+ return;
+ }
+
+ messages = messages.map(message => {
+ let messageType;
+ if (isError(message)) {
+ messageType = 'error';
+ hasErrors = true;
+ if (message.ruleId) {
+ reportContainsErrorRuleIDs = true;
+ }
+ } else {
+ messageType = 'warn';
+ }
+
+ let line = message.line || 0;
+ let position = chalk.bold('Line ' + line + ':');
+ return [
+ '',
+ position,
+ messageType,
+ message.message.replace(/\.$/, ''),
+ chalk.underline(message.ruleId || ''),
+ ];
+ });
+
+ // if there are error messages, we want to show only errors
+ if (hasErrors) {
+ messages = messages.filter(m => m[2] === 'error');
+ }
+
+ // add color to rule keywords
+ messages.forEach(m => {
+ m[4] = m[2] === 'error' ? chalk.red(m[4]) : chalk.yellow(m[4]);
+ m.splice(2, 1);
+ });
+
+ let outputTable = table(messages, {
+ align: ['l', 'l', 'l'],
+ stringLength(str) {
+ return chalk.stripColor(str).length;
+ },
+ });
+
+ output += `${outputTable}\n\n`;
+ });
+
+ if (reportContainsErrorRuleIDs) {
+ // Unlike with warnings, we have to do it here.
+ // We have similar code in react-scripts for warnings,
+ // but warnings can appear in multiple files so we only
+ // print it once at the end. For errors, however, we print
+ // it here because we always show at most one error, and
+ // we can only be sure it's an ESLint error before exiting
+ // this function.
+ output += 'Search for the ' +
+ chalk.underline(chalk.red('keywords')) +
+ ' to learn more about each error.';
+ }
+
+ return output;
+}
+
+module.exports = formatter;
diff --git a/packages/react-dev-utils/formatWebpackMessages.js b/packages/react-dev-utils/formatWebpackMessages.js
index bfee3ec5b..5dfd099c6 100644
--- a/packages/react-dev-utils/formatWebpackMessages.js
+++ b/packages/react-dev-utils/formatWebpackMessages.js
@@ -16,6 +16,7 @@
// This is quite hacky and hopefully won't be needed when Webpack fixes this.
// https://github.com/webpack/webpack/issues/2878
+var chalk = require('chalk');
var friendlySyntaxErrorLabel = 'Syntax error:';
function isLikelyASyntaxError(message) {
@@ -23,9 +24,15 @@ function isLikelyASyntaxError(message) {
}
// Cleans up webpack error messages.
-function formatMessage(message) {
+// eslint-disable-next-line no-unused-vars
+function formatMessage(message, isError) {
var lines = message.split('\n');
+ if (lines.length > 2 && lines[1] === '') {
+ // Remove extra newline.
+ lines.splice(1, 1);
+ }
+
// Remove webpack-specific loader notation from filename.
// Before:
// ./~/css-loader!./~/postcss-loader!./src/App.css
@@ -35,6 +42,15 @@ function formatMessage(message) {
lines[0] = lines[0].substr(lines[0].lastIndexOf('!') + 1);
}
+ lines = lines.filter(function(line) {
+ // Webpack adds a list of entry points to warning messages:
+ // @ ./src/index.js
+ // @ multi react-scripts/~/react-dev-utils/webpackHotDevClient.js ...
+ // It is misleading (and unrelated to the warnings) so we clean it up.
+ // It is only useful for syntax errors but we have beautiful frames for them.
+ return line.indexOf(' @ ') !== 0;
+ });
+
// line #0 is filename
// line #1 is the main error message
if (!lines[0] || !lines[1]) {
@@ -46,61 +62,34 @@ function formatMessage(message) {
lines = [
lines[0],
// Clean up message because "Module not found: " is descriptive enough.
- lines[1].replace(
- 'Cannot resolve \'file\' or \'directory\' ', ''
- ).replace(
- 'Cannot resolve module ', ''
- ).replace(
- 'Error: ', ''
- ),
- // Skip all irrelevant lines.
- // (For some reason they only appear on the client in browser.)
- '',
- lines[lines.length - 1] // error location is the last line
- ]
+ lines[1]
+ .replace("Cannot resolve 'file' or 'directory' ", '')
+ .replace('Cannot resolve module ', '')
+ .replace('Error: ', '')
+ .replace('[CaseSensitivePathsPlugin] ', ''),
+ ];
}
// Cleans up syntax error messages.
if (lines[1].indexOf('Module build failed: ') === 0) {
- // For some reason, on the client messages appear duplicated:
- // https://github.com/webpack/webpack/issues/3008
- // This won't happen in Node but since we share this helpers,
- // we will dedupe them right here. We will ignore all lines
- // after the original error message text is repeated the second time.
- var errorText = lines[1].substr('Module build failed: '.length);
- var cleanedLines = [];
- var hasReachedDuplicateMessage = false;
- // Gather lines until we reach the beginning of duplicate message.
- lines.forEach(function(line, index) {
- if (
- // First time it occurs is fine.
- index !== 1 &&
- // line.endsWith(errorText)
- line.length >= errorText.length &&
- line.indexOf(errorText) === line.length - errorText.length
- ) {
- // We see the same error message for the second time!
- // Filter out repeated error message and everything after it.
- hasReachedDuplicateMessage = true;
- }
- if (
- !hasReachedDuplicateMessage ||
- // Print last line anyway because it contains the source location
- index === lines.length - 1
- ) {
- // This line is OK to appear in the output.
- cleanedLines.push(line);
- }
- });
- // We are clean now!
- lines = cleanedLines;
- // Finally, brush up the error message a little.
lines[1] = lines[1].replace(
'Module build failed: SyntaxError:',
friendlySyntaxErrorLabel
);
}
+ // Clean up export errors.
+ // TODO: we should really send a PR to Webpack for this.
+ var exportError = /\s*(.+?)\s*(")?export '(.+?)' was not found in '(.+?)'/;
+ if (lines[1].match(exportError)) {
+ lines[1] = lines[1].replace(
+ exportError,
+ "$1 '$4' does not contain an export named '$3'."
+ );
+ }
+
+ lines[0] = chalk.inverse(lines[0]);
+
// Reassemble the message.
message = lines.join('\n');
// Internal stacks are generally useless so we strip them... with the
@@ -108,22 +97,23 @@ function formatMessage(message) {
// from user code generated by WebPack. For more information see
// https://github.com/facebookincubator/create-react-app/pull/1050
message = message.replace(
- /^\s*at\s((?!webpack:).)*:\d+:\d+[\s\)]*(\n|$)/gm, ''
+ /^\s*at\s((?!webpack:).)*:\d+:\d+[\s\)]*(\n|$)/gm,
+ ''
); // at ... ...:x:y
- return message;
+ return message.trim();
}
function formatWebpackMessages(json) {
var formattedErrors = json.errors.map(function(message) {
- return 'Error in ' + formatMessage(message)
+ return formatMessage(message, true);
});
var formattedWarnings = json.warnings.map(function(message) {
- return 'Warning in ' + formatMessage(message)
+ return formatMessage(message, false);
});
var result = {
errors: formattedErrors,
- warnings: formattedWarnings
+ warnings: formattedWarnings,
};
if (result.errors.some(isLikelyASyntaxError)) {
// If there are any syntax errors, show just them.
@@ -131,6 +121,11 @@ function formatWebpackMessages(json) {
// preceding a much more useful Babel syntax error.
result.errors = result.errors.filter(isLikelyASyntaxError);
}
+ // Only keep the first error. Others are often indicative
+ // of the same problem, but confuse the reader with noise.
+ if (result.errors.length > 1) {
+ result.errors.length = 1;
+ }
return result;
}
diff --git a/packages/react-dev-utils/getProcessForPort.js b/packages/react-dev-utils/getProcessForPort.js
index 24b89823e..428dc62cf 100644
--- a/packages/react-dev-utils/getProcessForPort.js
+++ b/packages/react-dev-utils/getProcessForPort.js
@@ -18,8 +18,8 @@ var execOptions = {
stdio: [
'pipe', // stdin (default)
'pipe', // stdout (default)
- 'ignore' //stderr
- ]
+ 'ignore', //stderr
+ ],
};
function isProcessAReactApp(processCommand) {
@@ -27,7 +27,9 @@ function isProcessAReactApp(processCommand) {
}
function getProcessIdOnPort(port) {
- return execSync('lsof -i:' + port + ' -P -t -sTCP:LISTEN', execOptions).trim();
+ return execSync('lsof -i:' + port + ' -P -t -sTCP:LISTEN', execOptions)
+ .split('\n')[0]
+ .trim();
}
function getPackageNameInDirectory(directory) {
@@ -35,26 +37,30 @@ function getPackageNameInDirectory(directory) {
try {
return require(packagePath).name;
- } catch(e) {
+ } catch (e) {
return null;
}
-
}
function getProcessCommand(processId, processDirectory) {
- var command = execSync('ps -o command -p ' + processId + ' | sed -n 2p', execOptions);
+ var command = execSync(
+ 'ps -o command -p ' + processId + ' | sed -n 2p',
+ execOptions
+ );
if (isProcessAReactApp(command)) {
const packageName = getPackageNameInDirectory(processDirectory);
- return (packageName) ? packageName + '\n' : command;
+ return packageName ? packageName + '\n' : command;
} else {
return command;
}
-
}
function getDirectoryOfProcessById(processId) {
- return execSync('lsof -p '+ processId + ' | awk \'$4=="cwd" {print $9}\'', execOptions).trim();
+ return execSync(
+ 'lsof -p ' + processId + ' | awk \'$4=="cwd" {print $9}\'',
+ execOptions
+ ).trim();
}
function getProcessForPort(port) {
@@ -63,10 +69,9 @@ function getProcessForPort(port) {
var directory = getDirectoryOfProcessById(processId);
var command = getProcessCommand(processId, directory);
return chalk.cyan(command) + chalk.blue(' in ') + chalk.cyan(directory);
- } catch(e) {
+ } catch (e) {
return null;
}
}
module.exports = getProcessForPort;
-
diff --git a/packages/react-dev-utils/launchEditor.js b/packages/react-dev-utils/launchEditor.js
new file mode 100644
index 000000000..1e9d98226
--- /dev/null
+++ b/packages/react-dev-utils/launchEditor.js
@@ -0,0 +1,197 @@
+/**
+ * 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 fs = require('fs');
+var path = require('path');
+var child_process = require('child_process');
+var chalk = require('chalk');
+var shellQuote = require('shell-quote');
+
+function isTerminalEditor(editor) {
+ switch (editor) {
+ case 'vim':
+ case 'emacs':
+ case 'nano':
+ return true;
+ }
+ return false;
+}
+
+// Map from full process name to binary that starts the process
+// We can't just re-use full process name, because it will spawn a new instance
+// of the app every time
+var COMMON_EDITORS = {
+ '/Applications/Atom.app/Contents/MacOS/Atom': 'atom',
+ '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta': '/Applications/Atom Beta.app/Contents/MacOS/Atom Beta',
+ '/Applications/Sublime Text.app/Contents/MacOS/Sublime Text': '/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl',
+ '/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2': '/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',
+ '/Applications/Visual Studio Code.app/Contents/MacOS/Electron': 'code',
+};
+
+function addWorkspaceToArgumentsIfExists(args, workspace) {
+ if (workspace) {
+ args.unshift(workspace);
+ }
+ return args;
+}
+
+function getArgumentsForLineNumber(editor, fileName, lineNumber, workspace) {
+ switch (path.basename(editor)) {
+ case 'vim':
+ case 'mvim':
+ return [fileName, '+' + lineNumber];
+ case 'atom':
+ case 'Atom':
+ case 'Atom Beta':
+ case 'subl':
+ case 'sublime':
+ case 'wstorm':
+ case 'appcode':
+ case 'charm':
+ case 'idea':
+ return [fileName + ':' + lineNumber];
+ case 'joe':
+ case 'emacs':
+ case 'emacsclient':
+ return ['+' + lineNumber, fileName];
+ case 'rmate':
+ case 'mate':
+ case 'mine':
+ return ['--line', lineNumber, fileName];
+ case 'code':
+ return addWorkspaceToArgumentsIfExists(
+ ['-g', fileName + ':' + lineNumber],
+ workspace
+ );
+ }
+
+ // For all others, drop the lineNumber until we have
+ // a mapping above, since providing the lineNumber incorrectly
+ // can result in errors or confusing behavior.
+ return [fileName];
+}
+
+function guessEditor() {
+ // Explicit config always wins
+ if (process.env.REACT_EDITOR) {
+ return shellQuote.parse(process.env.REACT_EDITOR);
+ }
+
+ // Using `ps x` on OSX we can find out which editor is currently running.
+ // Potentially we could use similar technique for Windows and Linux
+ if (process.platform === 'darwin') {
+ try {
+ var output = child_process.execSync('ps x').toString();
+ var processNames = Object.keys(COMMON_EDITORS);
+ for (var i = 0; i < processNames.length; i++) {
+ var processName = processNames[i];
+ if (output.indexOf(processName) !== -1) {
+ return [COMMON_EDITORS[processName]];
+ }
+ }
+ } catch (error) {
+ // Ignore...
+ }
+ }
+
+ // Last resort, use old skool env vars
+ if (process.env.VISUAL) {
+ return [process.env.VISUAL];
+ } else if (process.env.EDITOR) {
+ return [process.env.EDITOR];
+ }
+
+ return [null];
+}
+
+function printInstructions(fileName, errorMessage) {
+ console.log();
+ console.log(
+ chalk.red('Could not open ' + path.basename(fileName) + ' in the editor.')
+ );
+ if (errorMessage) {
+ if (errorMessage[errorMessage.length - 1] !== '.') {
+ errorMessage += '.';
+ }
+ console.log(
+ chalk.red('The editor process exited with an error: ' + errorMessage)
+ );
+ }
+ console.log();
+ console.log(
+ 'To set up the editor integration, add something like ' +
+ chalk.cyan('REACT_EDITOR=atom') +
+ ' to the ' +
+ chalk.green('.env.local') +
+ ' file in your project folder ' +
+ 'and restart the development server.'
+ );
+ console.log();
+}
+
+var _childProcess = null;
+function launchEditor(fileName, lineNumber) {
+ if (!fs.existsSync(fileName)) {
+ return;
+ }
+
+ // Sanitize lineNumber to prevent malicious use on win32
+ // via: https://github.com/nodejs/node/blob/c3bb4b1aa5e907d489619fb43d233c3336bfc03d/lib/child_process.js#L333
+ if (lineNumber && isNaN(lineNumber)) {
+ return;
+ }
+
+ let [editor, ...args] = guessEditor();
+ if (!editor) {
+ printInstructions(fileName, null);
+ return;
+ }
+
+ var workspace = null;
+ if (lineNumber) {
+ args = args.concat(
+ getArgumentsForLineNumber(editor, fileName, lineNumber, workspace)
+ );
+ } else {
+ args.push(fileName);
+ }
+
+ if (_childProcess && isTerminalEditor(editor)) {
+ // There's an existing editor process already and it's attached
+ // to the terminal, so go kill it. Otherwise two separate editor
+ // instances attach to the stdin/stdout which gets confusing.
+ _childProcess.kill('SIGKILL');
+ }
+
+ if (process.platform === 'win32') {
+ // On Windows, launch the editor in a shell because spawn can only
+ // launch .exe files.
+ _childProcess = child_process.spawn(
+ 'cmd.exe',
+ ['/C', editor].concat(args),
+ { stdio: 'inherit' }
+ );
+ } else {
+ _childProcess = child_process.spawn(editor, args, { stdio: 'inherit' });
+ }
+ _childProcess.on('exit', function(errorCode) {
+ _childProcess = null;
+
+ if (errorCode) {
+ printInstructions(fileName, '(code ' + errorCode + ')');
+ }
+ });
+
+ _childProcess.on('error', function(error) {
+ printInstructions(fileName, error.message);
+ });
+}
+
+module.exports = launchEditor;
diff --git a/packages/react-dev-utils/openBrowser.js b/packages/react-dev-utils/openBrowser.js
index 912c1819b..9ded70781 100644
--- a/packages/react-dev-utils/openBrowser.js
+++ b/packages/react-dev-utils/openBrowser.js
@@ -9,43 +9,77 @@
'use strict';
+var chalk = require('chalk');
var execSync = require('child_process').execSync;
+var spawn = require('cross-spawn');
var opn = require('opn');
// https://github.com/sindresorhus/opn#app
var OSX_CHROME = 'google chrome';
-function openBrowser(url) {
+const Actions = Object.freeze({
+ NONE: 0,
+ BROWSER: 1,
+ SCRIPT: 2,
+});
+
+function getBrowserEnv() {
// Attempt to honor this environment variable.
// It is specific to the operating system.
// See https://github.com/sindresorhus/opn#app for documentation.
- var browser = process.env.BROWSER;
-
- // Special case: BROWSER="none" will prevent opening completely.
- if (browser === 'none') {
- return false;
+ const value = process.env.BROWSER;
+ let action;
+ if (!value) {
+ // Default.
+ action = Actions.BROWSER;
+ } else if (value.toLowerCase().endsWith('.js')) {
+ action = Actions.SCRIPT;
+ } else if (value.toLowerCase() === 'none') {
+ action = Actions.NONE;
+ } else {
+ action = Actions.BROWSER;
}
+ return { action, value };
+}
+
+function executeNodeScript(scriptPath, url) {
+ const extraArgs = process.argv.slice(2);
+ const child = spawn('node', [scriptPath, ...extraArgs, url], {
+ stdio: 'inherit',
+ });
+ child.on('close', code => {
+ if (code !== 0) {
+ console.log();
+ console.log(
+ chalk.red(
+ 'The script specified as BROWSER environment variable failed.'
+ )
+ );
+ console.log(chalk.cyan(scriptPath) + ' exited with code ' + code + '.');
+ console.log();
+ return;
+ }
+ });
+ return true;
+}
+function startBrowserProcess(browser, url) {
// If we're on OS X, the user hasn't specifically
// requested a different browser, we can try opening
// Chrome with AppleScript. This lets us reuse an
// existing tab when possible instead of creating a new one.
- const shouldTryOpenChromeWithAppleScript = (
- process.platform === 'darwin' && (
- typeof browser !== 'string' ||
- browser === OSX_CHROME
- )
- );
+ const shouldTryOpenChromeWithAppleScript = process.platform === 'darwin' &&
+ (typeof browser !== 'string' || browser === OSX_CHROME);
if (shouldTryOpenChromeWithAppleScript) {
try {
// Try our best to reuse existing tab
// on OS X Google Chrome with AppleScript
execSync('ps cax | grep "Google Chrome"');
- execSync(
- 'osascript openChrome.applescript ' + url,
- {cwd: __dirname, stdio: 'ignore'}
- );
+ execSync('osascript openChrome.applescript "' + encodeURI(url) + '"', {
+ cwd: __dirname,
+ stdio: 'ignore',
+ });
return true;
} catch (err) {
// Ignore errors.
@@ -59,11 +93,11 @@ function openBrowser(url) {
if (process.platform === 'darwin' && browser === 'open') {
browser = undefined;
}
-
+
// Fallback to opn
// (It will always open new tab)
try {
- var options = {app: browser};
+ var options = { app: browser };
opn(url, options).catch(() => {}); // Prevent `unhandledRejection` error.
return true;
} catch (err) {
@@ -71,4 +105,23 @@ function openBrowser(url) {
}
}
+/**
+ * Reads the BROWSER evironment variable and decides what to do with it. Returns
+ * true if it opened a browser or ran a node.js script, otherwise false.
+ */
+function openBrowser(url) {
+ const { action, value } = getBrowserEnv();
+ switch (action) {
+ case Actions.NONE:
+ // Special case: BROWSER="none" will prevent opening completely.
+ return false;
+ case Actions.SCRIPT:
+ return executeNodeScript(value, url);
+ case Actions.BROWSER:
+ return startBrowserProcess(value, url);
+ default:
+ throw new Error('Not implemented.');
+ }
+}
+
module.exports = openBrowser;
diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json
index 6110e61b6..f5e26edaf 100644
--- a/packages/react-dev-utils/package.json
+++ b/packages/react-dev-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "react-dev-utils",
- "version": "0.5.2",
+ "version": "1.0.0",
"description": "Webpack utilities used by Create React App",
"repository": "facebookincubator/create-react-app",
"license": "BSD-3-Clause",
@@ -8,31 +8,46 @@
"url": "https://github.com/facebookincubator/create-react-app/issues"
},
"engines": {
- "node": ">=4"
+ "node": ">=6"
},
"files": [
+ "ansiHTML.js",
"checkRequiredFiles.js",
"clearConsole.js",
+ "crashOverlay.js",
+ "eslintFormatter.js",
"FileSizeReporter.js",
"formatWebpackMessages.js",
"getProcessForPort.js",
"InterpolateHtmlPlugin.js",
+ "launchEditor.js",
+ "ModuleScopePlugin.js",
"openBrowser.js",
"openChrome.applescript",
- "prompt.js",
+ "printHostingInstructions.js",
"WatchMissingNodeModulesPlugin.js",
+ "WebpackDevServerUtils.js",
"webpackHotDevClient.js"
],
"dependencies": {
- "ansi-html": "0.0.5",
+ "@timer/detect-port": "1.1.3",
+ "address": "1.0.1",
+ "anser": "1.3.0",
+ "babel-code-frame": "6.22.0",
"chalk": "1.1.3",
+ "cross-spawn": "4.0.2",
"escape-string-regexp": "1.0.5",
"filesize": "3.3.0",
"gzip-size": "3.0.0",
- "html-entities": "1.2.0",
- "opn": "4.0.2",
- "recursive-readdir": "2.1.1",
- "sockjs-client": "1.0.1",
+ "html-entities": "1.2.1",
+ "inquirer": "3.0.6",
+ "opn": "5.0.0",
+ "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-dev-utils/printHostingInstructions.js b/packages/react-dev-utils/printHostingInstructions.js
new file mode 100644
index 000000000..4b31cbc44
--- /dev/null
+++ b/packages/react-dev-utils/printHostingInstructions.js
@@ -0,0 +1,114 @@
+/**
+ * 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');
+const url = require('url');
+
+function printHostingInstructions(
+ appPackage,
+ publicUrl,
+ publicPath,
+ buildFolder,
+ useYarn
+) {
+ const publicPathname = url.parse(publicPath).pathname;
+ if (publicUrl && publicUrl.indexOf('.github.io/') !== -1) {
+ // "homepage": "http://user.github.io/project"
+ console.log(
+ `The project was built assuming it is hosted at ${chalk.green(publicPathname)}.`
+ );
+ console.log(
+ `You can control this with the ${chalk.green('homepage')} field in your ${chalk.cyan('package.json')}.`
+ );
+ console.log();
+ console.log(`The ${chalk.cyan('build')} folder is ready to be deployed.`);
+ console.log(`To publish it at ${chalk.green(publicUrl)}, run:`);
+ // If script deploy has been added to package.json, skip the instructions
+ if (typeof appPackage.scripts.deploy === 'undefined') {
+ console.log();
+ if (useYarn) {
+ console.log(` ${chalk.cyan('yarn')} add --dev gh-pages`);
+ } else {
+ console.log(` ${chalk.cyan('npm')} install --save-dev gh-pages`);
+ }
+ console.log();
+ console.log(
+ `Add the following script in your ${chalk.cyan('package.json')}.`
+ );
+ console.log();
+ console.log(` ${chalk.dim('// ...')}`);
+ console.log(` ${chalk.yellow('"scripts"')}: {`);
+ console.log(` ${chalk.dim('// ...')}`);
+ console.log(
+ ` ${chalk.yellow('"predeploy"')}: ${chalk.yellow('"npm run build",')}`
+ );
+ console.log(
+ ` ${chalk.yellow('"deploy"')}: ${chalk.yellow('"gh-pages -d build"')}`
+ );
+ console.log(' }');
+ console.log();
+ console.log('Then run:');
+ }
+ console.log();
+ console.log(` ${chalk.cyan(useYarn ? 'yarn' : 'npm')} run deploy`);
+ console.log();
+ } else if (publicPath !== '/') {
+ // "homepage": "http://mywebsite.com/project"
+ console.log(
+ `The project was built assuming it is hosted at ${chalk.green(publicPath)}.`
+ );
+ console.log(
+ `You can control this with the ${chalk.green('homepage')} field in your ${chalk.cyan('package.json')}.`
+ );
+ console.log();
+ console.log(`The ${chalk.cyan('build')} folder is ready to be deployed.`);
+ console.log();
+ } else {
+ if (publicUrl) {
+ // "homepage": "http://mywebsite.com"
+ console.log(
+ `The project was built assuming it is hosted at ${chalk.green(publicUrl)}.`
+ );
+ console.log(
+ `You can control this with the ${chalk.green('homepage')} field in your ${chalk.cyan('package.json')}.`
+ );
+ console.log();
+ } else {
+ // no homepage
+ console.log(
+ 'The project was built assuming it is hosted at the server root.'
+ );
+ console.log(
+ `To override this, specify the ${chalk.green('homepage')} in your ${chalk.cyan('package.json')}.`
+ );
+ console.log('For example, add this to build it for GitHub Pages:');
+ console.log();
+ console.log(
+ ` ${chalk.green('"homepage"')} ${chalk.cyan(':')} ${chalk.green('"http://myname.github.io/myapp"')}${chalk.cyan(',')}`
+ );
+ console.log();
+ }
+ console.log(
+ `The ${chalk.cyan(buildFolder)} folder is ready to be deployed.`
+ );
+ console.log('You may serve it with a static server:');
+ console.log();
+ if (useYarn) {
+ console.log(` ${chalk.cyan('yarn')} global add serve`);
+ } else {
+ console.log(` ${chalk.cyan('npm')} install -g serve`);
+ }
+ console.log(` ${chalk.cyan('serve')} -s build`);
+ console.log();
+ }
+}
+
+module.exports = printHostingInstructions;
diff --git a/packages/react-dev-utils/prompt.js b/packages/react-dev-utils/prompt.js
deleted file mode 100644
index e6e19cf39..000000000
--- a/packages/react-dev-utils/prompt.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * 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 rl = require('readline');
-
-// Convention: "no" should be the conservative choice.
-// If you mistype the answer, we'll always take it as a "no".
-// You can control the behavior on with `isYesDefault`.
-function prompt(question, isYesDefault) {
- if (typeof isYesDefault !== 'boolean') {
- throw new Error('Provide explicit boolean isYesDefault as second argument.');
- }
- return new Promise(resolve => {
- var rlInterface = rl.createInterface({
- input: process.stdin,
- output: process.stdout,
- });
-
- var hint = isYesDefault === true ? '[Y/n]' : '[y/N]';
- var message = question + ' ' + hint + '\n';
-
- rlInterface.question(message, function(answer) {
- rlInterface.close();
-
- var useDefault = answer.trim().length === 0;
- if (useDefault) {
- return resolve(isYesDefault);
- }
-
- var isYes = answer.match(/^(yes|y)$/i);
- return resolve(isYes);
- });
- });
-}
-
-module.exports = prompt;
diff --git a/packages/react-dev-utils/webpackHotDevClient.js b/packages/react-dev-utils/webpackHotDevClient.js
index b5ed34669..647253673 100644
--- a/packages/react-dev-utils/webpackHotDevClient.js
+++ b/packages/react-dev-utils/webpackHotDevClient.js
@@ -18,29 +18,14 @@
// that looks similar to our console output. The error overlay is inspired by:
// https://github.com/glenjamin/webpack-hot-middleware
-var ansiHTML = require('ansi-html');
var SockJS = require('sockjs-client');
var stripAnsi = require('strip-ansi');
var url = require('url');
var formatWebpackMessages = require('./formatWebpackMessages');
var Entities = require('html-entities').AllHtmlEntities;
+var ansiHTML = require('./ansiHTML');
var entities = new Entities();
-// Color scheme inspired by https://github.com/glenjamin/webpack-hot-middleware
-var colors = {
- reset: ['transparent', 'transparent'],
- black: '181818',
- red: 'E36049',
- green: 'B3CB74',
- yellow: 'FFD080',
- blue: '7CAFC2',
- magenta: '7FACCA',
- cyan: 'C3C2EF',
- lightgrey: 'EBE7E3',
- darkgrey: '6D7891'
-};
-ansiHTML.setColors(colors);
-
function createOverlayIframe(onIframeLoad) {
var iframe = document.createElement('iframe');
iframe.id = 'react-dev-utils-webpack-hot-dev-client-overlay';
@@ -53,34 +38,59 @@ function createOverlayIframe(onIframeLoad) {
iframe.style.width = '100vw';
iframe.style.height = '100vh';
iframe.style.border = 'none';
- iframe.style.zIndex = 9999999999;
+ iframe.style.zIndex = 2147483647;
iframe.onload = onIframeLoad;
return iframe;
}
function addOverlayDivTo(iframe) {
- var div = iframe.contentDocument.createElement('div');
- div.id = 'react-dev-utils-webpack-hot-dev-client-overlay-div';
- div.style.position = 'fixed';
+ // TODO: unify these styles with react-error-overlay
+ iframe.contentDocument.body.style.margin = 0;
+ iframe.contentDocument.body.style.maxWidth = '100vw';
+
+ var outerDiv = iframe.contentDocument.createElement('div');
+ outerDiv.id = 'react-dev-utils-webpack-hot-dev-client-overlay-div';
+ outerDiv.style.width = '100%';
+ outerDiv.style.height = '100%';
+ outerDiv.style.boxSizing = 'border-box';
+ outerDiv.style.textAlign = 'center';
+ outerDiv.style.backgroundColor = 'rgb(255, 255, 255)';
+
+ var div = iframe.contentDocument.createElement('div');
+ div.style.position = 'relative';
+ div.style.display = 'inline-flex';
+ div.style.flexDirection = 'column';
+ div.style.height = '100%';
+ div.style.width = '1024px';
+ div.style.maxWidth = '100%';
+ div.style.overflowX = 'hidden';
+ div.style.overflowY = 'auto';
+ div.style.padding = '0.5rem';
div.style.boxSizing = 'border-box';
- div.style.left = 0;
- div.style.top = 0;
- div.style.right = 0;
- div.style.bottom = 0;
- div.style.width = '100vw';
- div.style.height = '100vh';
- div.style.backgroundColor = 'black';
- div.style.color = '#E8E8E8';
- div.style.fontFamily = 'Menlo, Consolas, monospace';
- div.style.fontSize = 'large';
- div.style.padding = '2rem';
- div.style.lineHeight = '1.2';
+ div.style.textAlign = 'left';
+ div.style.fontFamily = 'Consolas, Menlo, monospace';
+ div.style.fontSize = '11px';
div.style.whiteSpace = 'pre-wrap';
- div.style.overflow = 'auto';
- iframe.contentDocument.body.appendChild(div);
+ div.style.wordBreak = 'break-word';
+ div.style.lineHeight = '1.5';
+ div.style.color = 'rgb(41, 50, 56)';
+
+ outerDiv.appendChild(div);
+ iframe.contentDocument.body.appendChild(outerDiv);
return div;
}
+function overlayHeaderStyle() {
+ return 'font-size: 2em;' +
+ 'font-family: sans-serif;' +
+ 'color: rgb(206, 17, 38);' +
+ 'white-space: pre-wrap;' +
+ 'margin: 0 2rem 0.75rem 0px;' +
+ 'flex: 0 0 auto;' +
+ 'max-height: 35%;' +
+ 'overflow: auto;';
+}
+
var overlayIframe = null;
var overlayDiv = null;
var lastOnOverlayDivReady = null;
@@ -116,16 +126,25 @@ function ensureOverlayDivExists(onOverlayDivReady) {
function showErrorOverlay(message) {
ensureOverlayDivExists(function onOverlayDivReady(overlayDiv) {
- // Make it look similar to our terminal.
- overlayDiv.innerHTML =
- 'Failed to compile.
' +
- ansiHTML(entities.encode(message));
+ // TODO: unify this with our runtime overlay
+ overlayDiv.innerHTML = '