Releases: facebook/create-react-app
v1.0.4
1.0.4 (May 22, 2017)
๐ Bug Fix
react-error-overlay
- Fix a regression in published package.
Migrating from 1.0.3 to 1.0.4
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact [email protected]
or
yarn add --dev --exact [email protected]
v1.0.3
1.0.3 (May 21, 2017)
๐ Bug Fix
-
react-dev-utils
-
eslint-config-react-app
-
react-dev-utils
,react-error-overlay
- #2301 Wrap more
console
calls into a check. (@BrodaNoel)
- #2301 Wrap more
-
react-scripts
Committers: 4
Migrating from 1.0.2 to 1.0.3
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact [email protected]
or
yarn add --dev --exact [email protected]
v1.0.2
1.0.2 (May 20, 2017)
๐ Bug Fix
-
react-dev-utils
,react-scripts
- #2276 Serve a no-op service worker in development to ensure it doesn't cache the production build even if it was served on the same port. (@jeffposnick)
-
react-dev-utils
,react-error-overlay
-
react-dev-utils
- #2282 Add Windows Subsystem for Linux support to the error overlay. (@noinkling)
- #2269 Fix a missing package dependency. (@GreenGremlin)
๐ Enhancement
-
react-scripts
- #2221 Ejecting should ensure you have clean
git status
. (@milocosmopolitan) - #2288 Only enable host check if you use proxy, and add a way to opt out of it. (@gaearon)
- #2221 Ejecting should ensure you have clean
๐ Internal
Committers: 6
- Dan Abramov (gaearon)
- Jeffrey Posnick (jeffposnick)
- Jonathan (GreenGremlin)
- Malcolm (noinkling)
- Milo Kang (milocosmopolitan)
- pmadar
Migrating from 1.0.1 to 1.0.2
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact [email protected]
or
yarn add --dev --exact [email protected]
If you previously had issues with an Invalid Host Header
error, follow these new instructions to fix it.
v1.0.1
1.0.1 (May 19, 2017)
๐ Bug Fix
-
react-scripts
- #2242 Fix
NODE_PATH=src
fornpm start
andnpm run build
. (@ApacheEx) - #2261 Fix
NODE_PATH=src
for Jest. (@gaearon) - #2255 Fix Windows path issue for generated service worker. (@gaearon)
- #2262 Additional fix to service worker config for
"homepage"
field. (@gaearon) - #2250 Ignore
.env.local
intest
environment. (@gaearon) - #2246 Gracefully shut down the development server on signals. (@gaearon)
- #2242 Fix
-
react-dev-utils
-
react-dev-utils
,react-error-overlay
-
react-error-overlay
๐ Enhancement
-
eslint-config-react-app
-
react-scripts
- #2224 Add
<noscript>
to template'sindex.html
. (@viankakrisna)
- #2224 Add
๐ Documentation
-
react-scripts
- #2259 Fix broken links. (@enguerran)
- #2258 Update readme with example of Sass include path. (@kellyrmilligan)
- #2252 Hide React Storybook from the User Guide while it's incompatible. (@gaearon)
- #2247 Correct docs on which
.env.*
files are supported. (@AJamesPhillips)
๐ Internal
Committers: 9
- Ade Viankakrisna Fadlil (viankakrisna)
- Alexander James Phillips (AJamesPhillips)
- Dan Abramov (gaearon)
- Enguerran (enguerran)
- Joe Haddad (Timer)
- Kelly (kellyrmilligan)
- Nayef Ghattas (Gandem)
- Oleg Kuzava (ApacheEx)
- chyipin
Migrating from 1.0.0 to 1.0.1
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact [email protected]
or
yarn add --dev --exact [email protected]
v1.0.0
1.0.0 (May 18, 2017)
Weโve been working on this release for the past few months, and there are many big impovements, from migrating to webpack 2 to a brand new runtime error overlay and built-in support for Progressive Web Apps.
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.
Have you read it? Now let's see how to update your app to the latest version.
Migrating from 0.9.5 to 1.0.0
First, ensure you are using the latest Node 6 LTS or newer. 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 [email protected]
You may also optionally update the global command-line utility for bug fixes:
npm install -g create-react-app
Ensure application and test files reside in src/
We've never supported importing files from outside src/
, nor have we supported running tests outside of src/
.
We also never explicitly forbid doing so, which caused confusion when things didn't work like they should.
When running or building your application, you may see a message like so:
You attempted to import ... which falls outside of the project src/ directory.
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).
If you used relative imports outside the project directory as a way to share code with another project, consider using a monorepo instead, so that other projects are symlinked to your project's node_modules/
. Then you can import them as a Node modules.
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/
.
Import required locales for Moment.js
Moment.js locales are now purposely excluded from the bundle unless explicitly depended on.
Please import the locales you need:
import moment from 'moment';
import 'moment/locale/fr';
import 'moment/locale/es';
You can no longer import file content
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.
Importing files with unknown extensions will now always include them into the build and return a valid URL.
If you'd like to import a file's contents as a string, consider contributing to #1944.
For the time being, you must embed assets within an export:
// sample.txt
export default `i want
this data as a string
`;
You can then import this as so:
import sampleText from './sample.txt';
// ...
Confusing window globals can no longer be used without window
qualifier
Please prefix any global method with window.
, you may experience this with methods such as confirm
.
Simply update references from confirm
to window.confirm
.
Note that this new lint error will likely uncover legitimate accidental uses of global variables where you meant to define a local variable instead.
Why is my import erroring out?
You can no longer use AMD import syntax, nor define an import anywhere other than the top of the file.
This is to reduce confusion around import statements, which do not allow you to evaluate code between them.
I see many accessibility warnings
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.
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.
I see many warnings about PropTypes and createClass
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.
How do I make my tests work with Jest 20?
Please refer to the Jest 19 and Jest 20 breaking changes for migration instructions.
If you use snapshots, you will likely need to update them once because of the change in format.
Flexbox 2009 spec is no longer polyfilled
The old, 2009 specification for Flexbox is deprecated and is 2.3x slower than the latest specification.
We are no longer polyfilling it automatically.
I see "Definition for rule 'jsx-a11y/alt-text' was not found (jsx-a11y/alt-text)" in the editor
Follow these steps if you see errors about missing lint rules in the editor.
- Ensure that in your editor ESLint settings you have "Use Global ESLint" turned off
- Run
npm install
in your project (oryarn
) - Quit your editor completely (ensure its process doesn't hang around)
- Start the editor again
If you still have the problem please file an issue.
How to turn my app into a Progressive Web App?
After the regular update procedure above, add these line to <head>
in public/index.html
:
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
Then create a file called public/manifest.json
that looks like this:
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "192x192",
"type": "image/png"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
Finally, create src/registerServiceWorker.js
with this template, import it from src/index.js
and call the function it exports.
Anything missing?
This was a large release, and we might have missed something.
Please file an issue and we will try to help.
Some of my tests started crashing because of unhandled rejections
Unhandled Promise rejections will now crash tests. You can fix them by explicitly catching the errors you donโt care about.
Detailed Changelog
For a readable summary of the changes, check out our blog post.
๐ฅ Breaking Change
react-dev-utils
,react-scripts
react-scripts
- #2187 Ignore Moment.js locales by default. (@gaearon)
- #1808 Only run tests in
src/
(#544). (@motevets) - #1771 Some flexbox bugs are autofixed, and support for 2009 spec is dropped. (@cr101)
- #1614 Upgrade to Jest
19(now 20). (@rogeliog) - #1305 Whitelist files that can be embedded through url-loader. (@pugnascotia)
eslint-config-react-app
,react-dev-utils
eslint-config-react-app
,react-error-overlay
,react-scripts
- #2163 Upgrade
eslint-plugin-jsx-a11y
and activate more rules. (@AlmeroSteyn)
- #2163 Upgrade
eslint-config-react-app
,react-scripts
๐ New Feature
react-scripts
- #1728 Scaffolded applications are now ...
v0.9.5
0.9.5 (March 9, 2017)
๐ Bug Fix
-
react-scripts
- #1783 Work around Node 7.7.2 bug that crashes
npm start
. (@ryanwalters)
- #1783 Work around Node 7.7.2 bug that crashes
๐ Enhancement
-
eslint-config-react-app
-
react-scripts
๐ Documentation
๐ Internal
Committers: 6
- Andres Suarez (zertosh)
- Ben Alpert (spicyj)
- Joe Haddad (Timer)
- Leo Lamprecht (leo)
- Lorenzo Palmes (lpalmes)
- Ryan Walters (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 [email protected]
v0.9.4
0.9.4 (March 6, 2017)
๐ Bug Fix
-
create-react-app
-
react-scripts
-
react-dev-utils
-
#1690 Fix
openBrowser()
whenBROWSER=open
on macOS. (@bpierre) -
#1696 Improve reliability of port detection. (@chrisdrackett)
-
๐ Enhancement
-
eslint-config-react-app
,react-scripts
-
#1705 Add support for
ignoreRestSiblings
inno-unused-vars
. (@chrisdrackett)Linter no longer warns when using rest properties to remove variables from an object.
-
-
react-dev-utils
,react-scripts
- #1726 Extract generic build functions into
react-dev-utils
. (@viankakrisna)
- #1726 Extract generic build functions into
-
Other
๐ Documentation
react-scripts
๐ Internal
react-scripts
eslint-config-react-app
eslint-config-react-app
,react-dev-utils
,react-scripts
react-dev-utils
- Other
- #1723 Skip AppVeyor CI builds for Markdown changes. (@gaearon)
- #1707 Add double quotes to escape spaces in paths in e2e. (@viankakrisna)
- #1688 Upgrade
lerna
version. (@viankakrisna)
Committers: 11
- Ade Viankakrisna Fadlil (viankakrisna)
- Bond (bondz)
- Chris Drackett (chrisdrackett)
- Dan Abramov (gaearon)
- Joe Haddad (Timer)
- Mato Ilic (matoilic)
- Myk Klemme (mklemme)
- Pierre Bertet (bpierre)
- Ryan Platte (replaid)
- Travis Giggy (tgig)
- Valerii Sorokobatko (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 [email protected]
You may also optionally update the global command-line utility for scoped package support:
npm install -g [email protected]
v0.9.3
0.9.3 (February 28, 2017)
๐ New Feature
-
create-react-app
If you are using Yarn, and you have created at least one app previously, Create React App now works offline.
๐ Bug Fix
react-scripts
create-react-app
- #1675 Delete project folder on failed installation on Windows. (@johann-sonntagbauer)
- #1662 Validate project name before creating a project. (@johann-sonntagbauer)
- #1669 Make sure React dependencies arenโt pinned in new projects. (@johann-sonntagbauer)
๐ Enhancement
react-scripts
- #1677 Add
X-FORWARDED
headers for proxy requests. (@johann-sonntagbauer)
- #1677 Add
๐ Documentation
react-scripts
- #1657 Tweak the Visual Studio Code debugging guide. (@ryansully)
๐ Internal
Committers: 5
- Dan Abramov (gaearon)
- Joe Haddad (Timer)
- Johann Hubert Sonntagbauer (johann-sonntagbauer)
- Ryan Sullivan (ryansully)
- Simon Vocella (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 [email protected]
You may also optionally update the global command-line utility for offline Yarn cache support:
npm install -g [email protected]
v0.9.2
0.9.2 (February 26, 2017)
๐ Enhancement
create-react-app
-
#1253 Install time optimization. (@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 Graceful error handling. (@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 Suggest upgrading to NPM >= 3 for faster install times. (@mobinni)
-
#1603 Allow app creation in a WebStorm project. (@driquelme)
-
#1570 Allow git urls in
--scripts-version
. (@tomconroy)
-
react-scripts
- #1578 Enable lint caching in development. (@viankakrisna)
- #1478 Update the build script message to show the correct port. (@chyipin)
- #1567 Remove .bin files after eject. (@tuchk4)
- #1560 Bump
recursive-readdir
. (@wtgtybhertgeghgtwtg)
๐ Bug Fix
react-scripts
-
#1635 Fix Jest configuration. (@Timer)
Fixes ejecting on Windows for macOS and Linux machines.
-
#1356 Fix workflow if react-scripts package is linked via npm-link. (@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 Ensure PORT environment variable is an integer. (@matoilic)
-
#1628 Show correct port for pushstate-server URL text. (@mattccrampton)
-
๐ Documentation
- User Guides
- #1391 Add note how to resolve missing required files for Heroku. (@sbritoig)
- #1577 Add a how-to on
react-snapshot
. (@superhighfives) - #1121 Add documentation for customizing Bootstrap theme. (@myappincome)
- #1540 Document debugging in Visual Studio Code. (@bondz)
- #1618 Add note about when to import Bootstrap CSS. (@joewoodhouse)
- #1518 Update flow configuration documentation. (@SBrown52)
- #1625 Specify that NODE_ENV is set to 'production' during the build step. (@mderazon)
- #1573 Update Jest documentation links. (@mkermani144)
- #1564 Add --recursive to Sass watch script. (@aleburato)
- #1561 Use https in link in documentation. (@dariocravero)
- #1562 Update
jest-enzyme
documentation. (@kiranps) - #1543 Update CSS preprocessor instructions. (@aleburato)
- #1338 Add link to Azure deployment tutorial. (@tpetrina)
- #1320 Document how to disable autoprefix feature. (@rrubas)
- #1313 List features beyond ES6 supported by create-react-app. (@jonathanconway)
- #1008 Add Saas support documentation. (@tsironis)
- #994 Suggest
jest-enzyme
for simplifying test matchers. (@blainekasten) - #1608 Add note for using CHOKIDAR_USEPOLLING in virtual machines to enable HMR. (@AJamesPhillips)
- #1495 Add useful link to react-scripts. (@pd4d10)
- READMEs
- #1576 Switch from Neo to Neutrino. (@eliperelman)
- #1275 Suggest yarn commands in addition to npm. (@lifez)
๐ Internal
babel-preset-react-app
- #1598 Remove redundant babel-plugin-transform-es2015-parameters. (@christophehurpeau)
- Other
- #1534 Use yarn@latest in e2e. (@gaearon)
- #1295 Make node version check more robust in e2e. (@pugnascotia)
- #1503 Fix
test -e
in e2e. (@igetgames)
Committers: 36
- Ade Viankakrisna Fadlil (viankakrisna)
- Alessandro Burato (aleburato)
- Alexander James Phillips (AJamesPhillips)
- Blaine Kasten (blainekasten)
- Bond (bondz)
- Charlie Gleason (superhighfives)
- Christophe Hurpeau (christophehurpeau)
- Dan Abramov (gaearon)
- Daniel Riquelme (driquelme)
- Darรญo Javier Cravero (dariocravero)
- Dimitris Tsironis (tsironis)
- Eli Perelman (eliperelman)
- Jirat Ki. (n3tr)
- Joe Haddad (Timer)
- Joe Woodhouse (joewoodhouse)
- Jonathan Conway (jonathanconway)
- Marcus R. Brown (igetgames)
- Mato Ilic (matoilic)
- Matt Crampton (mattccrampton)
- Michael DeRazon (mderazon)
- Mo Binni (mobinni)
- Mohammad Kermani (mkermani144)
- Phawin Khongkhasawan (lifez)
- Roman Rubas (rrubas)
- Rory Hunter (pugnascotia)
- Tom Conroy (tomconroy)
- Toni Petrina (tpetrina)
- Valerii Sorokobatko (tuchk4)
- Vicente Jr Yuchitcho (chitchu)
- SBrown52
- chyipin
- myappincome
- sbritoig
- wtgtybhertgeghgtwtg
- kiran ps (kiranps)
- pd4d10 (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 [email protected]
You may also optionally update the global command-line utility for more efficient installs (thanks @n3tr):
npm install -g [email protected]