Skip to content

Commit 4ee2764

Browse files
blackarcticryota-murakamiKonstantinSimeonoviansusho-t
authored
Update to 4.0.1 from Facebook (#10)
* Fix noFallthroughCasesInSwitch/jsx object is not extensible (facebook#9921) Co-authored-by: Konstantin Simeonov <[email protected]> * Add logo license to README * Remove trailing space in reportWebVitals.ts (facebook#10040) * docs: add React Testing Library as a library requiring jsdom (facebook#10052) Co-authored-by: Ian Schmitz <[email protected]> * Increase Workbox's maximumFileSizeToCacheInBytes (facebook#10048) * Create FUNDING.yml * replace inquirer with prompts (facebook#10083) - remove `react-dev-utils/inquirer` public import * Prepare 4.0.1 release * Prepare 4.0.1 release * Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] Co-authored-by: Ryota Murakami <[email protected]> Co-authored-by: Konstantin Simeonov <[email protected]> Co-authored-by: Ian Sutherland <[email protected]> Co-authored-by: sho90 <[email protected]> Co-authored-by: Anyul Rivas <[email protected]> Co-authored-by: Ian Schmitz <[email protected]> Co-authored-by: Jeffrey Posnick <[email protected]> Co-authored-by: Evan Bacon <[email protected]>
1 parent eefe7e2 commit 4ee2764

File tree

18 files changed

+1442
-1594
lines changed

18 files changed

+1442
-1594
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
open_collective: create-react-app

CHANGELOG.md

+58
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1+
## 4.0.1 (2020-11-23)
2+
3+
v4.0.1 is a maintenance release that includes minor bug fixes and documentation updates.
4+
5+
#### :bug: Bug Fix
6+
7+
- `react-scripts`
8+
- [#9921](https://github.com/facebook/create-react-app/pull/9921) Fix noFallthroughCasesInSwitch/jsx object is not extensible ([@ryota-murakami](https://github.com/ryota-murakami))
9+
- [#9869](https://github.com/facebook/create-react-app/pull/9869) Fix react-jsx error ([@benneq](https://github.com/benneq))
10+
- [#9885](https://github.com/facebook/create-react-app/pull/9885) fix: `React is not defined` compilation error after ejected ([@n3tr](https://github.com/n3tr))
11+
- [#9911](https://github.com/facebook/create-react-app/pull/9911) fix: slow recompile time ([@FezVrasta](https://github.com/FezVrasta))
12+
- `react-dev-utils`
13+
- [#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))
14+
15+
#### :nail_care: Enhancement
16+
17+
- `react-scripts`
18+
- [#10048](https://github.com/facebook/create-react-app/pull/10048) Increase Workbox's maximumFileSizeToCacheInBytes ([@jeffposnick](https://github.com/jeffposnick))
19+
20+
#### :memo: Documentation
21+
22+
- [#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))
23+
24+
#### :house: Internal
25+
26+
- `create-react-app`, `react-dev-utils`, `react-scripts`
27+
- [#10083](https://github.com/facebook/create-react-app/pull/10083) replace inquirer with prompts ([@EvanBacon](https://github.com/EvanBacon))
28+
- `cra-template-typescript`, `cra-template`, `react-scripts`
29+
- [#9516](https://github.com/facebook/create-react-app/pull/9516) [ImgBot] Optimize images ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
30+
- Other
31+
- [#9860](https://github.com/facebook/create-react-app/pull/9860) chore: Update .prettierrc ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
32+
33+
#### Committers: 9
34+
35+
- Anyul Rivas ([@anyulled](https://github.com/anyulled))
36+
- Ben M ([@benneq](https://github.com/benneq))
37+
- Evan Bacon ([@EvanBacon](https://github.com/EvanBacon))
38+
- Federico Zivolo ([@FezVrasta](https://github.com/FezVrasta))
39+
- Jeffrey Posnick ([@jeffposnick](https://github.com/jeffposnick))
40+
- Jirat Ki. ([@n3tr](https://github.com/n3tr))
41+
- Michaël De Boey ([@MichaelDeBoey](https://github.com/MichaelDeBoey))
42+
- Ryota Murakami ([@ryota-murakami](https://github.com/ryota-murakami))
43+
- sho90 ([@sho-t](https://github.com/sho-t))
44+
45+
# Migrating from 4.0.0 to 4.0.1
46+
47+
Inside any created project that has not been ejected, run:
48+
49+
```bash
50+
npm install --save --save-exact [email protected]
51+
```
52+
53+
or
54+
55+
```
56+
yarn add --exact [email protected]
57+
```
58+
159
## 4.0.0 (2020-10-23)
260

361
Create React App 4.0 is a major release with several new features, including support for Fast Refresh!

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,4 @@ We are grateful to the authors of existing related projects for their ideas and
217217

218218
## License
219219

220-
Create React App is open source software [licensed as MIT](https://github.com/facebook/create-react-app/blob/master/LICENSE).
220+
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/).

docusaurus/docs/running-tests.md

+1
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ To help you make up your mind, here is a list of APIs that **need jsdom**:
321321
- [`ReactDOM.render()`](https://facebook.github.io/react/docs/top-level-api.html#reactdom.render)
322322
- [`TestUtils.renderIntoDocument()`](https://facebook.github.io/react/docs/test-utils.html#renderintodocument) ([a shortcut](https://github.com/facebook/react/blob/34761cf9a252964abfaab6faf74d473ad95d1f21/src/test/ReactTestUtils.js#L83-L91) for the above)
323323
- [`mount()`](https://airbnb.io/enzyme/docs/api/mount.html) in [Enzyme](https://airbnb.io/enzyme/index.html)
324+
- [`render()`](https://testing-library.com/docs/react-testing-library/api/#render) in [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/)
324325

325326
In contrast, **jsdom is not needed** for the following APIs:
326327

packages/cra-template-typescript/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cra-template-typescript",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"keywords": [
55
"react",
66
"create-react-app",

packages/cra-template-typescript/template/src/reportWebVitals.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { ReportHandler } from 'web-vitals';
33
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
44
if (onPerfEntry && onPerfEntry instanceof Function) {
55
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6-
getCLS(onPerfEntry);
6+
getCLS(onPerfEntry);
77
getFID(onPerfEntry);
88
getFCP(onPerfEntry);
99
getLCP(onPerfEntry);
1010
getTTFB(onPerfEntry);
1111
});
1212
}
13-
}
13+
};
1414

1515
export default reportWebVitals;

packages/cra-template/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cra-template",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"keywords": [
55
"react",
66
"create-react-app",

packages/create-react-app/createReactApp.js

+12-14
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const envinfo = require('envinfo');
3737
const execSync = require('child_process').execSync;
3838
const fs = require('fs-extra');
3939
const hyperquest = require('hyperquest');
40-
const inquirer = require('inquirer');
40+
const prompts = require('prompts');
4141
const os = require('os');
4242
const path = require('path');
4343
const semver = require('semver');
@@ -604,20 +604,18 @@ function getInstallPackage(version, originalDirectory) {
604604

605605
for (const script of scriptsToWarn) {
606606
if (packageToInstall.startsWith(script.name)) {
607-
return inquirer
608-
.prompt({
609-
type: 'confirm',
610-
name: 'useScript',
611-
message: script.message,
612-
default: false,
613-
})
614-
.then(answer => {
615-
if (!answer.useScript) {
616-
process.exit(0);
617-
}
607+
return prompts({
608+
type: 'confirm',
609+
name: 'useScript',
610+
message: script.message,
611+
initial: false,
612+
}).then(answer => {
613+
if (!answer.useScript) {
614+
process.exit(0);
615+
}
618616

619-
return packageToInstall;
620-
});
617+
return packageToInstall;
618+
});
621619
}
622620
}
623621

packages/create-react-app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-react-app",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"keywords": [
55
"react"
66
],
@@ -35,7 +35,7 @@
3535
"envinfo": "7.7.3",
3636
"fs-extra": "9.0.1",
3737
"hyperquest": "2.1.3",
38-
"inquirer": "7.3.3",
38+
"prompts": "2.4.0",
3939
"semver": "7.3.2",
4040
"tar-pack": "3.4.1",
4141
"tmp": "0.2.1",

0 commit comments

Comments
 (0)