diff --git a/.eslintrc.json b/.eslintrc.json
index b642bbc5c14..40029410cce 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -4,7 +4,8 @@
"browser": true,
"commonjs": true,
"node": true,
- "es6": true
+ "es6": true,
+ "jest": true
},
"parserOptions": {
"ecmaVersion": 2018
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index f0e8f10f061..77ceec87b2b 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,2 +1,2 @@
-packages/ @ianschmitz @iansu @mrmckeb @petetnt
-docusaurus/ @ianschmitz @iansu @mrmckeb
+packages/ @iansu @mrmckeb
+docusaurus/ @iansu @mrmckeb
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 8153cffe3e2..0f391681bef 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -32,7 +32,7 @@ labels: 'issue: bug report, needs triage'
* yarn.lock
Then you need to decide which package manager you prefer to use.
- We support both npm (https://npmjs.com) and yarn (http://yarnpkg.com/).
+ We support both npm (https://npmjs.com) and yarn (https://yarnpkg.com/).
However, **they can't be used together in one project** so you need to pick one.
If you decided to use npm, run this in your project directory:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7b94526e804..3ebb67c48e9 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -6,8 +6,14 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v2
+ with:
+ node-version: '14'
+ cache: 'npm'
+ - name: Install npm@8
+ run: npm i -g npm@8
- name: Install
- run: yarn --no-progress --non-interactive --no-lockfile
+ run: npm ci --prefer-offline
- name: Build
- run: yarn build
+ run: npm run build
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
new file mode 100644
index 00000000000..88699dfa278
--- /dev/null
+++ b/.github/workflows/integration.yml
@@ -0,0 +1,32 @@
+name: Integration Tests
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ job:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
+ node: ['14', '16']
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup node
+ uses: actions/setup-node@v2
+ with:
+ node-version: ${{ matrix.node }}
+ cache: 'npm'
+ - name: Install npm@8
+ run: npm i -g npm@8
+ - name: Install yarn
+ run: npm i -g yarn
+ - name: Install packages
+ run: npm ci --prefer-offline
+ - name: Run integration tests
+ run: npm run test:integration
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index a2e7567d1e1..d9835010a9c 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -6,8 +6,14 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v2
+ with:
+ node-version: '14'
+ cache: 'npm'
+ - name: Install npm@8
+ run: npm i -g npm@8
- name: Install
- run: yarn --no-progress --non-interactive --no-lockfile
+ run: npm ci --prefer-offline
- name: Alex
- run: yarn alex
+ run: npm run alex
diff --git a/.gitignore b/.gitignore
index a3e7a11d130..ffa71fafc6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,3 @@ yarn-debug.log*
yarn-error.log*
/.changelog
.npm/
-yarn.lock
diff --git a/CHANGELOG-0.x.md b/CHANGELOG-0.x.md
index 357f8231ee5..5463a61a4e9 100644
--- a/CHANGELOG-0.x.md
+++ b/CHANGELOG-0.x.md
@@ -156,7 +156,7 @@ npm install -g create-react-app@1.3.0
If you are using Yarn, and you have created at least one app previously, Create React App now works offline.
-
+
#### :bug: Bug Fix
@@ -363,21 +363,21 @@ Thanks to [@Timer](https://github.com/timer) for cutting this release.
- [#1489](https://github.com/facebook/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/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#serving-the-same-build-from-different-paths).
+ 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/facebook/create-react-app/blob/main/packages/react-scripts/template/README.md#serving-the-same-build-from-different-paths).
- [#937](https://github.com/facebook/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/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration) section.
+ 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/facebook/create-react-app/blob/main/packages/react-scripts/template/README.md#advanced-configuration) section.
- [#1440](https://github.com/facebook/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/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#referencing-environment-variables-in-the-html).
+ 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/facebook/create-react-app/blob/main/packages/react-scripts/template/README.md#referencing-environment-variables-in-the-html).
- `react-dev-utils`
- [#1148](https://github.com/facebook/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/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration).
+ 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/facebook/create-react-app/blob/main/packages/react-scripts/template/README.md#advanced-configuration).
#### :boom: Breaking Change
@@ -393,7 +393,7 @@ Thanks to [@Timer](https://github.com/timer) for cutting this release.
- [#1264](https://github.com/facebook/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/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#advanced-configuration) if you wish to disable it.
+ Non-interactive terminals no longer automatically disable launching of the browser. Instead, you need to [specify `none` as `BROWSER` environment variable](https://github.com/facebook/create-react-app/blob/main/packages/react-scripts/template/README.md#advanced-configuration) if you wish to disable it.
#### :bug: Bug Fix
@@ -515,7 +515,7 @@ 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.
+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](https://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.
@@ -823,7 +823,7 @@ Thanks to [@fson](https://github.com/fson) for cutting this release.
- [#944](https://github.com/facebook/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/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#continuous-integration) for more information.
+ 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/facebook/create-react-app/blob/main/packages/react-scripts/template/README.md#continuous-integration) for more information.
- [#1090](https://github.com/facebook/create-react-app/pull/1090) Enable proxying of WebSockets. ([@dceddia](https://github.com/dceddia))
@@ -993,7 +993,7 @@ 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/facebook/create-react-app/pull/858))
+- Updates Jest to [version 16.0](https://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/facebook/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/facebook/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/facebook/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/facebook/create-react-app/pull/891))
@@ -1109,8 +1109,8 @@ npm install --save-dev --save-exact react-scripts@0.5.1
### Build Dependency (`react-scripts`)
-- Adds [support for `public` folder](https://github.com/facebook/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/facebook/create-react-app/pull/703))
-- You can now [specify defaults](https://github.com/facebook/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/facebook/create-react-app/pull/695))
+- Adds [support for `public` folder](https://github.com/facebook/create-react-app/blob/main/packages/react-scripts/template/README.md#using-the-public-folder) with arbitrary assets. ([@gaearon](https://github.com/gaearon) in [#703](https://github.com/facebook/create-react-app/pull/703))
+- You can now [specify defaults](https://github.com/facebook/create-react-app/blob/main/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/facebook/create-react-app/pull/695))
- Ejecting now generates proper `.babelrc` and `.eslintrc`. ([@fson](https://github.com/fson) in [#689](https://github.com/facebook/create-react-app/pull/689), [@gaearon](https://github.com/gaearon) in [#705](https://github.com/facebook/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/facebook/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/facebook/create-react-app/issues/711))
@@ -1166,7 +1166,7 @@ You would need to move both `index.html` and `src/favicon.ico` into the `public`
```
-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/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#using-the-public-folder) and [why these changes were made](https://github.com/facebook/create-react-app/pull/703).
+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/facebook/create-react-app/blob/main/packages/react-scripts/template/README.md#using-the-public-folder) and [why these changes were made](https://github.com/facebook/create-react-app/pull/703).
## 0.4.3 (September 18, 2016)
@@ -1260,9 +1260,9 @@ npm install --save-dev --save-exact react-scripts@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/facebook/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/facebook/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 need a static file to be part for the build, [import it from JavaScript and you will get its filename](https://github.com/facebook/create-react-app/blob/main/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/facebook/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 used static files with ` `, [read this new guide](https://github.com/facebook/create-react-app/blob/main/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.
@@ -1284,7 +1284,7 @@ npm install --save-dev --save-exact react-scripts@0.3.1
### Build Dependency (`react-scripts`)
-- Testing is [now supported](https://github.com/facebook/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/facebook/create-react-app/pull/250), [@gaearon](https://github.com/gaearon) in [#378](https://github.com/facebook/create-react-app/pull/378), [#530](https://github.com/facebook/create-react-app/pull/530), [#533](https://github.com/facebook/create-react-app/pull/533))
+- Testing is [now supported](https://github.com/facebook/create-react-app/blob/main/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/facebook/create-react-app/pull/250), [@gaearon](https://github.com/gaearon) in [#378](https://github.com/facebook/create-react-app/pull/378), [#530](https://github.com/facebook/create-react-app/pull/530), [#533](https://github.com/facebook/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/facebook/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/facebook/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/facebook/create-react-app/pull/529))
@@ -1331,7 +1331,7 @@ Since 0.3.0 added a test runner, we recommend that you add it to the `scripts` s
}
```
-[Then read the testing guide to learn more about using it!](https://github.com/facebook/create-react-app/blob/master/template/README.md#running-tests)
+[Then read the testing guide to learn more about using it!](https://github.com/facebook/create-react-app/blob/main/template/README.md#running-tests)
## 0.2.3 (August 25, 2016)
@@ -1394,7 +1394,7 @@ Newly created projects will use `0.2.1` automatically. You **don’t** need to u
- 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/facebook/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/facebook/create-react-app/pull/128))
-- Cloud9 and Nitrous online IDEs are now supported ([@gaearon](http://github.com/gaearon) in [2fe84e](https://github.com/facebook/create-react-app/commit/2fe84ecded55f1d5258d91f9c2c07698ae0d2fb4))
+- Cloud9 and Nitrous online IDEs are now supported ([@gaearon](https://github.com/gaearon) in [2fe84e](https://github.com/facebook/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/facebook/create-react-app/pull/101), [2edf21](https://github.com/facebook/create-react-app/commit/2edf2180f2aa6bf647807d0b1fcd95f4cfe4a558))
- You can now `import` CSS files from npm modules ([@glennreyes](https://github.com/glennreyes) in [#105](https://github.com/facebook/create-react-app/pull/105), [@breaddevil](https://github.com/breaddevil) in [#178](https://github.com/facebook/create-react-app/pull/178))
- `fetch` and `Promise` polyfills are now always included ([@gaearon](https://github.com/gaearon) in [#235](https://github.com/facebook/create-react-app/pull/235))
@@ -1406,7 +1406,7 @@ Newly created projects will use `0.2.1` automatically. You **don’t** need to u
- A `.babelrc` in parent directory no longer causes an error ([@alexzherdev](https://github.com/alexzherdev) in [#236](https://github.com/facebook/create-react-app/pull/236))
- Files with `.json` extension are now discovered ([@gaearon](https://github.com/gaearon) in [a11d6a](https://github.com/facebook/create-react-app/commit/a11d6a398f487f9163880dd34667b1d3e14b147a))
- Bug fixes from transitive dependencies are included ([#126](https://github.com/facebook/create-react-app/issues/126))
-- Linting now works with IDEs if you follow [these](https://github.com/facebook/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/facebook/create-react-app/pull/149))
+- Linting now works with IDEs if you follow [these](https://github.com/facebook/create-react-app/blob/main/template/README.md#display-lint-output-in-the-editor) instructions ([@keyanzhang](https://github.com/keyanzhang) in [#149](https://github.com/facebook/create-react-app/pull/149))
- After building, we now print gzipped bundle size ([@lvwrence](https://github.com/lvwrence) in [#229](https://github.com/facebook/create-react-app/pull/229))
### Global CLI (`create-react-app`)
@@ -1428,7 +1428,7 @@ 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/facebook/create-react-app/blob/master/template/README.md#deploy-to-github-pages). If you had [issues with integrating editor linter plugins](https://github.com/facebook/create-react-app/issues/124), follow [these new instructions](https://github.com/facebook/create-react-app/blob/master/template/README.md#display-lint-output-in-the-editor).
+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/facebook/create-react-app/blob/main/template/README.md#deploy-to-github-pages). If you had [issues with integrating editor linter plugins](https://github.com/facebook/create-react-app/issues/124), follow [these new instructions](https://github.com/facebook/create-react-app/blob/main/template/README.md#display-lint-output-in-the-editor).
## 0.1.0 (July 22, 2016)
diff --git a/CHANGELOG-1.x.md b/CHANGELOG-1.x.md
index d8b8ee9cb90..f797a8e54a3 100644
--- a/CHANGELOG-1.x.md
+++ b/CHANGELOG-1.x.md
@@ -1365,7 +1365,7 @@ or
yarn add --dev --exact react-scripts@1.0.2
```
-If you previously had issues with an `Invalid Host Header` error, [follow these new instructions](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#invalid-host-header-errors-after-configuring-proxy) to fix it.
+If you previously had issues with an `Invalid Host Header` error, [follow these new instructions](https://github.com/facebook/create-react-app/blob/main/packages/react-scripts/template/README.md#invalid-host-header-errors-after-configuring-proxy) to fix it.
## 1.0.1 (May 19, 2017)
@@ -1547,7 +1547,7 @@ You can automatically convert your project to fix them by running the [correspon
#### 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.
+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](https://facebook.github.io/jest/blog/2017/05/06/jest-20-delightful-testing-multi-project-runner.html#breaking-changes) breaking changes for migration instructions.
If you use snapshots, you will likely need to update them once because of the change in format.
@@ -1572,7 +1572,7 @@ If you still have the problem please file an issue.
Unhandled Promise rejections will now crash tests. You can fix them by explicitly catching the errors you don’t care about.
-#### How to turn my app into a [Progressive Web App](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#making-a-progressive-web-app)?
+#### How to turn my app into a [Progressive Web App](https://github.com/facebook/create-react-app/blob/main/packages/react-scripts/template/README.md#making-a-progressive-web-app)?
After the regular update procedure above, add these line to `` in `public/index.html`:
@@ -1588,9 +1588,7 @@ After the regular update procedure above, add these line to `` in `public/
Add `
` to `` in `public/index.html`:
```html
-
- You need to enable JavaScript to run this app.
-
+ You need to enable JavaScript to run this app.
```
Then create a file called `public/manifest.json` that looks like this:
diff --git a/CHANGELOG-2.x.md b/CHANGELOG-2.x.md
index 5080171a165..ecc3d7e8592 100644
--- a/CHANGELOG-2.x.md
+++ b/CHANGELOG-2.x.md
@@ -823,7 +823,7 @@ import 'react-app-polyfill/ie9'; // For IE 9-11 support
import 'react-app-polyfill/ie11'; // For IE 11 support
```
-You can read more about [these polyfills here](https://github.com/facebook/create-react-app/tree/master/packages/react-app-polyfill).
+You can read more about [these polyfills here](https://github.com/facebook/create-react-app/tree/main/packages/react-app-polyfill).
### Dynamic `import()` of a CommonJS module now has a `.default` property
@@ -845,7 +845,7 @@ We previously allowed code splitting with a webpack-specific directive, `require
**Single Module**
```js
-require.ensure(['module-a'], function() {
+require.ensure(['module-a'], function () {
var a = require('module-a');
// ...
});
@@ -859,7 +859,7 @@ import('module-a').then(a => {
**Multiple Module**
```js
-require.ensure(['module-a', 'module-b'], function() {
+require.ensure(['module-a', 'module-b'], function () {
var a = require('module-a');
var b = require('module-b');
// ...
@@ -913,7 +913,7 @@ Next, create `src/setupProxy.js` and place the following contents in it:
```js
const proxy = require('http-proxy-middleware');
-module.exports = function(app) {
+module.exports = function (app) {
// ...
};
```
@@ -936,7 +936,7 @@ Place entries into `src/setupProxy.js` like so:
```js
const proxy = require('http-proxy-middleware');
-module.exports = function(app) {
+module.exports = function (app) {
app.use(proxy('/api', { target: 'http://localhost:5000/' }));
app.use(proxy('/*.svg', { target: 'http://localhost:5000/' }));
};
diff --git a/CHANGELOG-3.x.md b/CHANGELOG-3.x.md
index f73718f970c..53a1e638d23 100644
--- a/CHANGELOG-3.x.md
+++ b/CHANGELOG-3.x.md
@@ -330,7 +330,7 @@ v3.3.0 is a minor release that adds new features, including custom templates and
You can now create a new app using custom templates.
-We've published our existing templates as [`cra-template`](https://github.com/facebook/create-react-app/tree/master/packages/cra-template) and [`cra-template-typescript`](https://github.com/facebook/create-react-app/tree/master/packages/cra-template-typescript), but we expect to see many great templates from the community over the coming weeks.
+We've published our existing templates as [`cra-template`](https://github.com/facebook/create-react-app/tree/main/packages/cra-template) and [`cra-template-typescript`](https://github.com/facebook/create-react-app/tree/main/packages/cra-template-typescript), but we expect to see many great templates from the community over the coming weeks.
The below command shows how you can create a new app with `cra-template-typescript`.
diff --git a/CHANGELOG-4.x.md b/CHANGELOG-4.x.md
new file mode 100644
index 00000000000..8d32f878ccc
--- /dev/null
+++ b/CHANGELOG-4.x.md
@@ -0,0 +1,503 @@
+## 4.0.3 (2021-02-22)
+
+v4.0.3 is a maintenance release that includes minor bug fixes and dependency updates.
+
+#### :bug: Bug Fix
+
+- `react-scripts`
+ - [#10590](https://github.com/facebook/create-react-app/pull/10590) Upgrade eslint-webpack-plugin to fix opt-out flag ([@mrmckeb](https://github.com/mrmckeb))
+
+#### :house: Internal
+
+- `react-dev-utils`
+ - [#10412](https://github.com/facebook/create-react-app/pull/10412) update immer to 8.0.1 to address vulnerability ([@wclem4](https://github.com/wclem4))
+- `create-react-app`
+ - [#10384](https://github.com/facebook/create-react-app/pull/10384) tests: update test case to match the description ([@jamesgeorge007](https://github.com/jamesgeorge007))
+
+#### Committers: 4
+
+- Brody McKee ([@mrmckeb](https://github.com/mrmckeb))
+- Dion Woolley ([@Awarua-](https://github.com/Awarua-))
+- James George ([@jamesgeorge007](https://github.com/jamesgeorge007))
+- Walker Clem ([@wclem4](https://github.com/wclem4))
+
+# Migrating from 4.0.2 to 4.0.3
+
+Inside any created project that has not been ejected, run:
+
+```bash
+npm install --save --save-exact react-scripts@4.0.3
+```
+
+or
+
+```
+yarn add --exact react-scripts@4.0.3
+```
+
+## 4.0.2 (2021-02-03)
+
+v4.0.2 is a maintenance release that includes minor bug fixes and documentation updates.
+
+#### :rocket: New Feature
+
+- `react-scripts`
+ - [#8986](https://github.com/facebook/create-react-app/pull/8986) Add support for new BUILD_PATH advanced configuration variable ([@ajhyndman](https://github.com/ajhyndman))
+
+#### :bug: Bug Fix
+
+- `react-scripts`
+ - [#10170](https://github.com/facebook/create-react-app/pull/10170) Add opt-out for eslint-webpack-plugin ([@mrmckeb](https://github.com/mrmckeb))
+ - [#9872](https://github.com/facebook/create-react-app/pull/9872) fix(react-scripts): add missing peer dependency react and update react-refresh-webpack-plugin ([@merceyz](https://github.com/merceyz))
+ - [#9964](https://github.com/facebook/create-react-app/pull/9964) Add TypeScript 4.x as peerDependency to react-scripts ([@sheepsteak](https://github.com/sheepsteak))
+
+#### :nail_care: Enhancement
+
+- `react-scripts`
+ - [#9977](https://github.com/facebook/create-react-app/pull/9977) Move ESLint cache file into node_modules ([@ehsankhfr](https://github.com/ehsankhfr))
+ - [#9569](https://github.com/facebook/create-react-app/pull/9569) Improve vendor chunk names in development ([@jrr](https://github.com/jrr))
+
+#### :memo: Documentation
+
+- [#9473](https://github.com/facebook/create-react-app/pull/9473) docs: add missing override options for Jest config ([@tobiasbueschel](https://github.com/tobiasbueschel))
+- [#10314](https://github.com/facebook/create-react-app/pull/10314) Update using-the-public-folder.md ([@Avivhdr](https://github.com/Avivhdr))
+- [#10214](https://github.com/facebook/create-react-app/pull/10214) Remove references to Node 8 ([@ianschmitz](https://github.com/ianschmitz))
+
+#### :house: Internal
+
+- `react-scripts`
+ - [#10027](https://github.com/facebook/create-react-app/pull/10027) appTsConfig immutability handling by immer ([@josezone](https://github.com/josezone))
+- `create-react-app`
+ - [#10217](https://github.com/facebook/create-react-app/pull/10217) Fix CI tests ([@ianschmitz](https://github.com/ianschmitz))
+- `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#10091](https://github.com/facebook/create-react-app/pull/10091) Recovered some integration tests ([@maxsbelt](https://github.com/maxsbelt))
+
+#### :hammer: Underlying Tools
+
+- `react-scripts`
+ - [#10216](https://github.com/facebook/create-react-app/pull/10216) Revert "Update postcss packages" ([@ianschmitz](https://github.com/ianschmitz))
+ - [#9988](https://github.com/facebook/create-react-app/pull/9988) Upgrade sass-loader ([@ehsankhfr](https://github.com/ehsankhfr))
+ - [#10003](https://github.com/facebook/create-react-app/pull/10003) Update postcss packages ([@raix](https://github.com/raix))
+ - [#10213](https://github.com/facebook/create-react-app/pull/10213) Upgrade @svgr/webpack to fix build error ([@jabranr](https://github.com/jabranr))
+- `react-dev-utils`
+ - [#10198](https://github.com/facebook/create-react-app/pull/10198) remove chalk from formatWebpackMessages ([@jasonwilliams](https://github.com/jasonwilliams))
+- `cra-template-typescript`
+ - [#10141](https://github.com/facebook/create-react-app/pull/10141) chore: bump typescript version ([@trainto](https://github.com/trainto))
+- `cra-template-typescript`, `cra-template`
+ - [#10143](https://github.com/facebook/create-react-app/pull/10143) chore: bump web-vital dependency version ([@sahilpurav](https://github.com/sahilpurav))
+
+#### Committers: 15
+
+- Andrew Hyndman ([@ajhyndman](https://github.com/ajhyndman))
+- Aviv Hadar ([@Avivhdr](https://github.com/Avivhdr))
+- Brody McKee ([@mrmckeb](https://github.com/mrmckeb))
+- Chris Shepherd ([@sheepsteak](https://github.com/sheepsteak))
+- EhsanKhaki ([@ehsankhfr](https://github.com/ehsankhfr))
+- Hakjoon Sim ([@trainto](https://github.com/trainto))
+- Ian Schmitz ([@ianschmitz](https://github.com/ianschmitz))
+- Jabran Rafique⚡️ ([@jabranr](https://github.com/jabranr))
+- Jason Williams ([@jasonwilliams](https://github.com/jasonwilliams))
+- John Ruble ([@jrr](https://github.com/jrr))
+- Kristoffer K. ([@merceyz](https://github.com/merceyz))
+- Morten N.O. Nørgaard Henriksen ([@raix](https://github.com/raix))
+- Sahil Purav ([@sahilpurav](https://github.com/sahilpurav))
+- Sergey Makarov ([@maxsbelt](https://github.com/maxsbelt))
+- Tobias Büschel ([@tobiasbueschel](https://github.com/tobiasbueschel))
+- mad-jose ([@josezone](https://github.com/josezone))
+
+# Migrating from 4.0.1 to 4.0.2
+
+Inside any created project that has not been ejected, run:
+
+```bash
+npm install --save --save-exact react-scripts@4.0.2
+```
+
+or
+
+```
+yarn add --exact react-scripts@4.0.2
+```
+
+## 4.0.1 (2020-11-23)
+
+v4.0.1 is a maintenance release that includes minor bug fixes and documentation updates.
+
+#### :bug: Bug Fix
+
+- `react-scripts`
+ - [#9921](https://github.com/facebook/create-react-app/pull/9921) Fix noFallthroughCasesInSwitch/jsx object is not extensible ([@ryota-murakami](https://github.com/ryota-murakami))
+ - [#9869](https://github.com/facebook/create-react-app/pull/9869) Fix react-jsx error ([@benneq](https://github.com/benneq))
+ - [#9885](https://github.com/facebook/create-react-app/pull/9885) fix: `React is not defined` compilation error after ejected ([@n3tr](https://github.com/n3tr))
+ - [#9911](https://github.com/facebook/create-react-app/pull/9911) fix: slow recompile time ([@FezVrasta](https://github.com/FezVrasta))
+- `react-dev-utils`
+ - [#9884](https://github.com/facebook/create-react-app/pull/9884) fix: page doesn't get refreshed when FAST_REFRESH=false ([@n3tr](https://github.com/n3tr))
+
+#### :nail_care: Enhancement
+
+- `react-scripts`
+ - [#10048](https://github.com/facebook/create-react-app/pull/10048) Increase Workbox's maximumFileSizeToCacheInBytes ([@jeffposnick](https://github.com/jeffposnick))
+
+#### :memo: Documentation
+
+- [#10052](https://github.com/facebook/create-react-app/pull/10052) docs: add React Testing Library as a library requiring jsdom ([@anyulled](https://github.com/anyulled))
+
+#### :house: Internal
+
+- `create-react-app`, `react-dev-utils`, `react-scripts`
+ - [#10083](https://github.com/facebook/create-react-app/pull/10083) replace inquirer with prompts ([@EvanBacon](https://github.com/EvanBacon))
+- `cra-template-typescript`, `cra-template`, `react-scripts`
+ - [#9516](https://github.com/facebook/create-react-app/pull/9516) [ImgBot] Optimize images ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- Other
+ - [#9860](https://github.com/facebook/create-react-app/pull/9860) chore: Update .prettierrc ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+
+#### Committers: 9
+
+- Anyul Rivas ([@anyulled](https://github.com/anyulled))
+- Ben M ([@benneq](https://github.com/benneq))
+- Evan Bacon ([@EvanBacon](https://github.com/EvanBacon))
+- Federico Zivolo ([@FezVrasta](https://github.com/FezVrasta))
+- Jeffrey Posnick ([@jeffposnick](https://github.com/jeffposnick))
+- Jirat Ki. ([@n3tr](https://github.com/n3tr))
+- Michaël De Boey ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- Ryota Murakami ([@ryota-murakami](https://github.com/ryota-murakami))
+- sho90 ([@sho-t](https://github.com/sho-t))
+
+# Migrating from 4.0.0 to 4.0.1
+
+Inside any created project that has not been ejected, run:
+
+```bash
+npm install --save --save-exact react-scripts@4.0.1
+```
+
+or
+
+```
+yarn add --exact react-scripts@4.0.1
+```
+
+## 4.0.0 (2020-10-23)
+
+Create React App 4.0 is a major release with several new features, including support for Fast Refresh!
+
+Thanks to all the maintainers and contributors who worked so hard on this release! :raised_hands:
+
+# Highlights
+
+- Fast Refresh [#8582](https://github.com/facebook/create-react-app/pull/8582)
+- React 17 support
+ - New JSX transform [#9645](https://github.com/facebook/create-react-app/pull/9645)
+- TypeScript 4 support [#9734](https://github.com/facebook/create-react-app/pull/9734)
+- ESLint 7 [#8978](https://github.com/facebook/create-react-app/pull/8978)
+ - New Jest and React Testing Library rules [#8963](https://github.com/facebook/create-react-app/pull/8963)
+- Jest 26 [#8955](https://github.com/facebook/create-react-app/pull/8955)
+- PWA/workbox improvements
+ - Switch to the Workbox InjectManifest plugin [#9205](https://github.com/facebook/create-react-app/pull/9205)
+ - Now its own template so it can be released independently
+- Web Vitals support [#9116](https://github.com/facebook/create-react-app/pull/9116)
+
+# Migrating from 3.4.x to 4.0.0
+
+Inside any created project that has not been ejected, run:
+
+```bash
+npm install --save --save-exact react-scripts@4.0.0
+```
+
+or
+
+```
+yarn add --exact react-scripts@4.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
+
+Like any major release, `react-scripts@4.0.0` contains a number of breaking changes. We expect that they won't affect every user, but we recommend you look over this section to see if something is relevant to you. If we missed something, please file a new issue.
+
+### ESLint
+
+We've upgraded to ESLint 7 and added many new rules including some for Jest and React Testing Library as well as the `import/no-anonymous-default-export` rule. We've also upgraded `eslint-plugin-hooks` to version 4.0.0 and removed the `EXTEND_ESLINT` flag as it is no longer required to customize the ESLint config.
+
+### Jest
+
+We've upgraded to Jest 26 and now set `resetMocks` to `true` by default in the Jest config.
+
+### Service workers
+
+We've switched to the Workbox InjectManifest plugin and moved the PWA templates into their own [repository](https://github.com/cra-template/pwa).
+
+### Removed `typescript` flag and `NODE_PATH` support
+
+We've removed the deprecated `typescript` flag when creating a new app. Use `--template typescript` instead. We've also dropped deprecated `NODE_PATH` flag as this has been replaced by setting the base path in `jsconfig.json`.
+
+### Fix dotenv file loading order
+
+We've changed the loading order of env files to match the `dotenv` specification. See #9037 for more details.
+
+### Dropped Node 8 support
+
+Node 8 reached End-of-Life at the end of 2019 and is no longer supported.
+
+# Detailed Changelog
+
+#### :rocket: New Feature
+
+- `eslint-config-react-app`, `react-error-overlay`, `react-scripts`
+ - [#8963](https://github.com/facebook/create-react-app/pull/8963) feat(eslint-config-react-app): Add jest & testing-library rules ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- `react-scripts`
+ - [#9611](https://github.com/facebook/create-react-app/pull/9611) Add AVIF image support ([@Hongbo-Miao](https://github.com/Hongbo-Miao))
+ - [#9114](https://github.com/facebook/create-react-app/pull/9114) Allow testMatch for jest config ([@Favna](https://github.com/Favna))
+ - [#8790](https://github.com/facebook/create-react-app/pull/8790) Add back in --stats output from webpack. ([@samccone](https://github.com/samccone))
+ - [#8838](https://github.com/facebook/create-react-app/pull/8838) Support devDependencies in templates ([@mrmckeb](https://github.com/mrmckeb))
+- `create-react-app`
+ - [#9359](https://github.com/facebook/create-react-app/pull/9359) feat: exit on outdated create-react-app version ([@mrmckeb](https://github.com/mrmckeb))
+- `cra-template-typescript`, `cra-template`, `react-scripts`
+ - [#9205](https://github.com/facebook/create-react-app/pull/9205) Switch to the Workbox InjectManifest plugin ([@jeffposnick](https://github.com/jeffposnick))
+- `react-dev-utils`, `react-scripts`
+ - [#8582](https://github.com/facebook/create-react-app/pull/8582) Add experimental react-refresh support ([@charrondev](https://github.com/charrondev))
+
+#### :boom: Breaking Change
+
+- `eslint-config-react-app`, `react-error-overlay`, `react-scripts`
+ - [#8963](https://github.com/facebook/create-react-app/pull/8963) feat(eslint-config-react-app): Add jest & testing-library rules ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+ - [#8978](https://github.com/facebook/create-react-app/pull/8978) Support ESLint 7.x ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- `cra-template-typescript`, `cra-template`, `eslint-config-react-app`, `react-error-overlay`, `react-scripts`
+ - [#9587](https://github.com/facebook/create-react-app/pull/9587) Remove EXTEND_ESLINT and add Jest rules ([@mrmckeb](https://github.com/mrmckeb))
+- `eslint-config-react-app`
+ - [#9401](https://github.com/facebook/create-react-app/pull/9401) fix: remove deprecated rule ([@ljosberinn](https://github.com/ljosberinn))
+- `create-react-app`
+ - [#9359](https://github.com/facebook/create-react-app/pull/9359) feat: exit on outdated create-react-app version ([@mrmckeb](https://github.com/mrmckeb))
+- `cra-template-typescript`, `cra-template`, `react-scripts`
+ - [#9205](https://github.com/facebook/create-react-app/pull/9205) Switch to the Workbox InjectManifest plugin ([@jeffposnick](https://github.com/jeffposnick))
+- `babel-plugin-named-asset-import`, `confusing-browser-globals`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#8955](https://github.com/facebook/create-react-app/pull/8955) Upgrade to Jest 26 ([@ianschmitz](https://github.com/ianschmitz))
+- `create-react-app`, `react-scripts`
+ - [#8934](https://github.com/facebook/create-react-app/pull/8934) feat: remove typescript flag and NODE_PATH support ([@mrmckeb](https://github.com/mrmckeb))
+- `react-scripts`
+ - [#9037](https://github.com/facebook/create-react-app/pull/9037) Fix dotenv file loading order ([@Timer](https://github.com/Timer))
+ - [#7899](https://github.com/facebook/create-react-app/pull/7899) Set resetMocks to true by default in jest config ([@alexkrolick](https://github.com/alexkrolick))
+- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `create-react-app`, `react-app-polyfill`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#8950](https://github.com/facebook/create-react-app/pull/8950) Dependency major version upgrades ([@ianschmitz](https://github.com/ianschmitz))
+- `eslint-config-react-app`, `react-scripts`
+ - [#8926](https://github.com/facebook/create-react-app/pull/8926) Add import/no-anonymous-default-export lint rule ([@shakib609](https://github.com/shakib609))
+ - [#8939](https://github.com/facebook/create-react-app/pull/8939) Bump React Hooks ESLint plugin to 4.0.0 ([@gaearon](https://github.com/gaearon))
+- `cra-template-typescript`, `cra-template`, `create-react-app`, `react-app-polyfill`, `react-dev-utils`, `react-scripts`
+ - [#8948](https://github.com/facebook/create-react-app/pull/8948) Drop Node 8 support ([@ianschmitz](https://github.com/ianschmitz))
+- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `cra-template-typescript`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#8362](https://github.com/facebook/create-react-app/pull/8362) Upgrade to Jest 25 ([@skovhus](https://github.com/skovhus))
+
+#### :bug: Bug Fix
+
+- `react-scripts`
+ - [#9805](https://github.com/facebook/create-react-app/pull/9805) Fix refreshOverlayInterop module scope error ([@ianschmitz](https://github.com/ianschmitz))
+ - [#9037](https://github.com/facebook/create-react-app/pull/9037) Fix dotenv file loading order ([@Timer](https://github.com/Timer))
+ - [#8700](https://github.com/facebook/create-react-app/pull/8700) Skip stdin resuming to support lerna parallel ([@hieuxlu](https://github.com/hieuxlu))
+ - [#8845](https://github.com/facebook/create-react-app/pull/8845) Do not check for interactive session to shut down dev server ([@jeremywadsack](https://github.com/jeremywadsack))
+ - [#8768](https://github.com/facebook/create-react-app/pull/8768) Add .cjs and .mjs files support to test runner ([@ai](https://github.com/ai))
+- `babel-preset-react-app`, `eslint-config-react-app`, `react-scripts`
+ - [#9788](https://github.com/facebook/create-react-app/pull/9788) fix: resolve new JSX transform issues ([@mrmckeb](https://github.com/mrmckeb))
+- `eslint-config-react-app`, `react-scripts`
+ - [#9683](https://github.com/facebook/create-react-app/pull/9683) fix: resolve ESLint config from appPath ([@mrmckeb](https://github.com/mrmckeb))
+- `create-react-app`
+ - [#9412](https://github.com/facebook/create-react-app/pull/9412) Fix template name handling ([@iansu](https://github.com/iansu))
+- `babel-preset-react-app`
+ - [#9374](https://github.com/facebook/create-react-app/pull/9374) fix: use default modules option from `preset-env` ([@JLHwung](https://github.com/JLHwung))
+- `react-dev-utils`
+ - [#9390](https://github.com/facebook/create-react-app/pull/9390) Publish refreshOverlayInterop with react-dev-utils ([@klinem](https://github.com/klinem))
+ - [#8492](https://github.com/facebook/create-react-app/pull/8492) Replace period in CSS Module classnames ([@evankennedy](https://github.com/evankennedy))
+- `react-dev-utils`, `react-scripts`
+ - [#8694](https://github.com/facebook/create-react-app/pull/8694) Use process.execPath to spawn node subprocess ([@anuraaga](https://github.com/anuraaga))
+- `cra-template-typescript`, `cra-template`, `react-scripts`
+ - [#8734](https://github.com/facebook/create-react-app/pull/8734) fix: handle templates without main package field ([@mrmckeb](https://github.com/mrmckeb))
+
+#### :nail_care: Enhancement
+
+- `react-scripts`
+ - [#9734](https://github.com/facebook/create-react-app/pull/9734) Use new JSX setting with TypeScript 4.1.0 ([@iansu](https://github.com/iansu))
+ - [#8638](https://github.com/facebook/create-react-app/pull/8638) Support source maps for scss in dev environments ([@MKorostoff](https://github.com/MKorostoff))
+ - [#8834](https://github.com/facebook/create-react-app/pull/8834) Don't use webpack multi entry unnecessarily ([@sebmarkbage](https://github.com/sebmarkbage))
+- `babel-preset-react-app`, `eslint-config-react-app`, `react-scripts`
+ - [#9861](https://github.com/facebook/create-react-app/pull/9861) New JSX Transform opt out ([@iansu](https://github.com/iansu))
+- `cra-template`
+ - [#9853](https://github.com/facebook/create-react-app/pull/9853) feat: remove unused React imports ([@mrmckeb](https://github.com/mrmckeb))
+- `babel-preset-react-app`, `react-scripts`
+ - [#9645](https://github.com/facebook/create-react-app/pull/9645) Use new JSX transform with React 17 ([@iansu](https://github.com/iansu))
+- `react-dev-utils`, `react-scripts`
+ - [#9350](https://github.com/facebook/create-react-app/pull/9350) Add Fast Refresh warning when using React < 16.10 ([@iansu](https://github.com/iansu))
+- `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#9375](https://github.com/facebook/create-react-app/pull/9375) feat: better refresh plugin integration ([@pmmmwh](https://github.com/pmmmwh))
+- `cra-template-typescript`, `cra-template`
+ - [#9116](https://github.com/facebook/create-react-app/pull/9116) Add performance relayer + documentation (web-vitals) ([@housseindjirdeh](https://github.com/housseindjirdeh))
+ - [#8705](https://github.com/facebook/create-react-app/pull/8705) Update template tests ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- `create-react-app`
+ - [#8460](https://github.com/facebook/create-react-app/pull/8460) Fix --use-pnp for Yarn 2 ([@nickmccurdy](https://github.com/nickmccurdy))
+
+#### :memo: Documentation
+
+- Other
+ - [#9728](https://github.com/facebook/create-react-app/pull/9728) Upgrade Docusaurus to latest version ([@lex111](https://github.com/lex111))
+ - [#9630](https://github.com/facebook/create-react-app/pull/9630) Emphasise that Next.js is capable of SSG ([@liamness](https://github.com/liamness))
+ - [#9073](https://github.com/facebook/create-react-app/pull/9073) Update running-tests.md ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+ - [#9560](https://github.com/facebook/create-react-app/pull/9560) Update Vercel deployment documentation ([@timothyis](https://github.com/timothyis))
+ - [#9380](https://github.com/facebook/create-react-app/pull/9380) Update running-tests.md ([@andycanderson](https://github.com/andycanderson))
+ - [#9245](https://github.com/facebook/create-react-app/pull/9245) [Doc] fix React Testing Library example ([@sakito21](https://github.com/sakito21))
+ - [#9231](https://github.com/facebook/create-react-app/pull/9231) Clarify wording in adding TypeScript to existing project ([@merelinguist](https://github.com/merelinguist))
+ - [#8895](https://github.com/facebook/create-react-app/pull/8895) Fix chai URL ([@BMorearty](https://github.com/BMorearty))
+ - [#9042](https://github.com/facebook/create-react-app/pull/9042) Update deployment docs for Azure Static Web Apps ([@burkeholland](https://github.com/burkeholland))
+ - [#8246](https://github.com/facebook/create-react-app/pull/8246) Add a VSCode tip in the CSS reset section ([@maazadeeb](https://github.com/maazadeeb))
+ - [#8610](https://github.com/facebook/create-react-app/pull/8610) Update url to see prettier in action ([@M165437](https://github.com/M165437))
+ - [#8684](https://github.com/facebook/create-react-app/pull/8684) Simplify wording in setting-up-your-editor.md ([@coryhouse](https://github.com/coryhouse))
+ - [#8791](https://github.com/facebook/create-react-app/pull/8791) Add setupTests.js to the list of generated files ([@MostafaNawara](https://github.com/MostafaNawara))
+ - [#8763](https://github.com/facebook/create-react-app/pull/8763) Use simplified import of @testing-library/jest-dom ([@Dremora](https://github.com/Dremora))
+- `react-dev-utils`
+ - [#9471](https://github.com/facebook/create-react-app/pull/9471) Fixes in the /packages/react-devs-utils/README.md file ([@caspero-62](https://github.com/caspero-62))
+ - [#8651](https://github.com/facebook/create-react-app/pull/8651) Update build script deployment URL ([@StenAL](https://github.com/StenAL))
+- `cra-template-typescript`, `cra-template`
+ - [#9241](https://github.com/facebook/create-react-app/pull/9241) Updated README.md Templates to Follow ESLint Markdown Rules ([@firehawk09](https://github.com/firehawk09))
+ - [#8406](https://github.com/facebook/create-react-app/pull/8406) Upgrade testing-library packages ([@gnapse](https://github.com/gnapse))
+- `react-scripts`
+ - [#9244](https://github.com/facebook/create-react-app/pull/9244) Explain how to uninstall create-react-app globally ([@nickmccurdy](https://github.com/nickmccurdy))
+ - [#8838](https://github.com/facebook/create-react-app/pull/8838) Support devDependencies in templates ([@mrmckeb](https://github.com/mrmckeb))
+- `cra-template-typescript`, `cra-template`, `react-dev-utils`, `react-scripts`
+ - [#8957](https://github.com/facebook/create-react-app/pull/8957) Move shortlinks to cra.link ([@iansu](https://github.com/iansu))
+- `babel-preset-react-app`
+ - [#5847](https://github.com/facebook/create-react-app/pull/5847) Include absoluteRuntime in babel preset docs ([@iddan](https://github.com/iddan))
+
+#### :house: Internal
+
+- `eslint-config-react-app`
+ - [#9670](https://github.com/facebook/create-react-app/pull/9670) fix(eslint-config-react-app): Make eslint-plugin-jest an optional peerDependency ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- Other
+ - [#9258](https://github.com/facebook/create-react-app/pull/9258) fix: Fix azure-pipelines' endOfLine ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+ - [#9102](https://github.com/facebook/create-react-app/pull/9102) Replace Spectrum links with GitHub Discussions ([@iansu](https://github.com/iansu))
+ - [#8656](https://github.com/facebook/create-react-app/pull/8656) Bump acorn from 6.4.0 to 6.4.1 in /docusaurus/website ([@dependabot[bot]](https://github.com/apps/dependabot))
+ - [#8749](https://github.com/facebook/create-react-app/pull/8749) Specify what files are served form a bare local copy ([@challet](https://github.com/challet))
+- `cra-template-typescript`, `cra-template`
+ - [#9252](https://github.com/facebook/create-react-app/pull/9252) feat: Update testing-library dependencies to latest ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- `react-dev-utils`
+ - [#9059](https://github.com/facebook/create-react-app/pull/9059) clean formatMessage usage ([@chenxsan](https://github.com/chenxsan))
+- `cra-template`
+ - [#7787](https://github.com/facebook/create-react-app/pull/7787) Bump version of Verdaccio ([@ianschmitz](https://github.com/ianschmitz))
+- `babel-preset-react-app`
+ - [#8858](https://github.com/facebook/create-react-app/pull/8858) Remove outdated comment ([@availchet](https://github.com/availchet))
+- `react-scripts`
+ - [#8952](https://github.com/facebook/create-react-app/pull/8952) fix react-refresh babel plugin not applied ([@tanhauhau](https://github.com/tanhauhau))
+
+#### :hammer: Underlying Tools
+
+- `react-scripts`
+ - [#9865](https://github.com/facebook/create-react-app/pull/9865) Pass JSX runtime setting to Babel preset in Jest config ([@iansu](https://github.com/iansu))
+ - [#9841](https://github.com/facebook/create-react-app/pull/9841) Bump resolve-url-loader version ([@johannespfeiffer](https://github.com/johannespfeiffer))
+ - [#9348](https://github.com/facebook/create-react-app/pull/9348) Upgrade refresh plugin ([@ianschmitz](https://github.com/ianschmitz))
+ - [#8891](https://github.com/facebook/create-react-app/pull/8891) Bump style-loader to 1.2.1 ([@chybisov](https://github.com/chybisov))
+- `react-error-overlay`, `react-scripts`
+ - [#9863](https://github.com/facebook/create-react-app/pull/9863) Upgrade to React 17 ([@iansu](https://github.com/iansu))
+ - [#9856](https://github.com/facebook/create-react-app/pull/9856) feat: Update ESLint dependencies ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `cra-template-typescript`, `cra-template`, `create-react-app`, `eslint-config-react-app`, `react-app-polyfill`, `react-error-overlay`, `react-scripts`
+ - [#9857](https://github.com/facebook/create-react-app/pull/9857) feat: Update all dependencies ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- `eslint-config-react-app`, `react-dev-utils`, `react-scripts`
+ - [#9751](https://github.com/facebook/create-react-app/pull/9751) Replace deprecated eslint-loader by eslint-webpack-plugin ([@tooppaaa](https://github.com/tooppaaa))
+- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `cra-template-typescript`, `cra-template`, `create-react-app`, `eslint-config-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#9639](https://github.com/facebook/create-react-app/pull/9639) Upgrade dependencies ([@ianschmitz](https://github.com/ianschmitz))
+- `eslint-config-react-app`, `react-error-overlay`, `react-scripts`
+ - [#9434](https://github.com/facebook/create-react-app/pull/9434) feat: Update ESLint dependencies ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+ - [#9251](https://github.com/facebook/create-react-app/pull/9251) feat: Update ESLint dependencies ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+ - [#8978](https://github.com/facebook/create-react-app/pull/8978) Support ESLint 7.x ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- `cra-template-typescript`, `cra-template`
+ - [#9526](https://github.com/facebook/create-react-app/pull/9526) Update template dependencies to latest version ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+ - [#8406](https://github.com/facebook/create-react-app/pull/8406) Upgrade testing-library packages ([@gnapse](https://github.com/gnapse))
+- `react-app-polyfill`
+ - [#9392](https://github.com/facebook/create-react-app/pull/9392) Upgrade whatwg-fetch ([@Lapz](https://github.com/Lapz))
+- `react-dev-utils`
+ - [#8933](https://github.com/facebook/create-react-app/pull/8933) Bump immer version ([@staff0rd](https://github.com/staff0rd))
+- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#9317](https://github.com/facebook/create-react-app/pull/9317) Upgrade dependencies ([@ianschmitz](https://github.com/ianschmitz))
+- `babel-preset-react-app`, `cra-template-typescript`, `cra-template`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#9196](https://github.com/facebook/create-react-app/pull/9196) Upgrade dependencies ([@ianschmitz](https://github.com/ianschmitz))
+ - [#9132](https://github.com/facebook/create-react-app/pull/9132) Upgrade dependencies ([@ianschmitz](https://github.com/ianschmitz))
+- `babel-plugin-named-asset-import`, `confusing-browser-globals`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#8955](https://github.com/facebook/create-react-app/pull/8955) Upgrade to Jest 26 ([@ianschmitz](https://github.com/ianschmitz))
+- `babel-preset-react-app`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#9081](https://github.com/facebook/create-react-app/pull/9081) Update packages ([@ianschmitz](https://github.com/ianschmitz))
+ - [#8947](https://github.com/facebook/create-react-app/pull/8947) Minor/patch dependency upgrades ([@ianschmitz](https://github.com/ianschmitz))
+- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `create-react-app`, `react-app-polyfill`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#8950](https://github.com/facebook/create-react-app/pull/8950) Dependency major version upgrades ([@ianschmitz](https://github.com/ianschmitz))
+- `eslint-config-react-app`, `react-scripts`
+ - [#8939](https://github.com/facebook/create-react-app/pull/8939) Bump React Hooks ESLint plugin to 4.0.0 ([@gaearon](https://github.com/gaearon))
+- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `cra-template-typescript`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#8362](https://github.com/facebook/create-react-app/pull/8362) Upgrade to Jest 25 ([@skovhus](https://github.com/skovhus))
+
+#### Committers: 63
+
+- Adam Charron ([@charrondev](https://github.com/charrondev))
+- Alex Krolick ([@alexkrolick](https://github.com/alexkrolick))
+- Alexey Pyltsyn ([@lex111](https://github.com/lex111))
+- Andrey Sitnik ([@ai](https://github.com/ai))
+- Andy C ([@andycanderson](https://github.com/andycanderson))
+- Anuraag Agrawal ([@anuraaga](https://github.com/anuraaga))
+- Braedon Gough ([@braedongough](https://github.com/braedongough))
+- Brian Morearty ([@BMorearty](https://github.com/BMorearty))
+- Brody McKee ([@mrmckeb](https://github.com/mrmckeb))
+- Burke Holland ([@burkeholland](https://github.com/burkeholland))
+- Chetanya Kandhari ([@availchet](https://github.com/availchet))
+- Clément DUNGLER ([@tooppaaa](https://github.com/tooppaaa))
+- Clément Hallet ([@challet](https://github.com/challet))
+- Cory House ([@coryhouse](https://github.com/coryhouse))
+- Dan Abramov ([@gaearon](https://github.com/gaearon))
+- Dylan Brookes ([@merelinguist](https://github.com/merelinguist))
+- Ernesto García ([@gnapse](https://github.com/gnapse))
+- Eugene Chybisov ([@chybisov](https://github.com/chybisov))
+- Evan Kennedy ([@evankennedy](https://github.com/evankennedy))
+- Gerrit Alex ([@ljosberinn](https://github.com/ljosberinn))
+- Hieu Do ([@hieuxlu](https://github.com/hieuxlu))
+- Hongbo Miao ([@Hongbo-Miao](https://github.com/Hongbo-Miao))
+- Houssein Djirdeh ([@housseindjirdeh](https://github.com/housseindjirdeh))
+- Huáng Jùnliàng ([@JLHwung](https://github.com/JLHwung))
+- Ian Schmitz ([@ianschmitz](https://github.com/ianschmitz))
+- Ian Sutherland ([@iansu](https://github.com/iansu))
+- Iddan Aaronsohn ([@iddan](https://github.com/iddan))
+- Jakob Krigovsky ([@sonicdoe](https://github.com/sonicdoe))
+- Jeffrey Posnick ([@jeffposnick](https://github.com/jeffposnick))
+- Jeremy Wadsack ([@jeremywadsack](https://github.com/jeremywadsack))
+- Jeroen Claassens ([@Favna](https://github.com/Favna))
+- Joe Haddad ([@Timer](https://github.com/Timer))
+- Johannes Pfeiffer ([@johannespfeiffer](https://github.com/johannespfeiffer))
+- Josemaria Nriagu ([@josenriagu](https://github.com/josenriagu))
+- Kenneth Skovhus ([@skovhus](https://github.com/skovhus))
+- Kirill Korolyov ([@Dremora](https://github.com/Dremora))
+- Kline Moralee ([@klinem](https://github.com/klinem))
+- Lenard Pratt ([@Lapz](https://github.com/Lapz))
+- Liam Duffy ([@liamness](https://github.com/liamness))
+- Maaz Syed Adeeb ([@maazadeeb](https://github.com/maazadeeb))
+- Marc Hassan ([@mhassan1](https://github.com/mhassan1))
+- Matt Korostoff ([@MKorostoff](https://github.com/MKorostoff))
+- Michael Mok ([@pmmmwh](https://github.com/pmmmwh))
+- Michael Schmidt-Voigt ([@M165437](https://github.com/M165437))
+- Michaël De Boey ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- Minh Nguyen ([@NMinhNguyen](https://github.com/NMinhNguyen))
+- Mostafa Nawara ([@MostafaNawara](https://github.com/MostafaNawara))
+- Nick McCurdy ([@nickmccurdy](https://github.com/nickmccurdy))
+- Rafael Quijada ([@firehawk09](https://github.com/firehawk09))
+- Raihan Nismara ([@raihan71](https://github.com/raihan71))
+- Sakito Mukai ([@sakito21](https://github.com/sakito21))
+- Sam Chen ([@chenxsan](https://github.com/chenxsan))
+- Sam Saccone ([@samccone](https://github.com/samccone))
+- Sebastian Markbåge ([@sebmarkbage](https://github.com/sebmarkbage))
+- Shakib Hossain ([@shakib609](https://github.com/shakib609))
+- Simen Bekkhus ([@SimenB](https://github.com/SimenB))
+- Stafford Williams ([@staff0rd](https://github.com/staff0rd))
+- Sten Arthur Laane ([@StenAL](https://github.com/StenAL))
+- Tan Li Hau ([@tanhauhau](https://github.com/tanhauhau))
+- Timothy ([@timothyis](https://github.com/timothyis))
+- Tobias Büschel ([@tobiasbueschel](https://github.com/tobiasbueschel))
+- Webdot_30 ([@caspero-62](https://github.com/caspero-62))
+- [@atlanteh](https://github.com/atlanteh)
+
+## Releases Before 4.x
+
+Please refer to [CHANGELOG-3.x.md](./CHANGELOG-3.x.md) for earlier versions.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 472542ee341..28110503bc4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,466 +1,237 @@
-## 4.0.2 (2021-02-03)
+## 5.0.1 (2022-04-12)
-v4.0.2 is a maintenance release that includes minor bug fixes and documentation updates.
+Create React App 5.0.1 is a maintenance release that improves compatibility with React 18. We've also updated our templates to use `createRoot` and relaxed our check for older versions of Create React App.
-#### :rocket: New Feature
-
-- `react-scripts`
- - [#8986](https://github.com/facebook/create-react-app/pull/8986) Add support for new BUILD_PATH advanced configuration variable ([@ajhyndman](https://github.com/ajhyndman))
-
-#### :bug: Bug Fix
-
-- `react-scripts`
- - [#10170](https://github.com/facebook/create-react-app/pull/10170) Add opt-out for eslint-webpack-plugin ([@mrmckeb](https://github.com/mrmckeb))
- - [#9872](https://github.com/facebook/create-react-app/pull/9872) fix(react-scripts): add missing peer dependency react and update react-refresh-webpack-plugin ([@merceyz](https://github.com/merceyz))
- - [#9964](https://github.com/facebook/create-react-app/pull/9964) Add TypeScript 4.x as peerDependency to react-scripts ([@sheepsteak](https://github.com/sheepsteak))
-
-#### :nail_care: Enhancement
-
-- `react-scripts`
- - [#9977](https://github.com/facebook/create-react-app/pull/9977) Move ESLint cache file into node_modules ([@ehsankhfr](https://github.com/ehsankhfr))
- - [#9569](https://github.com/facebook/create-react-app/pull/9569) Improve vendor chunk names in development ([@jrr](https://github.com/jrr))
-
-#### :memo: Documentation
-
-- [#9473](https://github.com/facebook/create-react-app/pull/9473) docs: add missing override options for Jest config ([@tobiasbueschel](https://github.com/tobiasbueschel))
-- [#10314](https://github.com/facebook/create-react-app/pull/10314) Update using-the-public-folder.md ([@Avivhdr](https://github.com/Avivhdr))
-- [#10214](https://github.com/facebook/create-react-app/pull/10214) Remove references to Node 8 ([@ianschmitz](https://github.com/ianschmitz))
-
-#### :house: Internal
-
-- `react-scripts`
- - [#10027](https://github.com/facebook/create-react-app/pull/10027) appTsConfig immutability handling by immer ([@josezone](https://github.com/josezone))
-- `create-react-app`
- - [#10217](https://github.com/facebook/create-react-app/pull/10217) Fix CI tests ([@ianschmitz](https://github.com/ianschmitz))
-- `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#10091](https://github.com/facebook/create-react-app/pull/10091) Recovered some integration tests ([@maxsbelt](https://github.com/maxsbelt))
-
-#### :hammer: Underlying Tools
-
-- `react-scripts`
- - [#10216](https://github.com/facebook/create-react-app/pull/10216) Revert "Update postcss packages" ([@ianschmitz](https://github.com/ianschmitz))
- - [#9988](https://github.com/facebook/create-react-app/pull/9988) Upgrade sass-loader ([@ehsankhfr](https://github.com/ehsankhfr))
- - [#10003](https://github.com/facebook/create-react-app/pull/10003) Update postcss packages ([@raix](https://github.com/raix))
- - [#10213](https://github.com/facebook/create-react-app/pull/10213) Upgrade @svgr/webpack to fix build error ([@jabranr](https://github.com/jabranr))
-- `react-dev-utils`
- - [#10198](https://github.com/facebook/create-react-app/pull/10198) remove chalk from formatWebpackMessages ([@jasonwilliams](https://github.com/jasonwilliams))
-- `cra-template-typescript`
- - [#10141](https://github.com/facebook/create-react-app/pull/10141) chore: bump typescript version ([@trainto](https://github.com/trainto))
-- `cra-template-typescript`, `cra-template`
- - [#10143](https://github.com/facebook/create-react-app/pull/10143) chore: bump web-vital dependency version ([@sahilpurav](https://github.com/sahilpurav))
-
-#### Committers: 15
-
-- Andrew Hyndman ([@ajhyndman](https://github.com/ajhyndman))
-- Aviv Hadar ([@Avivhdr](https://github.com/Avivhdr))
-- Brody McKee ([@mrmckeb](https://github.com/mrmckeb))
-- Chris Shepherd ([@sheepsteak](https://github.com/sheepsteak))
-- EhsanKhaki ([@ehsankhfr](https://github.com/ehsankhfr))
-- Hakjoon Sim ([@trainto](https://github.com/trainto))
-- Ian Schmitz ([@ianschmitz](https://github.com/ianschmitz))
-- Jabran Rafique⚡️ ([@jabranr](https://github.com/jabranr))
-- Jason Williams ([@jasonwilliams](https://github.com/jasonwilliams))
-- John Ruble ([@jrr](https://github.com/jrr))
-- Kristoffer K. ([@merceyz](https://github.com/merceyz))
-- Morten N.O. Nørgaard Henriksen ([@raix](https://github.com/raix))
-- Sahil Purav ([@sahilpurav](https://github.com/sahilpurav))
-- Sergey Makarov ([@maxsbelt](https://github.com/maxsbelt))
-- Tobias Büschel ([@tobiasbueschel](https://github.com/tobiasbueschel))
-- mad-jose ([@josezone](https://github.com/josezone))
-
-# Migrating from 4.0.1 to 4.0.2
+# Migrating from 5.0.0 to 5.0.1
Inside any created project that has not been ejected, run:
-```bash
-npm install --save --save-exact react-scripts@4.0.2
+```
+npm install --save --save-exact react-scripts@5.0.1
```
or
```
-yarn add --exact react-scripts@4.0.2
+yarn add --exact react-scripts@5.0.1
```
-## 4.0.1 (2020-11-23)
-
-v4.0.1 is a maintenance release that includes minor bug fixes and documentation updates.
-
#### :bug: Bug Fix
- `react-scripts`
- - [#9921](https://github.com/facebook/create-react-app/pull/9921) Fix noFallthroughCasesInSwitch/jsx object is not extensible ([@ryota-murakami](https://github.com/ryota-murakami))
- - [#9869](https://github.com/facebook/create-react-app/pull/9869) Fix react-jsx error ([@benneq](https://github.com/benneq))
- - [#9885](https://github.com/facebook/create-react-app/pull/9885) fix: `React is not defined` compilation error after ejected ([@n3tr](https://github.com/n3tr))
- - [#9911](https://github.com/facebook/create-react-app/pull/9911) fix: slow recompile time ([@FezVrasta](https://github.com/FezVrasta))
+ - [#12245](https://github.com/facebook/create-react-app/pull/12245) fix: webpack noise printed only if error or warning ([@Andrew47](https://github.com/Andrew47))
+- `create-react-app`
+ - [#11915](https://github.com/facebook/create-react-app/pull/11915) Warn when not using the latest version of create-react-app but do not exit ([@iansu](https://github.com/iansu))
- `react-dev-utils`
- - [#9884](https://github.com/facebook/create-react-app/pull/9884) fix: page doesn't get refreshed when FAST_REFRESH=false ([@n3tr](https://github.com/n3tr))
+ - [#11640](https://github.com/facebook/create-react-app/pull/11640) Ensure posix compliant joins for urls in middleware ([@psiservices-justin-sullard](https://github.com/psiservices-justin-sullard))
#### :nail_care: Enhancement
-- `react-scripts`
- - [#10048](https://github.com/facebook/create-react-app/pull/10048) Increase Workbox's maximumFileSizeToCacheInBytes ([@jeffposnick](https://github.com/jeffposnick))
+- `cra-template-typescript`, `cra-template`, `react-scripts`
+ - [#12220](https://github.com/facebook/create-react-app/pull/12220) Update templates to use React 18 `createRoot` ([@kyletsang](https://github.com/kyletsang))
+- `cra-template-typescript`, `cra-template`
+ - [#12223](https://github.com/facebook/create-react-app/pull/12223) chore: upgrade rtl version to support react 18 ([@MatanBobi](https://github.com/MatanBobi))
+- `eslint-config-react-app`
+ - [#11622](https://github.com/facebook/create-react-app/pull/11622) updated deprecated rules ([@wisammechano](https://github.com/wisammechano))
#### :memo: Documentation
-- [#10052](https://github.com/facebook/create-react-app/pull/10052) docs: add React Testing Library as a library requiring jsdom ([@anyulled](https://github.com/anyulled))
+- [#11594](https://github.com/facebook/create-react-app/pull/11594) Fix a typo in deployment.md ([@fishmandev](https://github.com/fishmandev))
+- [#11805](https://github.com/facebook/create-react-app/pull/11805) docs: Changelog 5.0.0 ([@jafin](https://github.com/jafin))
+- [#11757](https://github.com/facebook/create-react-app/pull/11757) prevent both npm and yarn commands from being copied ([@mubarakn](https://github.com/mubarakn))
#### :house: Internal
-- `create-react-app`, `react-dev-utils`, `react-scripts`
- - [#10083](https://github.com/facebook/create-react-app/pull/10083) replace inquirer with prompts ([@EvanBacon](https://github.com/EvanBacon))
-- `cra-template-typescript`, `cra-template`, `react-scripts`
- - [#9516](https://github.com/facebook/create-react-app/pull/9516) [ImgBot] Optimize images ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
-- Other
- - [#9860](https://github.com/facebook/create-react-app/pull/9860) chore: Update .prettierrc ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+- [#11985](https://github.com/facebook/create-react-app/pull/11985) Ignore docs when publishing ([@iansu](https://github.com/iansu))
-#### Committers: 9
+#### Committers: 11
-- Anyul Rivas ([@anyulled](https://github.com/anyulled))
-- Ben M ([@benneq](https://github.com/benneq))
-- Evan Bacon ([@EvanBacon](https://github.com/EvanBacon))
-- Federico Zivolo ([@FezVrasta](https://github.com/FezVrasta))
-- Jeffrey Posnick ([@jeffposnick](https://github.com/jeffposnick))
-- Jirat Ki. ([@n3tr](https://github.com/n3tr))
-- Michaël De Boey ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
-- Ryota Murakami ([@ryota-murakami](https://github.com/ryota-murakami))
-- sho90 ([@sho-t](https://github.com/sho-t))
-
-# Migrating from 4.0.0 to 4.0.1
-
-Inside any created project that has not been ejected, run:
-
-```bash
-npm install --save --save-exact react-scripts@4.0.1
-```
-
-or
-
-```
-yarn add --exact react-scripts@4.0.1
-```
+- Andrew Burnie ([@Andrew47](https://github.com/Andrew47))
+- Clément Vannicatte ([@shortcuts](https://github.com/shortcuts))
+- Dmitriy Fishman ([@fishmandev](https://github.com/fishmandev))
+- Dmitry Vinnik ([@dmitryvinn](https://github.com/dmitryvinn))
+- Ian Sutherland ([@iansu](https://github.com/iansu))
+- Jason Finch ([@jafin](https://github.com/jafin))
+- Kyle Tsang ([@kyletsang](https://github.com/kyletsang))
+- Matan Borenkraout ([@MatanBobi](https://github.com/MatanBobi))
+- Wisam Naji ([@wisammechano](https://github.com/wisammechano))
+- [@mubarakn](https://github.com/mubarakn)
+- [@psiservices-justin-sullard](https://github.com/psiservices-justin-sullard)
-## 4.0.0 (2020-10-23)
+## 5.0.0 (2021-12-14)
-Create React App 4.0 is a major release with several new features, including support for Fast Refresh!
+Create React App 5.0 is a major release with several new features and the latest version of all major dependencies.
-Thanks to all the maintainers and contributors who worked so hard on this release! :raised_hands:
+Thanks to all the maintainers and contributors who worked so hard on this release! 🙌
# Highlights
-- Fast Refresh [#8582](https://github.com/facebook/create-react-app/pull/8582)
-- React 17 support
- - New JSX transform [#9645](https://github.com/facebook/create-react-app/pull/9645)
-- TypeScript 4 support [#9734](https://github.com/facebook/create-react-app/pull/9734)
-- ESLint 7 [#8978](https://github.com/facebook/create-react-app/pull/8978)
- - New Jest and React Testing Library rules [#8963](https://github.com/facebook/create-react-app/pull/8963)
-- Jest 26 [#8955](https://github.com/facebook/create-react-app/pull/8955)
-- PWA/workbox improvements
- - Switch to the Workbox InjectManifest plugin [#9205](https://github.com/facebook/create-react-app/pull/9205)
- - Now its own template so it can be released independently
-- Web Vitals support [#9116](https://github.com/facebook/create-react-app/pull/9116)
+- webpack 5 ([#11201](https://github.com/facebook/create-react-app/pull/11201))
+- Jest 27 ([#11338](<(https://github.com/facebook/create-react-app/pull/11338)>))
+- ESLint 8 ([#11375](<(https://github.com/facebook/create-react-app/pull/11375)>))
+- PostCSS 8 ([#11121](<(https://github.com/facebook/create-react-app/pull/11121)>))
+- Fast Refresh improvements and bug fixes ([#11105](https://github.com/facebook/create-react-app/pull/11105))
+- Support for Tailwind ([#11717](https://github.com/facebook/create-react-app/pull/11717))
+- Improved package manager detection ([#11322](https://github.com/facebook/create-react-app/pull/11322))
+- Unpinned all dependencies for better compatibility with other tools ([#11474](https://github.com/facebook/create-react-app/pull/11474))
+- Dropped support for Node 10 and 12
-# Migrating from 3.4.x to 4.0.0
+# Migrating from 4.0.x to 5.0.0
Inside any created project that has not been ejected, run:
-```bash
-npm install --save --save-exact react-scripts@4.0.0
+```
+npm install --save --save-exact react-scripts@5.0.0
```
or
```
-yarn add --exact react-scripts@4.0.0
+yarn add --exact react-scripts@5.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.**
+**NOTE: You may need to delete your node_modules folder and reinstall your dependencies by running npm install (or yarn) 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
+# Breaking Changes
-Like any major release, `react-scripts@4.0.0` contains a number of breaking changes. We expect that they won't affect every user, but we recommend you look over this section to see if something is relevant to you. If we missed something, please file a new issue.
+Like any major release, `react-scripts@5.0.0` contains a number of breaking changes. We expect that they won't affect every user, but we recommend you look over this section to see if something is relevant to you. If we missed something, please file a new issue.
-### ESLint
+Dropped support for Node 10 and 12
+Node 10 reached End-of-Life in April 2021 and Node 12 will be End-of-Life in April 2022. Going forward we will only support the latest LTS release of Node.js.
-We've upgraded to ESLint 7 and added many new rules including some for Jest and React Testing Library as well as the `import/no-anonymous-default-export` rule. We've also upgraded `eslint-plugin-hooks` to version 4.0.0 and removed the `EXTEND_ESLINT` flag as it is no longer required to customize the ESLint config.
-
-### Jest
-
-We've upgraded to Jest 26 and now set `resetMocks` to `true` by default in the Jest config.
-
-### Service workers
-
-We've switched to the Workbox InjectManifest plugin and moved the PWA templates into their own [repository](https://github.com/cra-template/pwa).
-
-### Removed `typescript` flag and `NODE_PATH` support
-
-We've removed the deprecated `typescript` flag when creating a new app. Use `--template typescript` instead. We've also dropped deprecated `NODE_PATH` flag as this has been replaced by setting the base path in `jsconfig.json`.
-
-### Fix dotenv file loading order
-
-We've changed the loading order of env files to match the `dotenv` specification. See #9037 for more details.
-
-### Dropped Node 8 support
-
-Node 8 reached End-of-Life at the end of 2019 and is no longer supported.
-
-# Detailed Changelog
-
-#### :rocket: New Feature
-
-- `eslint-config-react-app`, `react-error-overlay`, `react-scripts`
- - [#8963](https://github.com/facebook/create-react-app/pull/8963) feat(eslint-config-react-app): Add jest & testing-library rules ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
-- `react-scripts`
- - [#9611](https://github.com/facebook/create-react-app/pull/9611) Add AVIF image support ([@Hongbo-Miao](https://github.com/Hongbo-Miao))
- - [#9114](https://github.com/facebook/create-react-app/pull/9114) Allow testMatch for jest config ([@Favna](https://github.com/Favna))
- - [#8790](https://github.com/facebook/create-react-app/pull/8790) Add back in --stats output from webpack. ([@samccone](https://github.com/samccone))
- - [#8838](https://github.com/facebook/create-react-app/pull/8838) Support devDependencies in templates ([@mrmckeb](https://github.com/mrmckeb))
-- `create-react-app`
- - [#9359](https://github.com/facebook/create-react-app/pull/9359) feat: exit on outdated create-react-app version ([@mrmckeb](https://github.com/mrmckeb))
-- `cra-template-typescript`, `cra-template`, `react-scripts`
- - [#9205](https://github.com/facebook/create-react-app/pull/9205) Switch to the Workbox InjectManifest plugin ([@jeffposnick](https://github.com/jeffposnick))
-- `react-dev-utils`, `react-scripts`
- - [#8582](https://github.com/facebook/create-react-app/pull/8582) Add experimental react-refresh support ([@charrondev](https://github.com/charrondev))
+# Full Changelog
#### :boom: Breaking Change
-- `eslint-config-react-app`, `react-error-overlay`, `react-scripts`
- - [#8963](https://github.com/facebook/create-react-app/pull/8963) feat(eslint-config-react-app): Add jest & testing-library rules ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
- - [#8978](https://github.com/facebook/create-react-app/pull/8978) Support ESLint 7.x ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
-- `cra-template-typescript`, `cra-template`, `eslint-config-react-app`, `react-error-overlay`, `react-scripts`
- - [#9587](https://github.com/facebook/create-react-app/pull/9587) Remove EXTEND_ESLINT and add Jest rules ([@mrmckeb](https://github.com/mrmckeb))
-- `eslint-config-react-app`
- - [#9401](https://github.com/facebook/create-react-app/pull/9401) fix: remove deprecated rule ([@ljosberinn](https://github.com/ljosberinn))
- `create-react-app`
- - [#9359](https://github.com/facebook/create-react-app/pull/9359) feat: exit on outdated create-react-app version ([@mrmckeb](https://github.com/mrmckeb))
-- `cra-template-typescript`, `cra-template`, `react-scripts`
- - [#9205](https://github.com/facebook/create-react-app/pull/9205) Switch to the Workbox InjectManifest plugin ([@jeffposnick](https://github.com/jeffposnick))
-- `babel-plugin-named-asset-import`, `confusing-browser-globals`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#8955](https://github.com/facebook/create-react-app/pull/8955) Upgrade to Jest 26 ([@ianschmitz](https://github.com/ianschmitz))
-- `create-react-app`, `react-scripts`
- - [#8934](https://github.com/facebook/create-react-app/pull/8934) feat: remove typescript flag and NODE_PATH support ([@mrmckeb](https://github.com/mrmckeb))
+ - [#11322](https://github.com/facebook/create-react-app/pull/11322) Use env var to detect yarn or npm as the package manager ([@lukekarrys](https://github.com/lukekarrys))
+- `babel-preset-react-app`, `cra-template-typescript`, `cra-template`, `create-react-app`, `eslint-config-react-app`, `react-app-polyfill`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#11201](https://github.com/facebook/create-react-app/pull/11201) Webpack 5 ([@raix](https://github.com/raix))
+- `eslint-config-react-app`, `react-error-overlay`, `react-scripts`
+ - [#10761](https://github.com/facebook/create-react-app/pull/10761) chore: migrate to @babel/eslint-parser ([@JLHwung](https://github.com/JLHwung))
- `react-scripts`
- - [#9037](https://github.com/facebook/create-react-app/pull/9037) Fix dotenv file loading order ([@Timer](https://github.com/Timer))
- - [#7899](https://github.com/facebook/create-react-app/pull/7899) Set resetMocks to true by default in jest config ([@alexkrolick](https://github.com/alexkrolick))
-- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `create-react-app`, `react-app-polyfill`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#8950](https://github.com/facebook/create-react-app/pull/8950) Dependency major version upgrades ([@ianschmitz](https://github.com/ianschmitz))
-- `eslint-config-react-app`, `react-scripts`
- - [#8926](https://github.com/facebook/create-react-app/pull/8926) Add import/no-anonymous-default-export lint rule ([@shakib609](https://github.com/shakib609))
- - [#8939](https://github.com/facebook/create-react-app/pull/8939) Bump React Hooks ESLint plugin to 4.0.0 ([@gaearon](https://github.com/gaearon))
-- `cra-template-typescript`, `cra-template`, `create-react-app`, `react-app-polyfill`, `react-dev-utils`, `react-scripts`
- - [#8948](https://github.com/facebook/create-react-app/pull/8948) Drop Node 8 support ([@ianschmitz](https://github.com/ianschmitz))
-- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `cra-template-typescript`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#8362](https://github.com/facebook/create-react-app/pull/8362) Upgrade to Jest 25 ([@skovhus](https://github.com/skovhus))
+ - [#11188](https://github.com/facebook/create-react-app/pull/11188) Deprecate root level template.json keys ([@mrmckeb](https://github.com/mrmckeb))
#### :bug: Bug Fix
- `react-scripts`
- - [#9805](https://github.com/facebook/create-react-app/pull/9805) Fix refreshOverlayInterop module scope error ([@ianschmitz](https://github.com/ianschmitz))
- - [#9037](https://github.com/facebook/create-react-app/pull/9037) Fix dotenv file loading order ([@Timer](https://github.com/Timer))
- - [#8700](https://github.com/facebook/create-react-app/pull/8700) Skip stdin resuming to support lerna parallel ([@hieuxlu](https://github.com/hieuxlu))
- - [#8845](https://github.com/facebook/create-react-app/pull/8845) Do not check for interactive session to shut down dev server ([@jeremywadsack](https://github.com/jeremywadsack))
- - [#8768](https://github.com/facebook/create-react-app/pull/8768) Add .cjs and .mjs files support to test runner ([@ai](https://github.com/ai))
-- `babel-preset-react-app`, `eslint-config-react-app`, `react-scripts`
- - [#9788](https://github.com/facebook/create-react-app/pull/9788) fix: resolve new JSX transform issues ([@mrmckeb](https://github.com/mrmckeb))
-- `eslint-config-react-app`, `react-scripts`
- - [#9683](https://github.com/facebook/create-react-app/pull/9683) fix: resolve ESLint config from appPath ([@mrmckeb](https://github.com/mrmckeb))
-- `create-react-app`
- - [#9412](https://github.com/facebook/create-react-app/pull/9412) Fix template name handling ([@iansu](https://github.com/iansu))
-- `babel-preset-react-app`
- - [#9374](https://github.com/facebook/create-react-app/pull/9374) fix: use default modules option from `preset-env` ([@JLHwung](https://github.com/JLHwung))
-- `react-dev-utils`
- - [#9390](https://github.com/facebook/create-react-app/pull/9390) Publish refreshOverlayInterop with react-dev-utils ([@klinem](https://github.com/klinem))
- - [#8492](https://github.com/facebook/create-react-app/pull/8492) Replace period in CSS Module classnames ([@evankennedy](https://github.com/evankennedy))
-- `react-dev-utils`, `react-scripts`
- - [#8694](https://github.com/facebook/create-react-app/pull/8694) Use process.execPath to spawn node subprocess ([@anuraaga](https://github.com/anuraaga))
-- `cra-template-typescript`, `cra-template`, `react-scripts`
- - [#8734](https://github.com/facebook/create-react-app/pull/8734) fix: handle templates without main package field ([@mrmckeb](https://github.com/mrmckeb))
+ - [#11413](https://github.com/facebook/create-react-app/pull/11413) fix(webpackDevServer): disable overlay for warnings ([@jawadsh123](https://github.com/jawadsh123))
+ - [#10511](https://github.com/facebook/create-react-app/pull/10511) Fix ICSS syntax in stylesheets ([@thabemmz](https://github.com/thabemmz))
#### :nail_care: Enhancement
- `react-scripts`
- - [#9734](https://github.com/facebook/create-react-app/pull/9734) Use new JSX setting with TypeScript 4.1.0 ([@iansu](https://github.com/iansu))
- - [#8638](https://github.com/facebook/create-react-app/pull/8638) Support source maps for scss in dev environments ([@MKorostoff](https://github.com/MKorostoff))
- - [#8834](https://github.com/facebook/create-react-app/pull/8834) Don't use webpack multi entry unnecessarily ([@sebmarkbage](https://github.com/sebmarkbage))
-- `babel-preset-react-app`, `eslint-config-react-app`, `react-scripts`
- - [#9861](https://github.com/facebook/create-react-app/pull/9861) New JSX Transform opt out ([@iansu](https://github.com/iansu))
-- `cra-template`
- - [#9853](https://github.com/facebook/create-react-app/pull/9853) feat: remove unused React imports ([@mrmckeb](https://github.com/mrmckeb))
-- `babel-preset-react-app`, `react-scripts`
- - [#9645](https://github.com/facebook/create-react-app/pull/9645) Use new JSX transform with React 17 ([@iansu](https://github.com/iansu))
-- `react-dev-utils`, `react-scripts`
- - [#9350](https://github.com/facebook/create-react-app/pull/9350) Add Fast Refresh warning when using React < 16.10 ([@iansu](https://github.com/iansu))
-- `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#9375](https://github.com/facebook/create-react-app/pull/9375) feat: better refresh plugin integration ([@pmmmwh](https://github.com/pmmmwh))
-- `cra-template-typescript`, `cra-template`
- - [#9116](https://github.com/facebook/create-react-app/pull/9116) Add performance relayer + documentation (web-vitals) ([@housseindjirdeh](https://github.com/housseindjirdeh))
- - [#8705](https://github.com/facebook/create-react-app/pull/8705) Update template tests ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
+ - [#11717](https://github.com/facebook/create-react-app/pull/11717) Add support for Tailwind ([@iansu](https://github.com/iansu))
+ - [#8227](https://github.com/facebook/create-react-app/pull/8227) Add source-map-loader for debugging into original source of node_modules libraries that contain sourcemaps ([@justingrant](https://github.com/justingrant))
+ - [#10499](https://github.com/facebook/create-react-app/pull/10499) Remove ESLint verification when opting-out ([@mrmckeb](https://github.com/mrmckeb))
+- `eslint-config-react-app`, `react-error-overlay`, `react-scripts`
+ - [#11375](https://github.com/facebook/create-react-app/pull/11375) feat(eslint-config-react-app): support ESLint 8.x ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
- `create-react-app`
- - [#8460](https://github.com/facebook/create-react-app/pull/8460) Fix --use-pnp for Yarn 2 ([@nickmccurdy](https://github.com/nickmccurdy))
+ - [#11322](https://github.com/facebook/create-react-app/pull/11322) Use env var to detect yarn or npm as the package manager ([@lukekarrys](https://github.com/lukekarrys))
+ - [#11057](https://github.com/facebook/create-react-app/pull/11057) Coerce Node versions with metadata ([@mrmckeb](https://github.com/mrmckeb))
+- `react-dev-utils`
+ - [#11105](https://github.com/facebook/create-react-app/pull/11105) fix: fast refresh stops on needed bail outs ([@pmmmwh](https://github.com/pmmmwh))
+ - [#10205](https://github.com/facebook/create-react-app/pull/10205) Update ModuleNotFoundPlugin to support Webpack 5 ([@raix](https://github.com/raix))
+- `create-react-app`, `react-scripts`
+ - [#11176](https://github.com/facebook/create-react-app/pull/11176) Run npm with --no-audit ([@gaearon](https://github.com/gaearon))
#### :memo: Documentation
- Other
- - [#9728](https://github.com/facebook/create-react-app/pull/9728) Upgrade Docusaurus to latest version ([@lex111](https://github.com/lex111))
- - [#9630](https://github.com/facebook/create-react-app/pull/9630) Emphasise that Next.js is capable of SSG ([@liamness](https://github.com/liamness))
- - [#9073](https://github.com/facebook/create-react-app/pull/9073) Update running-tests.md ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
- - [#9560](https://github.com/facebook/create-react-app/pull/9560) Update Vercel deployment documentation ([@timothyis](https://github.com/timothyis))
- - [#9380](https://github.com/facebook/create-react-app/pull/9380) Update running-tests.md ([@andycanderson](https://github.com/andycanderson))
- - [#9245](https://github.com/facebook/create-react-app/pull/9245) [Doc] fix React Testing Library example ([@sakito21](https://github.com/sakito21))
- - [#9231](https://github.com/facebook/create-react-app/pull/9231) Clarify wording in adding TypeScript to existing project ([@merelinguist](https://github.com/merelinguist))
- - [#8895](https://github.com/facebook/create-react-app/pull/8895) Fix chai URL ([@BMorearty](https://github.com/BMorearty))
- - [#9042](https://github.com/facebook/create-react-app/pull/9042) Update deployment docs for Azure Static Web Apps ([@burkeholland](https://github.com/burkeholland))
- - [#8246](https://github.com/facebook/create-react-app/pull/8246) Add a VSCode tip in the CSS reset section ([@maazadeeb](https://github.com/maazadeeb))
- - [#8610](https://github.com/facebook/create-react-app/pull/8610) Update url to see prettier in action ([@M165437](https://github.com/M165437))
- - [#8684](https://github.com/facebook/create-react-app/pull/8684) Simplify wording in setting-up-your-editor.md ([@coryhouse](https://github.com/coryhouse))
- - [#8791](https://github.com/facebook/create-react-app/pull/8791) Add setupTests.js to the list of generated files ([@MostafaNawara](https://github.com/MostafaNawara))
- - [#8763](https://github.com/facebook/create-react-app/pull/8763) Use simplified import of @testing-library/jest-dom ([@Dremora](https://github.com/Dremora))
+ - [#11619](https://github.com/facebook/create-react-app/pull/11619) The default port used by `serve` has changed ([@leo](https://github.com/leo))
+ - [#10907](https://github.com/facebook/create-react-app/pull/10907) Fix link address ([@e-w-h](https://github.com/e-w-h))
+ - [#10805](https://github.com/facebook/create-react-app/pull/10805) Update PWA docs to point at the cra-template-pwa package ([@slieschke](https://github.com/slieschke))
+ - [#10631](https://github.com/facebook/create-react-app/pull/10631) Update IMAGE_INLINE_SIZE_LIMIT docs ([@ianschmitz](https://github.com/ianschmitz))
+- `eslint-config-react-app`
+ - [#10317](https://github.com/facebook/create-react-app/pull/10317) eslint-config-react-app typo fix ([@Spacerat](https://github.com/Spacerat))
- `react-dev-utils`
- - [#9471](https://github.com/facebook/create-react-app/pull/9471) Fixes in the /packages/react-devs-utils/README.md file ([@caspero-62](https://github.com/caspero-62))
- - [#8651](https://github.com/facebook/create-react-app/pull/8651) Update build script deployment URL ([@StenAL](https://github.com/StenAL))
-- `cra-template-typescript`, `cra-template`
- - [#9241](https://github.com/facebook/create-react-app/pull/9241) Updated README.md Templates to Follow ESLint Markdown Rules ([@firehawk09](https://github.com/firehawk09))
- - [#8406](https://github.com/facebook/create-react-app/pull/8406) Upgrade testing-library packages ([@gnapse](https://github.com/gnapse))
-- `react-scripts`
- - [#9244](https://github.com/facebook/create-react-app/pull/9244) Explain how to uninstall create-react-app globally ([@nickmccurdy](https://github.com/nickmccurdy))
- - [#8838](https://github.com/facebook/create-react-app/pull/8838) Support devDependencies in templates ([@mrmckeb](https://github.com/mrmckeb))
-- `cra-template-typescript`, `cra-template`, `react-dev-utils`, `react-scripts`
- - [#8957](https://github.com/facebook/create-react-app/pull/8957) Move shortlinks to cra.link ([@iansu](https://github.com/iansu))
-- `babel-preset-react-app`
- - [#5847](https://github.com/facebook/create-react-app/pull/5847) Include absoluteRuntime in babel preset docs ([@iddan](https://github.com/iddan))
+ - [#10779](https://github.com/facebook/create-react-app/pull/10779) Suggest sass instead of node-sass package ([@andrewywong](https://github.com/andrewywong))
+- `babel-preset-react-app`, `eslint-config-react-app`
+ - [#10288](https://github.com/facebook/create-react-app/pull/10288) Upgrade docs http links to https ([@xom9ikk](https://github.com/xom9ikk))
+- `cra-template`
+ - [#10763](https://github.com/facebook/create-react-app/pull/10763) Trivial English fixes ([@ujihisa](https://github.com/ujihisa))
#### :house: Internal
-- `eslint-config-react-app`
- - [#9670](https://github.com/facebook/create-react-app/pull/9670) fix(eslint-config-react-app): Make eslint-plugin-jest an optional peerDependency ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
- Other
- - [#9258](https://github.com/facebook/create-react-app/pull/9258) fix: Fix azure-pipelines' endOfLine ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
- - [#9102](https://github.com/facebook/create-react-app/pull/9102) Replace Spectrum links with GitHub Discussions ([@iansu](https://github.com/iansu))
- - [#8656](https://github.com/facebook/create-react-app/pull/8656) Bump acorn from 6.4.0 to 6.4.1 in /docusaurus/website ([@dependabot[bot]](https://github.com/apps/dependabot))
- - [#8749](https://github.com/facebook/create-react-app/pull/8749) Specify what files are served form a bare local copy ([@challet](https://github.com/challet))
-- `cra-template-typescript`, `cra-template`
- - [#9252](https://github.com/facebook/create-react-app/pull/9252) feat: Update testing-library dependencies to latest ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
-- `react-dev-utils`
- - [#9059](https://github.com/facebook/create-react-app/pull/9059) clean formatMessage usage ([@chenxsan](https://github.com/chenxsan))
-- `cra-template`
- - [#7787](https://github.com/facebook/create-react-app/pull/7787) Bump version of Verdaccio ([@ianschmitz](https://github.com/ianschmitz))
-- `babel-preset-react-app`
- - [#8858](https://github.com/facebook/create-react-app/pull/8858) Remove outdated comment ([@availchet](https://github.com/availchet))
+ - [#11723](https://github.com/facebook/create-react-app/pull/11723) chore(test): make all tests install with `npm ci` ([@lukekarrys](https://github.com/lukekarrys))
+ - [#11686](https://github.com/facebook/create-react-app/pull/11686) [WIP] Fix integration test teardown / cleanup and missing yarn installation ([@raix](https://github.com/raix))
+ - [#11252](https://github.com/facebook/create-react-app/pull/11252) Remove package-lock.json ([@Methuselah96](https://github.com/Methuselah96))
+- `create-react-app`
+ - [#11706](https://github.com/facebook/create-react-app/pull/11706) Remove cached lockfile ([@lukekarrys](https://github.com/lukekarrys))
+- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `create-react-app`, `react-app-polyfill`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#11624](https://github.com/facebook/create-react-app/pull/11624) Update all dependencies ([@jd1048576](https://github.com/jd1048576))
- `react-scripts`
- - [#8952](https://github.com/facebook/create-react-app/pull/8952) fix react-refresh babel plugin not applied ([@tanhauhau](https://github.com/tanhauhau))
+ - [#11597](https://github.com/facebook/create-react-app/pull/11597) Update package.json ([@HADMARINE](https://github.com/HADMARINE))
+ - [#11292](https://github.com/facebook/create-react-app/pull/11292) fix: dependency issue after workbox-webpack-plugin 6.2 release ([@fguitton](https://github.com/fguitton))
+ - [#11188](https://github.com/facebook/create-react-app/pull/11188) Deprecate root level template.json keys ([@mrmckeb](https://github.com/mrmckeb))
+ - [#10784](https://github.com/facebook/create-react-app/pull/10784) Remove outdated comments on react-refresh ([@luk3kang](https://github.com/luk3kang))
+- `babel-plugin-named-asset-import`, `confusing-browser-globals`, `create-react-app`, `eslint-config-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#11474](https://github.com/facebook/create-react-app/pull/11474) Remove dependency pinning ([@mrmckeb](https://github.com/mrmckeb))
+- `confusing-browser-globals`, `cra-template-typescript`, `cra-template`, `create-react-app`
+ - [#11415](https://github.com/facebook/create-react-app/pull/11415) Bump template dependency version ([@shfshanyue](https://github.com/shfshanyue))
+- `react-error-overlay`, `react-scripts`
+ - [#11304](https://github.com/facebook/create-react-app/pull/11304) Use npm v7 with workspaces for local development and testing ([@lukekarrys](https://github.com/lukekarrys))
+- `babel-preset-react-app`, `cra-template-typescript`, `cra-template`, `create-react-app`, `eslint-config-react-app`, `react-app-polyfill`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#11201](https://github.com/facebook/create-react-app/pull/11201) Webpack 5 ([@raix](https://github.com/raix))
#### :hammer: Underlying Tools
+- `react-dev-utils`, `react-scripts`
+ - [#11476](https://github.com/facebook/create-react-app/pull/11476) Bump browserslist from 4.14.2 to 4.16.5 ([@dependabot[bot]](https://github.com/apps/dependabot))
- `react-scripts`
- - [#9865](https://github.com/facebook/create-react-app/pull/9865) Pass JSX runtime setting to Babel preset in Jest config ([@iansu](https://github.com/iansu))
- - [#9841](https://github.com/facebook/create-react-app/pull/9841) Bump resolve-url-loader version ([@johannespfeiffer](https://github.com/johannespfeiffer))
- - [#9348](https://github.com/facebook/create-react-app/pull/9348) Upgrade refresh plugin ([@ianschmitz](https://github.com/ianschmitz))
- - [#8891](https://github.com/facebook/create-react-app/pull/8891) Bump style-loader to 1.2.1 ([@chybisov](https://github.com/chybisov))
-- `react-error-overlay`, `react-scripts`
- - [#9863](https://github.com/facebook/create-react-app/pull/9863) Upgrade to React 17 ([@iansu](https://github.com/iansu))
- - [#9856](https://github.com/facebook/create-react-app/pull/9856) feat: Update ESLint dependencies ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
-- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `cra-template-typescript`, `cra-template`, `create-react-app`, `eslint-config-react-app`, `react-app-polyfill`, `react-error-overlay`, `react-scripts`
- - [#9857](https://github.com/facebook/create-react-app/pull/9857) feat: Update all dependencies ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
-- `eslint-config-react-app`, `react-dev-utils`, `react-scripts`
- - [#9751](https://github.com/facebook/create-react-app/pull/9751) Replace deprecated eslint-loader by eslint-webpack-plugin ([@tooppaaa](https://github.com/tooppaaa))
-- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `cra-template-typescript`, `cra-template`, `create-react-app`, `eslint-config-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#9639](https://github.com/facebook/create-react-app/pull/9639) Upgrade dependencies ([@ianschmitz](https://github.com/ianschmitz))
+ - [#11325](https://github.com/facebook/create-react-app/pull/11325) allow CORS on webpack-dev-server ([@hasanayan](https://github.com/hasanayan))
+ - [#11121](https://github.com/facebook/create-react-app/pull/11121) Update PostCSS version ([@mrmckeb](https://github.com/mrmckeb))
+ - [#10204](https://github.com/facebook/create-react-app/pull/10204) Update WebpackManifestPlugin ([@raix](https://github.com/raix))
+ - [#10456](https://github.com/facebook/create-react-app/pull/10456) Update PostCSS packages ([@raix](https://github.com/raix))
+- `babel-plugin-named-asset-import`, `confusing-browser-globals`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#11338](https://github.com/facebook/create-react-app/pull/11338) Upgrade jest and related packages from 26.6.0 to 27.1.0 ([@krreet](https://github.com/krreet))
- `eslint-config-react-app`, `react-error-overlay`, `react-scripts`
- - [#9434](https://github.com/facebook/create-react-app/pull/9434) feat: Update ESLint dependencies ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
- - [#9251](https://github.com/facebook/create-react-app/pull/9251) feat: Update ESLint dependencies ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
- - [#8978](https://github.com/facebook/create-react-app/pull/8978) Support ESLint 7.x ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
-- `cra-template-typescript`, `cra-template`
- - [#9526](https://github.com/facebook/create-react-app/pull/9526) Update template dependencies to latest version ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
- - [#8406](https://github.com/facebook/create-react-app/pull/8406) Upgrade testing-library packages ([@gnapse](https://github.com/gnapse))
-- `react-app-polyfill`
- - [#9392](https://github.com/facebook/create-react-app/pull/9392) Upgrade whatwg-fetch ([@Lapz](https://github.com/Lapz))
+ - [#10761](https://github.com/facebook/create-react-app/pull/10761) chore: migrate to @babel/eslint-parser ([@JLHwung](https://github.com/JLHwung))
+- `babel-preset-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
+ - [#10797](https://github.com/facebook/create-react-app/pull/10797) Unpin babel dependencies ([@mohd-akram](https://github.com/mohd-akram))
- `react-dev-utils`
- - [#8933](https://github.com/facebook/create-react-app/pull/8933) Bump immer version ([@staff0rd](https://github.com/staff0rd))
-- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#9317](https://github.com/facebook/create-react-app/pull/9317) Upgrade dependencies ([@ianschmitz](https://github.com/ianschmitz))
-- `babel-preset-react-app`, `cra-template-typescript`, `cra-template`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#9196](https://github.com/facebook/create-react-app/pull/9196) Upgrade dependencies ([@ianschmitz](https://github.com/ianschmitz))
- - [#9132](https://github.com/facebook/create-react-app/pull/9132) Upgrade dependencies ([@ianschmitz](https://github.com/ianschmitz))
-- `babel-plugin-named-asset-import`, `confusing-browser-globals`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#8955](https://github.com/facebook/create-react-app/pull/8955) Upgrade to Jest 26 ([@ianschmitz](https://github.com/ianschmitz))
-- `babel-preset-react-app`, `create-react-app`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#9081](https://github.com/facebook/create-react-app/pull/9081) Update packages ([@ianschmitz](https://github.com/ianschmitz))
- - [#8947](https://github.com/facebook/create-react-app/pull/8947) Minor/patch dependency upgrades ([@ianschmitz](https://github.com/ianschmitz))
-- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `create-react-app`, `react-app-polyfill`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#8950](https://github.com/facebook/create-react-app/pull/8950) Dependency major version upgrades ([@ianschmitz](https://github.com/ianschmitz))
-- `eslint-config-react-app`, `react-scripts`
- - [#8939](https://github.com/facebook/create-react-app/pull/8939) Bump React Hooks ESLint plugin to 4.0.0 ([@gaearon](https://github.com/gaearon))
-- `babel-plugin-named-asset-import`, `babel-preset-react-app`, `confusing-browser-globals`, `cra-template-typescript`, `react-dev-utils`, `react-error-overlay`, `react-scripts`
- - [#8362](https://github.com/facebook/create-react-app/pull/8362) Upgrade to Jest 25 ([@skovhus](https://github.com/skovhus))
-
-#### Committers: 63
-
-- Adam Charron ([@charrondev](https://github.com/charrondev))
-- Alex Krolick ([@alexkrolick](https://github.com/alexkrolick))
-- Alexey Pyltsyn ([@lex111](https://github.com/lex111))
-- Andrey Sitnik ([@ai](https://github.com/ai))
-- Andy C ([@andycanderson](https://github.com/andycanderson))
-- Anuraag Agrawal ([@anuraaga](https://github.com/anuraaga))
-- Braedon Gough ([@braedongough](https://github.com/braedongough))
-- Brian Morearty ([@BMorearty](https://github.com/BMorearty))
+ - [#10791](https://github.com/facebook/create-react-app/pull/10791) Bump immer version for fixing security issue ([@shamprasadrh](https://github.com/shamprasadrh))
+
+#### Committers: 34
+
+- Andrew Wong ([@andrewywong](https://github.com/andrewywong))
- Brody McKee ([@mrmckeb](https://github.com/mrmckeb))
-- Burke Holland ([@burkeholland](https://github.com/burkeholland))
-- Chetanya Kandhari ([@availchet](https://github.com/availchet))
-- Clément DUNGLER ([@tooppaaa](https://github.com/tooppaaa))
-- Clément Hallet ([@challet](https://github.com/challet))
-- Cory House ([@coryhouse](https://github.com/coryhouse))
+- Christiaan van Bemmel ([@thabemmz](https://github.com/thabemmz))
- Dan Abramov ([@gaearon](https://github.com/gaearon))
-- Dylan Brookes ([@merelinguist](https://github.com/merelinguist))
-- Ernesto García ([@gnapse](https://github.com/gnapse))
-- Eugene Chybisov ([@chybisov](https://github.com/chybisov))
-- Evan Kennedy ([@evankennedy](https://github.com/evankennedy))
-- Gerrit Alex ([@ljosberinn](https://github.com/ljosberinn))
-- Hieu Do ([@hieuxlu](https://github.com/hieuxlu))
-- Hongbo Miao ([@Hongbo-Miao](https://github.com/Hongbo-Miao))
-- Houssein Djirdeh ([@housseindjirdeh](https://github.com/housseindjirdeh))
+- Florian Guitton ([@fguitton](https://github.com/fguitton))
+- Hasan Ayan ([@hasanayan](https://github.com/hasanayan))
- Huáng Jùnliàng ([@JLHwung](https://github.com/JLHwung))
- Ian Schmitz ([@ianschmitz](https://github.com/ianschmitz))
- Ian Sutherland ([@iansu](https://github.com/iansu))
-- Iddan Aaronsohn ([@iddan](https://github.com/iddan))
-- Jakob Krigovsky ([@sonicdoe](https://github.com/sonicdoe))
-- Jeffrey Posnick ([@jeffposnick](https://github.com/jeffposnick))
-- Jeremy Wadsack ([@jeremywadsack](https://github.com/jeremywadsack))
-- Jeroen Claassens ([@Favna](https://github.com/Favna))
-- Joe Haddad ([@Timer](https://github.com/Timer))
-- Johannes Pfeiffer ([@johannespfeiffer](https://github.com/johannespfeiffer))
-- Josemaria Nriagu ([@josenriagu](https://github.com/josenriagu))
-- Kenneth Skovhus ([@skovhus](https://github.com/skovhus))
-- Kirill Korolyov ([@Dremora](https://github.com/Dremora))
-- Kline Moralee ([@klinem](https://github.com/klinem))
-- Lenard Pratt ([@Lapz](https://github.com/Lapz))
-- Liam Duffy ([@liamness](https://github.com/liamness))
-- Maaz Syed Adeeb ([@maazadeeb](https://github.com/maazadeeb))
-- Marc Hassan ([@mhassan1](https://github.com/mhassan1))
-- Matt Korostoff ([@MKorostoff](https://github.com/MKorostoff))
+- James George ([@jamesgeorge007](https://github.com/jamesgeorge007))
+- Jason Williams ([@jasonwilliams](https://github.com/jasonwilliams))
+- Jawad ([@jawadsh123](https://github.com/jawadsh123))
+- Joseph Atkins-Turkish ([@Spacerat](https://github.com/Spacerat))
+- Justin Grant ([@justingrant](https://github.com/justingrant))
+- Konrad Stępniak ([@th7nder](https://github.com/th7nder))
+- Kristoffer K. ([@merceyz](https://github.com/merceyz))
+- Leo Lamprecht ([@leo](https://github.com/leo))
+- Luke Karrys ([@lukekarrys](https://github.com/lukekarrys))
+- Max Romanyuta ([@xom9ikk](https://github.com/xom9ikk))
- Michael Mok ([@pmmmwh](https://github.com/pmmmwh))
-- Michael Schmidt-Voigt ([@M165437](https://github.com/M165437))
- Michaël De Boey ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
-- Minh Nguyen ([@NMinhNguyen](https://github.com/NMinhNguyen))
-- Mostafa Nawara ([@MostafaNawara](https://github.com/MostafaNawara))
-- Nick McCurdy ([@nickmccurdy](https://github.com/nickmccurdy))
-- Rafael Quijada ([@firehawk09](https://github.com/firehawk09))
-- Raihan Nismara ([@raihan71](https://github.com/raihan71))
-- Sakito Mukai ([@sakito21](https://github.com/sakito21))
-- Sam Chen ([@chenxsan](https://github.com/chenxsan))
-- Sam Saccone ([@samccone](https://github.com/samccone))
-- Sebastian Markbåge ([@sebmarkbage](https://github.com/sebmarkbage))
-- Shakib Hossain ([@shakib609](https://github.com/shakib609))
-- Simen Bekkhus ([@SimenB](https://github.com/SimenB))
-- Stafford Williams ([@staff0rd](https://github.com/staff0rd))
-- Sten Arthur Laane ([@StenAL](https://github.com/StenAL))
-- Tan Li Hau ([@tanhauhau](https://github.com/tanhauhau))
-- Timothy ([@timothyis](https://github.com/timothyis))
-- Tobias Büschel ([@tobiasbueschel](https://github.com/tobiasbueschel))
-- Webdot_30 ([@caspero-62](https://github.com/caspero-62))
-- [@atlanteh](https://github.com/atlanteh)
-
-## Releases Before 4.x
-
-Please refer to [CHANGELOG-3.x.md](./CHANGELOG-3.x.md) for earlier versions.
+- Mohamed Akram ([@mohd-akram](https://github.com/mohd-akram))
+- Morten N.O. Nørgaard Henriksen ([@raix](https://github.com/raix))
+- Nathan Bierema ([@Methuselah96](https://github.com/Methuselah96))
+- Reetesh Kumar ([@krreet](https://github.com/krreet))
+- Shamprasad RH ([@shamprasadrh](https://github.com/shamprasadrh))
+- Simon Lieschke ([@slieschke](https://github.com/slieschke))
+- [@e-w-h](https://github.com/e-w-h)
+- [@jd1048576](https://github.com/jd1048576)
+- [@luk3kang](https://github.com/luk3kang)
+- [@ujihisa](https://github.com/ujihisa)
+- hadmarine ([@HADMARINE](https://github.com/HADMARINE))
+- huntr.dev | the place to protect open source ([@huntr-helper](https://github.com/huntr-helper))
+- shanyue ([@shfshanyue](https://github.com/shfshanyue))
+
+## Releases Before 5.x
+
+Please refer to [CHANGELOG-4.x.md](./CHANGELOG-4.x.md) for earlier versions.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bb515bb504f..5231b638f4b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -48,66 +48,74 @@ Please also provide a **test plan**, i.e. specify how you verified that your add
## 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/facebook/create-react-app/tree/master/packages) directory.
+These packages can be found in the [`packages/`](https://github.com/facebook/create-react-app/tree/main/packages) directory.
### Overview of directory structure
```
packages/
+ babel-plugin-named-asset-import/
babel-preset-react-app/
+ confusing-browser-globals/
+ cra-template/
+ cra-template-typescript/
create-react-app/
eslint-config-react-app/
+ react-app-polyfill/
react-dev-utils/
+ react-error-overlay/
react-scripts/
```
### Package Descriptions
-#### [babel-preset-react-app](https://github.com/facebook/create-react-app/tree/master/packages/babel-preset-react-app)
+#### [babel-preset-react-app](https://github.com/facebook/create-react-app/tree/main/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 11+) 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/facebook/create-react-app/tree/master/packages/create-react-app)
+#### [create-react-app](https://github.com/facebook/create-react-app/tree/main/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/facebook/create-react-app/tree/master/packages/eslint-config-react-app)
+#### [eslint-config-react-app](https://github.com/facebook/create-react-app/tree/main/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/facebook/create-react-app/tree/master/packages/react-dev-utils)
+#### [react-dev-utils](https://github.com/facebook/create-react-app/tree/main/packages/react-dev-utils)
This package contains utilities used for `react-scripts` and sibling packages.
Its main purpose is to conceal code which the user shouldn't be burdened with upon ejecting.
-#### [react-scripts](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts)
+#### [react-scripts](https://github.com/facebook/create-react-app/tree/main/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
+You will need `npm@7` and `yarn@1` in order to bootstrap and test a local copy of this repo.
+
1. Clone the repo with `git clone https://github.com/facebook/create-react-app`
-2. Run `yarn` in the root `create-react-app` folder.
+2. Run `npm install` in the root `create-react-app` folder.
-Once it is done, you can modify any file locally and run `yarn start`, `yarn test` or `yarn build` like you can in a generated project. It will serve the application from the files located in `packages/cra-template/template`.
+Once it is done, you can modify any file locally and run `npm start`, `npm test` or `npm run build` like you can in a generated project. It will serve the application from the files located in `packages/cra-template/template`.
If you want to try out the end-to-end flow with the global CLI, you can do this too:
```sh
-yarn create-react-app my-app
+npx create-react-app my-app
cd my-app
```
-and then run `yarn start` or `yarn build`.
+and then run `npm start` or `npm run build`.
## Contributing to E2E (end to end) tests
-**TL;DR** use the command `yarn e2e:docker` to run unit and e2e tests.
+**TL;DR** use the command `npm run e2e:docker` to run unit and e2e tests.
More detailed information are in the dedicated [README](/test/README.md).
@@ -143,11 +151,11 @@ By default git would use `CRLF` line endings which would cause the scripts to fa
2. Close the milestone and create a new one for the next release.
3. In most releases, only `react-scripts` needs to be released. If you don’t have any changes to the `packages/create-react-app` folder, you don’t need to bump its version or publish it (the publish script will publish only changed packages).
4. Note that files in `packages/create-react-app` should be modified with extreme caution. Since it’s a global CLI, any version of `create-react-app` (global CLI) including very old ones should work with the latest version of `react-scripts`.
-5. Run `yarn compile:lockfile`. The command will generate an updated lockfile in `packages/create-react-app` that should be committed.
+5. Pull the latest changes from GitHub, run `npm ci`.
6. Create a change log entry for the release:
- You'll need an [access token for the GitHub API](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). Save it to this environment variable: `export GITHUB_AUTH="..."`
-- Run `yarn changelog`. The command will find all the labeled pull requests merged since the last release and group them by the label and affected packages, and create a change log entry with all the changes and links to PRs and their authors. Copy and paste it to `CHANGELOG.md`.
+- Run `npm run changelog`. The command will find all the labeled pull requests merged since the last release and group them by the label and affected packages, and create a change log entry with all the changes and links to PRs and their authors. Copy and paste it to `CHANGELOG.md`.
- Add a four-space indented paragraph after each non-trivial list item, explaining what changed and why. For each breaking change also write who it affects and instructions for migrating existing code.
- Maybe add some newlines here and there. Preview the result on GitHub to get a feel for it. Changelog generator output is a bit too terse for my taste, so try to make it visually pleasing and well grouped.
@@ -161,9 +169,10 @@ Make sure to test the released version! If you want to be extra careful, you can
## Releasing the Docs
1. Go to the `docusaurus/website` directory
-2. Run `yarn build`
-3. You'll need an [access token for the GitHub API](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). Save it to this environment variable: `export GITHUB_AUTH="..."`
-4. Run `GIT_USER= CURRENT_BRANCH=master USE_SSH=true yarn deploy`
+2. Run `npm ci`
+3. Run `npm run build`
+4. You'll need an [access token for the GitHub API](https://help.github.com/articles/creating-an-access-token-for-command-line-use/). Save it to this environment variable: `export GITHUB_AUTH="..."`
+5. Run `GIT_USER= CURRENT_BRANCH=main USE_SSH=true npm run deploy`
---
diff --git a/README.md b/README.md
index f688165eb0f..71c6485a16b 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Create React App [![Build Status](https://dev.azure.com/facebook/create-react-app/_apis/build/status/facebook.create-react-app?branchName=master)](https://dev.azure.com/facebook/create-react-app/_build/latest?definitionId=1&branchName=master) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md)
+# Create React App [![Build Status](https://dev.azure.com/facebook/create-react-app/_apis/build/status/facebook.create-react-app?branchName=main)](https://dev.azure.com/facebook/create-react-app/_build/latest?definitionId=1&branchName=main) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](https://github.com/facebook/create-react-app/blob/main/CONTRIBUTING.md)
@@ -39,7 +39,7 @@ Create a project, and you’re good to go.
## Creating an App
-**You’ll need to have Node 10.16.0 or later version on your local development machine** (but it’s not required on the server). We recommend using the latest LTS version. You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to switch Node versions between different projects.
+**You’ll need to have Node 14.0.0 or later version on your local development machine** (but it’s not required on the server). We recommend using the latest LTS version. You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to switch Node versions between different projects.
To create a new app, you may choose one of the following methods:
@@ -217,4 +217,4 @@ We are grateful to the authors of existing related projects for their ideas and
## License
-Create React App is open source software [licensed as MIT](https://github.com/facebook/create-react-app/blob/master/LICENSE). The Create React App logo is licensed under a [Creative Commons Attribution 4.0 International license](https://creativecommons.org/licenses/by/4.0/).
+Create React App is open source software [licensed as MIT](https://github.com/facebook/create-react-app/blob/main/LICENSE). The Create React App logo is licensed under a [Creative Commons Attribution 4.0 International license](https://creativecommons.org/licenses/by/4.0/).
diff --git a/azure-pipelines-test-job.yml b/azure-pipelines-test-job.yml
index 116d2f87e23..cdf3f4dacfd 100644
--- a/azure-pipelines-test-job.yml
+++ b/azure-pipelines-test-job.yml
@@ -6,8 +6,8 @@ parameters:
name: ''
testScript: ''
configurations:
- LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x }
- LinuxNode12: { vmImage: 'ubuntu-16.04', nodeVersion: 12.x }
+ LinuxNode14: { vmImage: 'ubuntu-latest', nodeVersion: 14.x }
+ LinuxNode16: { vmImage: 'ubuntu-latest', nodeVersion: 16.x }
jobs:
- job: ${{ parameters.name }}
@@ -31,8 +31,11 @@ jobs:
versionSpec: $(nodeVersion)
displayName: 'Install Node.js'
- - script: yarn --frozen-lockfile
- displayName: 'Run yarn'
+ - script: npm i -g npm@8
+ displayName: 'Update npm to v8'
+
+ - script: npm ci
+ displayName: 'Run npm ci'
- bash: ${{ parameters.testScript }}
displayName: 'Run tests'
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 3c89363208b..8c51a73a8c2 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -3,7 +3,7 @@
#
trigger:
- - master
+ - main
variables:
CI: true
@@ -42,25 +42,25 @@ jobs:
# ******************************************************************************
# Kitchensink Eject test suite
# ******************************************************************************
- - template: azure-pipelines-test-job.yml
- parameters:
- name: KitchensinkEject
- testScript: tasks/e2e-kitchensink-eject.sh
+ # - template: azure-pipelines-test-job.yml
+ # parameters:
+ # name: KitchensinkEject
+ # testScript: tasks/e2e-kitchensink-eject.sh
# ******************************************************************************
# Behavior test suite
# ******************************************************************************
- - template: azure-pipelines-test-job.yml
- parameters:
- name: Behavior
- testScript: tasks/e2e-behavior.sh
- configurations:
- LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x }
- LinuxNode12: { vmImage: 'ubuntu-16.04', nodeVersion: 12.x }
- WindowsNode10: { vmImage: 'windows-2019', nodeVersion: 10.x }
- WindowsNode12: { vmImage: 'windows-2019', nodeVersion: 12.x }
- MacNode10: { vmImage: 'macOS-10.15', nodeVersion: 10.x }
- MacNode12: { vmImage: 'macOS-10.15', nodeVersion: 12.x }
+ # - template: azure-pipelines-test-job.yml
+ # parameters:
+ # name: Behavior
+ # testScript: tasks/e2e-behavior.sh
+ # configurations:
+ # LinuxNode14: { vmImage: 'ubuntu-latest', nodeVersion: 14.x }
+ # LinuxNode16: { vmImage: 'ubuntu-latest', nodeVersion: 16.x }
+ # WindowsNode14: { vmImage: 'windows-2019', nodeVersion: 14.x }
+ # WindowsNode16: { vmImage: 'windows-2019', nodeVersion: 16.x }
+ # MacNode14: { vmImage: 'macOS-10.15', nodeVersion: 14.x }
+ # MacNode16: { vmImage: 'macOS-10.15', nodeVersion: 16.x }
# ******************************************************************************
# Old Node test suite
diff --git a/docusaurus/docs/adding-a-sass-stylesheet.md b/docusaurus/docs/adding-a-sass-stylesheet.md
index 1697de27541..5a287294155 100644
--- a/docusaurus/docs/adding-a-sass-stylesheet.md
+++ b/docusaurus/docs/adding-a-sass-stylesheet.md
@@ -10,43 +10,36 @@ Generally, we recommend that you don’t reuse the same CSS classes across diffe
Following this rule often makes CSS preprocessors less useful, as features like mixins and nesting are replaced by component composition. You can, however, integrate a CSS preprocessor if you find it valuable.
-To use Sass, first install `node-sass`:
+To use Sass, first install `sass`:
```sh
-$ npm install node-sass --save
-$ # or
-$ yarn add node-sass
+$ npm install sass
+# or
+$ yarn add sass
```
Now you can rename `src/App.css` to `src/App.scss` and update `src/App.js` to import `src/App.scss`.
This file and any other file will be automatically compiled if imported with the extension `.scss` or `.sass`.
-To share variables between Sass files, you can use Sass imports. For example, `src/App.scss` and other component style files could include `@import "./shared.scss";` with variable definitions.
+To share variables between Sass files, you can use Sass's [`@use` rule](https://sass-lang.com/documentation/at-rules/use). For example, `src/App.scss` and other component style files could include `@use "./shared.scss";` with variable definitions.
This will allow you to do imports like
```scss
-@import 'styles/_colors.scss'; // assuming a styles directory under src/
-@import '~nprogress/nprogress'; // importing a css file from the nprogress node module
+@use 'styles/_colors.scss'; // assuming a styles directory under src/
+@use '~nprogress/nprogress'; // loading a css file from the nprogress node module
```
-> **Note:** You must prefix imports from `node_modules` with `~` as displayed above.
+> **Note:** You can prefix paths with `~`, as displayed above, to resolve modules from `node_modules`.
-`node-sass` also supports the `SASS_PATH` variable.
+`sass` also supports the `SASS_PATH` variable.
-To use imports relative to a path you specify, and from `node_modules` without adding the `~` prefix, you can add a [`.env` file](https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/adding-custom-environment-variables.md#adding-development-environment-variables-in-env) at the project root with the variable `SASS_PATH=node_modules:src`. To specify more directories you can add them to `SASS_PATH` separated by a `:` like `path1:path2:path3`.
+To use imports relative to a path you specify, you can add a [`.env` file](https://github.com/facebook/create-react-app/blob/main/docusaurus/docs/adding-custom-environment-variables.md#adding-development-environment-variables-in-env) at the project root with the path specified in the `SASS_PATH` environment variable. To specify more directories you can add them to `SASS_PATH` separated by a `:` like `path1:path2:path3`.
-If you set `SASS_PATH=node_modules:src`, this will allow you to do imports like
-
-```scss
-@import 'styles/colors'; // assuming a styles directory under src/, where _colors.scss partial file exists.
-@import 'nprogress/nprogress'; // importing a css file from the nprogress node module
-```
-
-> **Note:** For windows operating system, use below syntax
+> **Note:** For the Windows operating system, separate your paths by semicolons.
>
> ```
-> SASS_PATH=./node_modules;./src
+> SASS_PATH=path1;path2;path3
> ```
> **Tip:** You can opt into using this feature with [CSS modules](adding-a-css-modules-stylesheet.md) too!
@@ -62,3 +55,14 @@ If you set `SASS_PATH=node_modules:src`, this will allow you to do imports like
> module.file_ext=.sass
> module.file_ext=.scss
> ```
+
+> **Note:** LibSass and the packages built on top of it, including Node Sass, are [deprecated](https://sass-lang.com/blog/libsass-is-deprecated).
+> If you're a user of Node Sass, you can migrate to Dart Sass by replacing `node-sass` in your `package.json` file with `sass` or by running the following commands:
+>
+> ```sh
+> $ npm uninstall node-sass
+> $ npm install sass
+> # or
+> $ yarn remove node-sass
+> $ yarn add sass
+> ```
diff --git a/docusaurus/docs/adding-bootstrap.md b/docusaurus/docs/adding-bootstrap.md
index 1bbffda0854..7ca91c07fd2 100644
--- a/docusaurus/docs/adding-bootstrap.md
+++ b/docusaurus/docs/adding-bootstrap.md
@@ -8,7 +8,7 @@ While you don’t have to use any specific library to integrate Bootstrap with R
Each project's respective documentation site has detailed instructions for installing and using them. Both depend on the Bootstrap css file so install that as well:
```sh
-npm install --save bootstrap
+npm install bootstrap
```
Alternatively you may use `yarn`:
@@ -33,19 +33,19 @@ Sometimes you might need to tweak the visual styles of Bootstrap (or equivalent
As of `react-scripts@2.0.0` you can import `.scss` files. This makes it possible to use a package's built-in Sass variables for global style preferences.
-To enable `scss` in Create React App you will need to install `node-sass`.
+To enable `scss` in Create React App you will need to install `sass`.
```sh
-npm install --save node-sass
+npm install sass
```
Alternatively you may use `yarn`:
```sh
-yarn add node-sass
+yarn add sass
```
-To customize Bootstrap, create a file called `src/custom.scss` (or similar) and import the Bootstrap source stylesheet. Add any overrides _before_ the imported file(s). You can reference [Bootstrap's documentation](https://getbootstrap.com/docs/4.1/getting-started/theming/#css-variables) for the names of the available variables.
+To customize Bootstrap, create a file called `src/custom.scss` (or similar) and import the Bootstrap source stylesheet. Add any overrides _before_ the imported file(s). You can reference [Bootstrap's documentation](https://getbootstrap.com/docs/4.6/getting-started/theming/#variable-defaults) for the names of the available variables.
```scss
// Override default variables before the import
@@ -55,7 +55,7 @@ $body-bg: #000;
@import '~bootstrap/scss/bootstrap.scss';
```
-> **Note:** You must prefix imports from `node_modules` with `~` as displayed above.
+> **Note:** You can prefix paths with `~`, as displayed above, to resolve modules from `node_modules`.
Finally, import the newly created `.scss` file instead of the default Bootstrap `.css` in the beginning of your `src/index.js` file, for example:
diff --git a/docusaurus/docs/adding-css-reset.md b/docusaurus/docs/adding-css-reset.md
index c08567124af..d57a1e3803c 100644
--- a/docusaurus/docs/adding-css-reset.md
+++ b/docusaurus/docs/adding-css-reset.md
@@ -66,7 +66,7 @@ Browser support is dictated by what normalize.css [supports]. As of this writing
- iOS Safari (last 2)
- Internet Explorer 9+
-[browserslist]: http://browserl.ist/
+[browserslist]: https://browserl.ist/
[css reset]: https://cssreset.com/what-is-a-css-reset/
[normalize.css]: https://github.com/csstools/normalize.css
[supports]: https://github.com/csstools/normalize.css#browser-support
diff --git a/docusaurus/docs/adding-typescript.md b/docusaurus/docs/adding-typescript.md
index 6f4c86c6cc7..75ebe493a3e 100644
--- a/docusaurus/docs/adding-typescript.md
+++ b/docusaurus/docs/adding-typescript.md
@@ -13,9 +13,9 @@ To start a new Create React App project with [TypeScript](https://www.typescript
```sh
npx create-react-app my-app --template typescript
-
-# or
-
+```
+or
+```sh
yarn create react-app my-app --template typescript
```
@@ -27,9 +27,9 @@ To add [TypeScript](https://www.typescriptlang.org/) to an existing Create React
```sh
npm install --save typescript @types/node @types/react @types/react-dom @types/jest
-
-# or
-
+```
+or
+```sh
yarn add typescript @types/node @types/react @types/react-dom @types/jest
```
diff --git a/docusaurus/docs/advanced-configuration.md b/docusaurus/docs/advanced-configuration.md
index 336d28cb2a2..34144ce6040 100644
--- a/docusaurus/docs/advanced-configuration.md
+++ b/docusaurus/docs/advanced-configuration.md
@@ -15,7 +15,7 @@ You can adjust various development and production settings by setting environmen
| PORT | ✅ Used | 🚫 Ignored | By default, the development web server will attempt to listen on port 3000 or prompt you to attempt the next available port. You may use this variable to specify a different port. |
| HTTPS | ✅ Used | 🚫 Ignored | When set to `true`, Create React App will run the development server in `https` mode. |
| WDS_SOCKET_HOST | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket hostname for hot module reloading. Normally, `webpack-dev-server` defaults to `window.location.hostname` for the SockJS hostname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockhost) for more details. |
-| WDS_SOCKET_PATH | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket path for hot module reloading. Normally, `webpack-dev-server` defaults to `/sockjs-node` for the SockJS pathname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockpath) for more details. |
+| WDS_SOCKET_PATH | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket path for hot module reloading. Normally, `webpack-dev-server` defaults to `/ws` for the SockJS pathname. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockpath) for more details. |
| WDS_SOCKET_PORT | ✅ Used | 🚫 Ignored | When set, Create React App will run the development server with a custom websocket port for hot module reloading. Normally, `webpack-dev-server` defaults to `window.location.port` for the SockJS port. You may use this variable to start local development on more than one Create React App project at a time. See [webpack-dev-server documentation](https://webpack.js.org/configuration/dev-server/#devserversockport) for more details. |
| PUBLIC_URL | ✅ Used | ✅ Used | Create React App assumes your application is hosted at the serving web server's root or a subpath as specified in [`package.json` (`homepage`)](deployment#building-for-relative-paths). Normally, Create React App ignores the hostname. You may use this variable to force assets to be referenced verbatim to the url you provide (hostname included). This may be particularly useful when using a CDN to host your application. |
| BUILD_PATH | 🚫 Ignored | ✅ Used | By default, Create React App will output compiled assets to a `/build` directory adjacent to your `/src`. You may use this variable to specify a new path for Create React App to output assets. BUILD_PATH should be specified as a path relative to the root of your project. |
@@ -24,7 +24,7 @@ You can adjust various development and production settings by setting environmen
| CHOKIDAR_USEPOLLING | ✅ Used | 🚫 Ignored | When set to `true`, the watcher runs in polling mode, as necessary inside a VM. Use this option if `npm start` isn't detecting changes. |
| GENERATE_SOURCEMAP | 🚫 Ignored | ✅ Used | When set to `false`, source maps are not generated for a production build. This solves out of memory (OOM) issues on some smaller machines. |
| 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. |
+| IMAGE_INLINE_SIZE_LIMIT | ✅ Used | ✅ 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. |
| FAST_REFRESH | ✅ Used | 🚫 Ignored | When set to `false`, disables experimental support for Fast Refresh to allow you to tweak your components in real time without reloading the page. |
| 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. |
| ESLINT_NO_DEV_ERRORS | ✅ Used | 🚫 Ignored | When set to `true`, ESLint errors are converted to warnings during development. As a result, ESLint output will no longer appear in the error overlay. |
diff --git a/docusaurus/docs/code-splitting.md b/docusaurus/docs/code-splitting.md
index 2fabb6b40c0..9a31009fded 100644
--- a/docusaurus/docs/code-splitting.md
+++ b/docusaurus/docs/code-splitting.md
@@ -5,7 +5,7 @@ title: Code Splitting
Instead of downloading the entire app before users can use it, code splitting allows you to split your code into small chunks which you can then load on demand.
-This project setup supports code splitting via [dynamic `import()`](http://2ality.com/2017/01/import-operator.html#loading-code-on-demand). Its [proposal](https://github.com/tc39/proposal-dynamic-import) is in stage 4. The `import()` function-like form takes the module name as an argument and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which always resolves to the namespace object of the module.
+This project setup supports code splitting via [dynamic `import()`](https://2ality.com/2017/01/import-operator.html#loading-code-on-demand). Its [proposal](https://github.com/tc39/proposal-dynamic-import) is in stage 4. The `import()` function-like form takes the module name as an argument and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) which always resolves to the namespace object of the module.
Here is an example:
diff --git a/docusaurus/docs/custom-templates.md b/docusaurus/docs/custom-templates.md
index 9ae4ae69741..f1caf7568d7 100644
--- a/docusaurus/docs/custom-templates.md
+++ b/docusaurus/docs/custom-templates.md
@@ -19,14 +19,14 @@ npx create-react-app my-app --template [template-name]
We ship two templates by default:
-- [`cra-template`](https://github.com/facebook/create-react-app/tree/master/packages/cra-template)
-- [`cra-template-typescript`](https://github.com/facebook/create-react-app/tree/master/packages/cra-template-typescript)
+- [`cra-template`](https://github.com/facebook/create-react-app/tree/main/packages/cra-template)
+- [`cra-template-typescript`](https://github.com/facebook/create-react-app/tree/main/packages/cra-template-typescript)
However, you can find many great community templates by searching for ["cra-template-\*"](https://www.npmjs.com/search?q=cra-template-*) on npm.
## Building a template
-If you're interested in building a custom template, first take a look at how we've built [`cra-template`](https://github.com/facebook/create-react-app/tree/master/packages/cra-template).
+If you're interested in building a custom template, first take a look at how we've built [`cra-template`](https://github.com/facebook/create-react-app/tree/main/packages/cra-template).
A template must have the following structure:
diff --git a/docusaurus/docs/deployment.md b/docusaurus/docs/deployment.md
index 85af6aaad3e..430c1e11427 100644
--- a/docusaurus/docs/deployment.md
+++ b/docusaurus/docs/deployment.md
@@ -8,14 +8,14 @@ sidebar_label: Deployment
## Static Server
-For environments using [Node](https://nodejs.org/), the easiest way to handle this would be to install [serve](https://github.com/zeit/serve) and let it handle the rest:
+For environments using [Node](https://nodejs.org/), the easiest way to handle this would be to install [serve](https://github.com/vercel/serve) and let it handle the rest:
```sh
npm install -g serve
serve -s build
```
-The last command shown above will serve your static site on the port **5000**. Like many of [serve](https://github.com/zeit/serve)’s internal settings, the port can be adjusted using the `-l` or `--listen` flags:
+The last command shown above will serve your static site on the port **3000**. Like many of [serve](https://github.com/vercel/serve)’s internal settings, the port can be adjusted using the `-l` or `--listen` flags:
```sh
serve -s build -l 4000
@@ -161,7 +161,7 @@ You can specify other environments in the same way.
Variables in `.env.production` will be used as fallback because `NODE_ENV` will always be set to `production` for a build.
-## [AWS Amplify](http://console.amplify.aws)
+## [AWS Amplify](https://console.amplify.aws)
The AWS Amplify Console provides continuous deployment and hosting for modern web apps (single page apps and static site generators) with serverless backends. The Amplify Console offers globally available CDNs, custom domain setup, feature branch deployments, and password protection.
@@ -464,7 +464,7 @@ If you want to use a Custom Domain with your Vercel deployment, you can **Add**
To add your domain to your project, navigate to your [Project](https://vercel.com/docs/platform/projects) from the Vercel Dashboard. Once you have selected your project, click on the "Settings" tab, then select the **Domains** menu item. From your projects **Domain** page, enter the domain you wish to add to your project.
-Once the domain as been added, you will be presented with different methods for configuring it.
+Once the domain has been added, you will be presented with different methods for configuring it.
### Deploying a fresh React project
diff --git a/docusaurus/docs/documentation-intro.md b/docusaurus/docs/documentation-intro.md
index 8976946c784..aee991f0f40 100644
--- a/docusaurus/docs/documentation-intro.md
+++ b/docusaurus/docs/documentation-intro.md
@@ -18,7 +18,7 @@ This website is only about Create React App.
## Something Missing?
-If you have ideas for more “How To” recipes that should be on this page, [let us know](https://github.com/facebook/create-react-app/issues) or [contribute some!](https://github.com/facebook/create-react-app/tree/master/docusaurus/docs)
+If you have ideas for more “How To” recipes that should be on this page, [let us know](https://github.com/facebook/create-react-app/issues) or [contribute some!](https://github.com/facebook/create-react-app/tree/main/docusaurus/docs)
## Feedback
diff --git a/docusaurus/docs/fetching-data-with-ajax-requests.md b/docusaurus/docs/fetching-data-with-ajax-requests.md
index 22f37e09a06..43bcc902f67 100644
--- a/docusaurus/docs/fetching-data-with-ajax-requests.md
+++ b/docusaurus/docs/fetching-data-with-ajax-requests.md
@@ -11,6 +11,6 @@ The global `fetch` function allows you to make AJAX requests. It takes in a URL
A Promise represents the eventual result of an asynchronous operation, you can find more information about Promises [here](https://www.promisejs.org/) and [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). Both axios and `fetch()` use Promises under the hood. You can also use the [`async / await`](https://davidwalsh.name/async-await) syntax to reduce the callback nesting.
Make sure the [`fetch()` API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) and [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) are available in your target audience's browsers.
-For example, support in Internet Explorer requires a [polyfill](https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md).
+For example, support in Internet Explorer requires a [polyfill](https://github.com/facebook/create-react-app/blob/main/packages/react-app-polyfill/README.md).
You can learn more about making AJAX requests from React components in [the FAQ entry on the React website](https://reactjs.org/docs/faq-ajax.html).
diff --git a/docusaurus/docs/getting-started.md b/docusaurus/docs/getting-started.md
index b95bc100470..9990a64cb76 100644
--- a/docusaurus/docs/getting-started.md
+++ b/docusaurus/docs/getting-started.md
@@ -34,7 +34,7 @@ Create a project, and you’re good to go.
## Creating an App
-**You’ll need to have Node >= 10 on your local development machine** (but it’s not required on the server). You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to switch Node versions between different projects.
+**You’ll need to have Node >= 14 on your local development machine** (but it’s not required on the server). You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to switch Node versions between different projects.
To create a new app, you may choose one of the following methods:
@@ -90,10 +90,13 @@ If you already have a project and would like to add TypeScript, see our [Adding
### Selecting a package manager
-When you create a new app, the CLI will use [Yarn](https://yarnpkg.com/) to install dependencies (when available). If you have Yarn installed, but would prefer to use npm, you can append `--use-npm` to the creation command. For example:
+When you create a new app, the CLI will use [npm](https://docs.npmjs.com) or [Yarn](https://yarnpkg.com/) to install dependencies, depending on which tool you use to run `create-react-app`. For example:
```sh
-npx create-react-app my-app --use-npm
+# Run this to use npm
+npx create-react-app my-app
+# Or run this to use yarn
+yarn create react-app my-app
```
## Output
diff --git a/docusaurus/docs/importing-a-component.md b/docusaurus/docs/importing-a-component.md
index 2f4a4c56a69..7f23cb9c7d5 100644
--- a/docusaurus/docs/importing-a-component.md
+++ b/docusaurus/docs/importing-a-component.md
@@ -5,7 +5,7 @@ title: Importing a Component
This project setup supports ES6 modules thanks to webpack.
-While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead.
+While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](https://exploringjs.com/es6/ch_modules.html) instead.
For example:
@@ -47,7 +47,7 @@ Named exports are useful for utility modules that export several functions. A mo
Learn more about ES6 modules:
- [When to use the curly braces?](https://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281)
-- [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html)
+- [Exploring ES6: Modules](https://exploringjs.com/es6/ch_modules.html)
- [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules)
## Absolute Imports
diff --git a/docusaurus/docs/making-a-progressive-web-app.md b/docusaurus/docs/making-a-progressive-web-app.md
index 649fb9cb320..fc8ba0a0da9 100644
--- a/docusaurus/docs/making-a-progressive-web-app.md
+++ b/docusaurus/docs/making-a-progressive-web-app.md
@@ -39,14 +39,14 @@ case.
In addition to creating your local `src/service-worker.js` file, it needs to be
registered before it will be used. In order to opt-in to the offline-first
behavior, developers should look for the following in their
-[`src/index.js`](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/src/index.js)
+[`src/index.js`](https://github.com/cra-template/pwa/blob/master/packages/cra-template-pwa/template/src/index.js)
file:
```js
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://cra.link/PWA
-serviceWorker.unregister();
+serviceWorkerRegistration.unregister();
```
As the comment states, switching `serviceWorker.unregister()` to
@@ -82,7 +82,7 @@ or unreliable network.
Note: Resources that are not generated by `webpack`, such as static files that are
copied over from your local
-[`public/` directory](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/public/)
+[`public/` directory](https://github.com/cra-template/pwa/tree/master/packages/cra-template-pwa/template/public/)
or third-party resources, will not be precached. You can optionally set up Workbox
[routes](https://developers.google.com/web/tools/workbox/guides/route-requests)
to apply the runtime caching strategy of your choice to those resources.
@@ -128,7 +128,7 @@ following into account:
fetched the latest updates that will be available the next time they load the
page (showing a "New content is available once existing tabs are closed." message). Showing
these messages is currently left as an exercise to the developer, but as a
- starting point, you can make use of the logic included in [`src/serviceWorker.js`](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/src/serviceWorker.js), which
+ starting point, you can make use of the logic included in [`src/serviceWorkerRegistration.js`](https://github.com/cra-template/pwa/blob/master/packages/cra-template-pwa/template/src/serviceWorkerRegistration.js), which
demonstrates which service worker lifecycle events to listen for to detect each
scenario, and which as a default, only logs appropriate messages to the
JavaScript console.
@@ -160,11 +160,11 @@ following into account:
## Progressive Web App Metadata
The default configuration includes a web app manifest located at
-[`public/manifest.json`](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/public/manifest.json), that you can customize with
+[`public/manifest.json`](https://github.com/cra-template/pwa/blob/master/packages/cra-template-pwa/template/public/manifest.json), that you can customize with
details specific to your web application.
When a user adds a web app to their homescreen using Chrome or Firefox on
-Android, the metadata in [`manifest.json`](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/public/manifest.json) determines what
+Android, the metadata in [`manifest.json`](https://github.com/cra-template/pwa/blob/master/packages/cra-template-pwa/template/public/manifest.json) determines what
icons, names, and branding colors to use when the web app is displayed.
[The Web App Manifest guide](https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/)
provides more context about what each field means, and how your customizations
diff --git a/docusaurus/docs/running-tests.md b/docusaurus/docs/running-tests.md
index 4090a1fcd6f..bc45a272acc 100644
--- a/docusaurus/docs/running-tests.md
+++ b/docusaurus/docs/running-tests.md
@@ -5,7 +5,7 @@ title: Running Tests
> Note: this feature is available with `react-scripts@0.3.0` and higher.
-> [Read the migration guide to learn how to enable it in older projects!](https://github.com/facebook/create-react-app/blob/master/CHANGELOG-0.x.md#migrating-from-023-to-030)
+> [Read the migration guide to learn how to enable it in older projects!](https://github.com/facebook/create-react-app/blob/main/CHANGELOG-0.x.md#migrating-from-023-to-030)
Create React App uses [Jest](https://jestjs.io/) as its test runner. To prepare for this integration, we did a [major revamp](https://jestjs.io/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try.
@@ -184,7 +184,7 @@ Note that tests run much slower with coverage so it is recommended to run it sep
### Configuration
-The [default configuration](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/scripts/utils/createJestConfig.js) that Create React App uses for Jest can be overridden by adding any of the following supported keys to a Jest config in your package.json.
+The [default configuration](https://github.com/facebook/create-react-app/blob/main/packages/react-scripts/scripts/utils/createJestConfig.js) that Create React App uses for Jest can be overridden by adding any of the following supported keys to a Jest config in your package.json.
Supported overrides:
diff --git a/docusaurus/docs/supported-browsers-features.md b/docusaurus/docs/supported-browsers-features.md
index 6a7123de5be..d104c19a0c5 100644
--- a/docusaurus/docs/supported-browsers-features.md
+++ b/docusaurus/docs/supported-browsers-features.md
@@ -6,7 +6,7 @@ sidebar_label: Supported Browsers and Features
## Supported Browsers
-By default, the generated project supports all modern browsers. Support for Internet Explorer 9, 10, and 11 requires polyfills. For a set of polyfills to support older browsers, use [react-app-polyfill](https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md).
+By default, the generated project supports all modern browsers. Support for Internet Explorer 9, 10, and 11 requires polyfills. For a set of polyfills to support older browsers, use [react-app-polyfill](https://github.com/facebook/create-react-app/blob/main/packages/react-app-polyfill/README.md).
## Supported Language Features
@@ -23,9 +23,9 @@ Learn more about [different proposal stages](https://tc39.github.io/process-docu
While we recommend using experimental proposals with some caution, Facebook heavily uses these features in the product code, so we intend to provide [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) if any of these proposals change in the future.
-Note that **this project includes no [polyfills](https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md)** by default.
+Note that **this project includes no [polyfills](https://github.com/facebook/create-react-app/blob/main/packages/react-app-polyfill/README.md)** by default.
-If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are [including the appropriate polyfills manually](https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md), or that the browsers you are targeting already support them.
+If you use any other ES6+ features that need **runtime support** (such as `Array.from()` or `Symbol`), make sure you are [including the appropriate polyfills manually](https://github.com/facebook/create-react-app/blob/main/packages/react-app-polyfill/README.md), or that the browsers you are targeting already support them.
## Configuring Supported Browsers
diff --git a/docusaurus/docs/updating-to-new-releases.md b/docusaurus/docs/updating-to-new-releases.md
index f8a2fa21850..02e47eb9238 100644
--- a/docusaurus/docs/updating-to-new-releases.md
+++ b/docusaurus/docs/updating-to-new-releases.md
@@ -8,13 +8,14 @@ Create React App is divided into two packages:
- `create-react-app` is a global command-line utility that you use to create new projects.
- `react-scripts` is a development dependency in the generated projects (including this one).
-When you run `npx create-react-app my-app` it automatically installs the latest version of Create React App.
-> If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, please visit [Getting Started](getting-started.md) to learn about current installation steps.
+When you run `npx create-react-app my-app` it automatically installs the latest version of Create React App.
+
+> If you've previously installed `create-react-app` globally via `npm install -g create-react-app`, please visit [Getting Started](getting-started.md) to learn about current installation steps.
Create React App creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically.
-To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions.
+To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebook/create-react-app/blob/main/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions.
-In most cases bumping the `react-scripts` version in `package.json` and running `npm install` (or `yarn install`) in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes.
+In most cases bumping the `react-scripts` version in `package.json` and running `npm install` (or `yarn install`) in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebook/create-react-app/blob/main/CHANGELOG.md) for potential breaking changes.
We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly.
diff --git a/docusaurus/docs/using-the-public-folder.md b/docusaurus/docs/using-the-public-folder.md
index 71266db6f81..a33c3a29ec8 100644
--- a/docusaurus/docs/using-the-public-folder.md
+++ b/docusaurus/docs/using-the-public-folder.md
@@ -60,7 +60,7 @@ The `public` folder is useful as a workaround for a number of less common cases:
- You need a file with a specific name in the build output, such as [`manifest.webmanifest`](https://developer.mozilla.org/en-US/docs/Web/Manifest).
- You have thousands of images and need to dynamically reference their paths.
-- You want to include a small script like [`pace.js`](https://github.hubspot.com/pace/docs/welcome/) outside of the bundled code.
+- You want to include a small script like [`pace.js`](https://github.com/CodeByZach/pace) outside of the bundled code.
- Some libraries may be incompatible with webpack and you have no other option but to include it as a `