Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/create-react-app
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: react-scripts@3.1.2
Choose a base ref
...
head repository: facebook/create-react-app
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: react-scripts@3.2.0
Choose a head ref

Commits on Sep 19, 2019

  1. Copy the full SHA
    0dc69ec View commit details

Commits on Sep 20, 2019

  1. Remove 'shortcut' link type before 'icon' (#7707)

    Lewis Llobera authored and iansu committed Sep 20, 2019
    Copy the full SHA
    05f7924 View commit details

Commits on Sep 24, 2019

  1. Copy the full SHA
    b1e6155 View commit details
  2. 5
    Copy the full SHA
    6f5221c View commit details
  3. Copy the full SHA
    93150c5 View commit details

Commits on Sep 25, 2019

  1. Update adding flow documentation (#7731)

    FezVrasta authored and iansu committed Sep 25, 2019
    Copy the full SHA
    0d1775e View commit details

Commits on Sep 26, 2019

  1. set output.globalObject to 'this' (#7742)

    Closes #7741
    Kent C. Dodds authored and iansu committed Sep 26, 2019
    Copy the full SHA
    42ee721 View commit details

Commits on Sep 27, 2019

  1. Copy the full SHA
    6533a6d View commit details
  2. Copy the full SHA
    e624b75 View commit details

Commits on Sep 30, 2019

  1. Upgrade Webpack version (#7740)

    RDIL authored and mrmckeb committed Sep 30, 2019
    Copy the full SHA
    4a3718b View commit details
  2. Copy the full SHA
    c0d73ba View commit details
  3. Fix variable name casing in fileTransform (#7752)

    Lewis Llobera authored and mrmckeb committed Sep 30, 2019
    Copy the full SHA
    fefd716 View commit details
  4. Documentation typo fix (#7757)

    tomer authored and iansu committed Sep 30, 2019
    Copy the full SHA
    a10223d View commit details

Commits on Oct 1, 2019

  1. Copy the full SHA
    6f7b371 View commit details
  2. Copy the full SHA
    71946b1 View commit details
  3. Remove switch case (#7729)

    andrelmlins authored and mrmckeb committed Oct 1, 2019
    Copy the full SHA
    f36d61a View commit details
  4. Copy the full SHA
    6980616 View commit details
  5. Copy the full SHA
    85aac9b View commit details

Commits on Oct 2, 2019

  1. Copy the full SHA
    7e2b6b1 View commit details
  2. Copy the full SHA
    6b8fa00 View commit details

Commits on Oct 3, 2019

  1. Support production profiling with React Developer Tools (#7737)

    * Added the alias for profiling and output change to keep the classNames and functionNames for human readbility
    
    * defined isEnvProductionProfile with other isEnv checks
    
    * moved the keep_classnames and keep_fnames to terserOptions scope
    
    * resolve merge conflict for yarn.lock.cache
    
    * revert yarn.lock.cache to master yarn.lock.cache
    - git checkout origin/master -- packages/create-react-app/yarn.lock.cached
    
    * Comment and Boolean Check
    - I clarified the comment and specified the use case
    - Changed the environment check to check for the specific true rather than
    the assumed primitive value as before.
    
    * Replaced env with flag
    - Per suggestion --profile flag used instead of env variable PROFILE_APP
    
    * documentation in available scripts section with suggested information
    
    * resolved a local git issue. Fixed documentation error.
    
    * moved documentation to suggested file
    - Added a brief summary of profiling in available scripts section.
    The summary references the production-build document. Which is the
    file I moved the new documentation into under a new Header for production support.
    
    * Update production-build.md
    
    
    Co-authored-by: Ian Sutherland <ian@iansutherland.ca>
    JacobMGEvans and iansu committed Oct 3, 2019
    Copy the full SHA
    88cf8cd View commit details
  2. Prepare 3.2.0 release

    iansu committed Oct 3, 2019
    Copy the full SHA
    6a74342 View commit details
  3. Publish

     - create-react-app@3.2.0
     - react-app-polyfill@1.0.4
     - react-dev-utils@9.1.0
     - react-error-overlay@6.0.3
     - react-scripts@3.2.0
    iansu committed Oct 3, 2019
    Copy the full SHA
    7fae307 View commit details
Showing with 668 additions and 473 deletions.
  1. +87 −0 CHANGELOG.md
  2. +1 −1 docusaurus/docs/adding-flow.md
  3. +1 −1 docusaurus/docs/adding-images-fonts-and-files.md
  4. +1 −1 docusaurus/docs/adding-typescript.md
  5. +1 −0 docusaurus/docs/advanced-configuration.md
  6. +1 −1 docusaurus/docs/available-scripts.md
  7. +7 −1 docusaurus/docs/production-build.md
  8. +9 −0 docusaurus/docs/running-tests.md
  9. +1 −1 docusaurus/docs/using-the-public-folder.md
  10. +1 −1 packages/create-react-app/package.json
  11. +350 −371 packages/create-react-app/yarn.lock.cached
  12. +1 −1 packages/react-app-polyfill/ie11.js
  13. +2 −1 packages/react-app-polyfill/ie9.js
  14. +1 −1 packages/react-app-polyfill/package.json
  15. +2 −1 packages/react-dev-utils/README.md
  16. +16 −3 packages/react-dev-utils/WebpackDevServerUtils.js
  17. +0 −3 packages/react-dev-utils/formatWebpackMessages.js
  18. +2 −2 packages/react-dev-utils/package.json
  19. +2 −2 packages/react-error-overlay/package.json
  20. +29 −36 packages/react-scripts/bin/react-scripts.js
  21. +2 −2 packages/react-scripts/config/jest/fileTransform.js
  22. +54 −1 packages/react-scripts/config/modules.js
  23. +42 −16 packages/react-scripts/config/webpack.config.js
  24. +1 −1 packages/react-scripts/config/webpackDevServer.config.js
  25. +1 −1 packages/react-scripts/fixtures/kitchensink/integration/env.test.js
  26. +1 −1 packages/react-scripts/fixtures/kitchensink/public/index.html
  27. +6 −6 packages/react-scripts/package.json
  28. +11 −3 packages/react-scripts/scripts/build.js
  29. +18 −0 packages/react-scripts/scripts/init.js
  30. +2 −0 packages/react-scripts/scripts/start.js
  31. +1 −0 packages/react-scripts/scripts/utils/createJestConfig.js
  32. +5 −5 packages/react-scripts/template-typescript/README.md
  33. +1 −1 packages/react-scripts/template-typescript/public/index.html
  34. +5 −5 packages/react-scripts/template/README.md
  35. +1 −1 packages/react-scripts/template/public/index.html
  36. +2 −2 test/fixtures/webpack-message-formatting/__snapshots__/index.test.js.snap
87 changes: 87 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,88 @@
## 3.2.0 (2019-10-03)

v3.2.0 is a minor release that adds support for production profiling and ignoring TypeScript type errors to make migrating JavaScript projects to TypeScript easier. It also includes other minor bug fixes and documentation updates.

#### :rocket: New Feature

- `react-scripts`
- [#7737](https://github.com/facebook/create-react-app/pull/7737) Support production profiling with React Developer Tools ([@JacobMGEvans](https://github.com/JacobMGEvans))
- `react-dev-utils`, `react-scripts`
- [#6931](https://github.com/facebook/create-react-app/pull/6931) Adds TSC_COMPILE_ON_ERROR env var... ([@kylebebak](https://github.com/kylebebak))

#### :bug: Bug Fix

- `react-scripts`
- [#7754](https://github.com/facebook/create-react-app/pull/7754) Fix linting error when using rest props ([@alexandrtovmach](https://github.com/alexandrtovmach))
- `react-app-polyfill`
- [#7205](https://github.com/facebook/create-react-app/pull/7205) Guard polyfills against window possibly being undefined ([@jxom](https://github.com/jxom))

#### :nail_care: Enhancement

- `react-scripts`
- [#7687](https://github.com/facebook/create-react-app/pull/7687) Use installing package manager in README ([@ashr81](https://github.com/ashr81))
- [#7755](https://github.com/facebook/create-react-app/pull/7755) Support setting baseUrl to root directory ([@rovansteen](https://github.com/rovansteen))
- [#7530](https://github.com/facebook/create-react-app/pull/7530) only load eslint config when EXTEND_ESLINT environment variable is specified/ do not swallow eslint config errors ([@n1ru4l](https://github.com/n1ru4l))
- [#7742](https://github.com/facebook/create-react-app/pull/7742) set output.globalObject to 'this' ([@kentcdodds](https://github.com/kentcdodds))
- [#7721](https://github.com/facebook/create-react-app/pull/7721) Add "entrypoints" key to asset manifest ([@samuelmeuli](https://github.com/samuelmeuli))
- [#7562](https://github.com/facebook/create-react-app/pull/7562) enable .eslintignore again ([@igtm](https://github.com/igtm))
- `react-dev-utils`
- [#6980](https://github.com/facebook/create-react-app/pull/6980) Stop hiding the column number of ESLint errors ([@justingrant](https://github.com/justingrant))

#### :memo: Documentation

- [#7302](https://github.com/facebook/create-react-app/pull/7302) docs: note that 2 to 3 migration may require deletion of node_modules ([@kimpers](https://github.com/kimpers))
- [#7757](https://github.com/facebook/create-react-app/pull/7757) Documentation typo fix: accessbile→accessible ([@tomer](https://github.com/tomer))
- [#7601](https://github.com/facebook/create-react-app/pull/7601) [Documentation] Updated list of supported Jest config overrides ([@neilbryson](https://github.com/neilbryson))
- [#7705](https://github.com/facebook/create-react-app/pull/7705) Update runtime chunk name separator in docs ([@samuelmeuli](https://github.com/samuelmeuli))

#### :house: Internal

- `react-scripts`
- [#7752](https://github.com/facebook/create-react-app/pull/7752) Fix wrong letter casing ([@lewislbr](https://github.com/lewislbr))
- `react-dev-utils`, `react-scripts`
- [#7707](https://github.com/facebook/create-react-app/pull/7707) Remove 'shortcut' link type before 'icon' ([@lewislbr](https://github.com/lewislbr))

#### :hammer: Underlying Tools

- `react-scripts`
- [#7729](https://github.com/facebook/create-react-app/pull/7729) Remove switch case ([@andrelmlins](https://github.com/andrelmlins))

#### Committers: 19

- Alexandr Tovmach ([@alexandrtovmach](https://github.com/alexandrtovmach))
- André Lins ([@andrelmlins](https://github.com/andrelmlins))
- Ashrith Reddy ([@ashr81](https://github.com/ashr81))
- Federico Zivolo ([@FezVrasta](https://github.com/FezVrasta))
- Iguchi Tomokatsu ([@igtm](https://github.com/igtm))
- Jacob M-G Evans ([@JacobMGEvans](https://github.com/JacobMGEvans))
- Jake Moxey ([@jxom](https://github.com/jxom))
- Justin Grant ([@justingrant](https://github.com/justingrant))
- Kent C. Dodds ([@kentcdodds](https://github.com/kentcdodds))
- Kim Persson ([@kimpers](https://github.com/kimpers))
- Kyle Bebak ([@kylebebak](https://github.com/kylebebak))
- Laurin Quast ([@n1ru4l](https://github.com/n1ru4l))
- Lewis Llobera ([@lewislbr](https://github.com/lewislbr))
- Rakan Nimer ([@rakannimer](https://github.com/rakannimer))
- Reece Dunham ([@RDIL](https://github.com/RDIL))
- Robert van Steen ([@rovansteen](https://github.com/rovansteen))
- Samuel Meuli ([@samuelmeuli](https://github.com/samuelmeuli))
- Tomer Cohen ([@tomer](https://github.com/tomer))
- neilbryson ([@neilbryson](https://github.com/neilbryson))

### Migrating from 3.1.2 to 3.2.0

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

```sh
npm install --save --save-exact react-scripts@3.2.0
```

or

```sh
yarn add --exact react-scripts@3.2.0
```

## 3.1.2 (2019-09-19)

v3.1.2 is a maintenance release that includes minor bug fixes and documentation updates.
@@ -413,6 +498,8 @@ or
yarn add --exact react-scripts@3.0.0
```

**NOTE: You may need to delete your `node_modules` folder and reinstall your dependencies by running `yarn` (or `npm install`) if you encounter errors after upgrading.**

If you previously ejected but now want to upgrade, one common solution is to find the commits where you ejected (and any subsequent commits changing the configuration), revert them, upgrade, and later optionally eject again. It’s also possible that the feature you ejected for is now supported out of the box.

## Breaking Changes
2 changes: 1 addition & 1 deletion docusaurus/docs/adding-flow.md
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ make sure to add the following line to your `.flowconfig` to make Flow aware of

```diff
[options]
+ module.name_mapper='^\(.*\)$' -> '<PROJECT_ROOT>/src/\1'
+ module.name_mapper='^\([^\.].*\)$' -> '<PROJECT_ROOT>/src/\1'
```

To learn more about Flow, check out [its documentation](https://flow.org/).
2 changes: 1 addition & 1 deletion docusaurus/docs/adding-images-fonts-and-files.md
Original file line number Diff line number Diff line change
@@ -60,4 +60,4 @@ const App = () => (

This is handy if you don't want to load SVG as a separate file. Don't forget the curly braces in the import! The `ReactComponent` import name is special and tells Create React App that you want a React component that renders an SVG, rather than its filename.

> **Tip:** The imported SVG React Component accepts a `title` prop along with other props that a `svg` element accepts. Use this prop to add an accessbile title to your svg component.
> **Tip:** The imported SVG React Component accepts a `title` prop along with other props that a `svg` element accepts. Use this prop to add an accessible title to your svg component.
2 changes: 1 addition & 1 deletion docusaurus/docs/adding-typescript.md
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ yarn add typescript @types/node @types/react @types/react-dom @types/jest

Next, rename any file to be a TypeScript file (e.g. `src/index.js` to `src/index.tsx`) and **restart your development server**!

Type errors will show up in the same console as the build one.
Type errors will show up in the same console as the build one. You'll have to fix these type errors before you continue development or build your project. For advanced configuration, [see here](advanced-configuration.md).

To learn more about TypeScript, check out [its documentation](https://www.typescriptlang.org/).

1 change: 1 addition & 0 deletions docusaurus/docs/advanced-configuration.md
Original file line number Diff line number Diff line change
@@ -23,3 +23,4 @@ You can adjust various development and production settings by setting environmen
| INLINE_RUNTIME_CHUNK | 🚫 Ignored | ✅ Used | By default, Create React App will embed the runtime script into `index.html` during the production build. When set to `false`, the script will not be embedded and will be imported as usual. This is normally required when dealing with CSP. |
| IMAGE_INLINE_SIZE_LIMIT | 🚫 Ignored | ✅ Used | By default, images smaller than 10,000 bytes are encoded as a data URI in base64 and inlined in the CSS or JS build artifact. Set this to control the size limit in bytes. Setting it to 0 will disable the inlining of images. |
| EXTEND_ESLINT | ✅ Used | ✅ Used | When set to `true`, ESLint configs that extend `eslint-config-react-app` will be used by `eslint-loader`. Any rules that are set to `"error"` will stop the application from building. |
| TSC_COMPILE_ON_ERROR | ✅ Used | ✅ Used | When set to `true`, you can run and properly build TypeScript projects even if there are TypeScript type check errors. These errors are printed as warnings in the terminal and/or browser console. |
2 changes: 1 addition & 1 deletion docusaurus/docs/available-scripts.md
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ Launches the test runner in the interactive watch mode. See the section about [r

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. See the [production build](production-build.md) section for more information.
The build is minified and the filenames include the hashes. If necessary, classnames and function names can be enabled for profiling purposes. See the [production build](production-build.md) section for more information.

Your app is ready to be deployed! See the section about [deployment](deployment.md) for more information about deploying your application to popular hosting providers.

8 changes: 7 additions & 1 deletion docusaurus/docs/production-build.md
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ When running a production build of freshly created Create React App application,

- These files can either be _vendor_ code, or [code splitting chunks](code-splitting.md). _Vendor_ code includes modules that you've imported from within `node_modules`. One of the potential advantages with splitting your _vendor_ and _application_ code is to enable [long term caching techniques](#static-file-caching) to improve application loading performance. Since _vendor_ code tends to change less often than the actual _application_ code, the browser will be able to cache them separately, and won't re-download them each time the app code changes.

`runtime~main.[hash].js`
`runtime-main.[hash].js`

- This is a small chunk of [webpack runtime](https://webpack.js.org/configuration/optimization/#optimization-runtimechunk) logic which is used to load and run your application. The contents of this will be embedded in your `build/index.html` file by default to save an additional network request. You can opt out of this by specifying `INLINE_RUNTIME_CHUNK=false` as documented in our [advanced configuration](advanced-configuration.md), which will load this chunk instead of embedding it in your `index.html`.

@@ -28,3 +28,9 @@ Each file inside of the `build/static` directory will have a unique hash appende
To deliver the best performance to your users, it's best practice to specify a `Cache-Control` header for `index.html`, as well as the files within `build/static`. This header allows you to control the length of time that the browser as well as CDNs will cache your static assets. If you aren't familiar with what `Cache-Control` does, see [this article](https://jakearchibald.com/2016/caching-best-practices/) for a great introduction.

Using `Cache-Control: max-age=31536000` for your `build/static` assets, and `Cache-Control: no-cache` for everything else is a safe and effective starting point that ensures your user's browser will always check for an updated `index.html` file, and will cache all of the `build/static` files for one year. Note that you can use the one year expiration on `build/static` safely because the file contents hash is embedded into the filename.

## Profiling

ReactDOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small
additional overhead it is opt-in for production mode. You can opt-in by using the `--profile` flag. Use `npm run build -- --profile` or `yarn build --profile` to enable profiling in the production build. See the [React docs](https://reactjs.org/docs/optimizing-performance.html#profiling-components-with-the-devtools-profiler) for details about profiling
using the React DevTools.
9 changes: 9 additions & 0 deletions docusaurus/docs/running-tests.md
Original file line number Diff line number Diff line change
@@ -275,7 +275,16 @@ Supported overrides:
- [`collectCoverageFrom`](https://jestjs.io/docs/en/configuration.html#collectcoveragefrom-array)
- [`coverageReporters`](https://jestjs.io/docs/en/configuration.html#coveragereporters-array-string)
- [`coverageThreshold`](https://jestjs.io/docs/en/configuration.html#coveragethreshold-object)
- [`extraGlobals`](https://jestjs.io/docs/en/configuration.html#extraglobals-array-string)
- [`globalSetup`](https://jestjs.io/docs/en/configuration.html#globalsetup-string)
- [`globalTeardown`](https://jestjs.io/docs/en/configuration.html#globalteardown-string)
- [`moduleNameMapper`](https://jestjs.io/docs/en/configuration.html#modulenamemapper-object-string-string)
- [`resetMocks`](https://jestjs.io/docs/en/configuration.html#resetmocks-boolean)
- [`resetModules`](https://jestjs.io/docs/en/configuration.html#resetmodules-boolean)
- [`snapshotSerializers`](https://jestjs.io/docs/en/configuration.html#snapshotserializers-array-string)
- [`transform`](https://jestjs.io/docs/en/configuration.html#transform-object-string-pathtotransformer-pathtotransformer-object)
- [`transformIgnorePatterns`](https://jestjs.io/docs/en/configuration.html#transformignorepatterns-array-string)
- [`watchPathIgnorePatterns`](https://jestjs.io/docs/en/configuration.html#watchpathignorepatterns-array-string)
Example package.json:
2 changes: 1 addition & 1 deletion docusaurus/docs/using-the-public-folder.md
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ If you put a file into the `public` folder, it will **not** be processed by Webp
Inside `index.html`, you can use it like this:

```html
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<link rel="icon" href="%PUBLIC_URL%/favicon.ico">
```

Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build.
2 changes: 1 addition & 1 deletion packages/create-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-app",
"version": "3.1.2",
"version": "3.2.0",
"keywords": [
"react"
],
Loading