Skip to content

Releases: facebook/create-react-app

v1.0.4

22 May 11:44
Compare
Choose a tag to compare

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 react-scripts@1.0.4

or

yarn add --dev --exact react-scripts@1.0.4

v1.0.3

21 May 19:57
Compare
Choose a tag to compare

1.0.3 (May 21, 2017)

๐Ÿ› Bug Fix

  • react-dev-utils

    • #2297 Donโ€™t serve the development version from public IPs by default. (@Timer)
  • eslint-config-react-app

    • #2311 Disable flowtype/require-valid-file-annotation lint rule due to false positives. (@Robdel12)
  • react-dev-utils, react-error-overlay

  • 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 react-scripts@1.0.3

or

yarn add --dev --exact react-scripts@1.0.3

v1.0.2

20 May 18:35
Compare
Choose a tag to compare

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

๐Ÿ’… Enhancement

  • react-scripts

๐Ÿ  Internal

  • react-dev-utils, react-scripts

Committers: 6

Migrating from 1.0.1 to 1.0.2

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

npm install --save-dev --save-exact react-scripts@1.0.2

or

yarn add --dev --exact react-scripts@1.0.2

If you previously had issues with an Invalid Host Header error, follow these new instructions to fix it.

v1.0.1

19 May 19:23
Compare
Choose a tag to compare

1.0.1 (May 19, 2017)

๐Ÿ› Bug Fix

  • react-scripts

  • react-dev-utils

    • #2229 Show customized build path for serve instruction. (@chyipin)
  • react-dev-utils, react-error-overlay

  • react-error-overlay

    • #2238 Fix a crash when switching errors with arrow keys. (@Gandem)

๐Ÿ’… Enhancement

  • eslint-config-react-app

  • react-scripts

๐Ÿ“ Documentation

๐Ÿ  Internal

Committers: 9

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 react-scripts@1.0.1

or

yarn add --dev --exact react-scripts@1.0.1

v1.0.0

19 May 04:41
Compare
Choose a tag to compare

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 react-scripts@1.0.0

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.

  1. Ensure that in your editor ESLint settings you have "Use Global ESLint" turned off
  2. Run npm install in your project (or yarn)
  3. Quit your editor completely (ensure its process doesn't hang around)
  4. Start the editor again

If you still have the problem please file an issue.

How to turn my app into a Progressive Web App?

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
    • #2189 Add ModuleScopePlugin to ensure files reside in src/. (@Timer)
  • react-scripts
  • eslint-config-react-app, react-dev-utils
  • eslint-config-react-app, react-error-overlay, react-scripts
  • eslint-config-react-app, react-scripts

๐Ÿš€ New Feature

  • react-scripts
    • #1728 Scaffolded applications are now ...
Read more

v0.9.5

09 Mar 21:18
Compare
Choose a tag to compare

0.9.5 (March 9, 2017)

๐Ÿ› Bug Fix

  • react-scripts

๐Ÿ’… Enhancement

  • eslint-config-react-app

  • react-scripts

    • #1760 Suggest serve for running in production. (@leo)
    • #1747 Display yarn instead of yarnpkg when creating a new app. (@lpalmes)

๐Ÿ“ Documentation

๐Ÿ  Internal

  • babel-preset-react-app

    • #1742 Switch to babel-preset-env to remove the deprecation warning. (@Timer)

Committers: 6

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

v0.9.4

06 Mar 19:17
Compare
Choose a tag to compare

0.9.4 (March 6, 2017)

๐Ÿ› Bug Fix

  • create-react-app

    • #1706 Extract compressed package for package name. (@Timer)

      You may now specify a scoped package for --scripts-version and obtain a working installation.

    • #1695 Print why installation was aborted. (@tgig)

  • react-scripts

    • #1727 Fix ejecting from a scoped fork. (@gaearon)

      Ejecting now works within a scoped fork.

    • #1721 Fix hot reloading for WebpackDevServer after eject. (@gaearon)

  • react-dev-utils

๐Ÿ’… Enhancement

  • eslint-config-react-app, react-scripts

    • #1705 Add support for ignoreRestSiblings in no-unused-vars. (@chrisdrackett)

      Linter no longer warns when using rest properties to remove variables from an object.

    • #1542 Bump jsx-a11y version. (@bondz)

  • react-dev-utils, react-scripts

  • Other

๐Ÿ“ Documentation

๐Ÿ  Internal

Committers: 11

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

v0.9.3

28 Feb 17:49
Compare
Choose a tag to compare

0.9.3 (February 28, 2017)

๐Ÿš€ New Feature

  • create-react-app

    • #1423 Fall back to Yarn offline cache when creating a new project. (@voxsim)

    If you are using Yarn, and you have created at least one app previously, Create React App now works offline.

    Yarn offline installation demo

๐Ÿ› Bug Fix

๐Ÿ’… Enhancement

๐Ÿ“ Documentation

  • react-scripts

๐Ÿ  Internal

  • End-to-end Tests
    • #1648 Add Windows CI tests for better stability. (@Timer)

Committers: 5

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

v0.9.2

26 Feb 13:39
Compare
Choose a tag to compare

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

๐Ÿ› 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

๐Ÿ  Internal

Committers: 36

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

npm install -g create-react-app@1.1.0

v0.9.1

26 Feb 03:05
Compare
Choose a tag to compare

0.9.1 (February 25, 2017)

This release has known issue. Please skip it and update to 0.9.2 instead.