Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 4.0.1 from Facebook #10

Merged
merged 10 commits into from
Nov 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: create-react-app
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
## 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!
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
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/).
1 change: 1 addition & 0 deletions docusaurus/docs/running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ To help you make up your mind, here is a list of APIs that **need jsdom**:
- [`ReactDOM.render()`](https://facebook.github.io/react/docs/top-level-api.html#reactdom.render)
- [`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)
- [`mount()`](https://airbnb.io/enzyme/docs/api/mount.html) in [Enzyme](https://airbnb.io/enzyme/index.html)
- [`render()`](https://testing-library.com/docs/react-testing-library/api/#render) in [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/)

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

Expand Down
2 changes: 1 addition & 1 deletion packages/cra-template-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cra-template-typescript",
"version": "1.1.0",
"version": "1.1.1",
"keywords": [
"react",
"create-react-app",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { ReportHandler } from 'web-vitals';
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
}
};

export default reportWebVitals;
2 changes: 1 addition & 1 deletion packages/cra-template/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cra-template",
"version": "1.1.0",
"version": "1.1.1",
"keywords": [
"react",
"create-react-app",
Expand Down
26 changes: 12 additions & 14 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const envinfo = require('envinfo');
const execSync = require('child_process').execSync;
const fs = require('fs-extra');
const hyperquest = require('hyperquest');
const inquirer = require('inquirer');
const prompts = require('prompts');
const os = require('os');
const path = require('path');
const semver = require('semver');
Expand Down Expand Up @@ -604,20 +604,18 @@ function getInstallPackage(version, originalDirectory) {

for (const script of scriptsToWarn) {
if (packageToInstall.startsWith(script.name)) {
return inquirer
.prompt({
type: 'confirm',
name: 'useScript',
message: script.message,
default: false,
})
.then(answer => {
if (!answer.useScript) {
process.exit(0);
}
return prompts({
type: 'confirm',
name: 'useScript',
message: script.message,
initial: false,
}).then(answer => {
if (!answer.useScript) {
process.exit(0);
}

return packageToInstall;
});
return packageToInstall;
});
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/create-react-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-app",
"version": "4.0.0",
"version": "4.0.1",
"keywords": [
"react"
],
Expand Down Expand Up @@ -35,7 +35,7 @@
"envinfo": "7.7.3",
"fs-extra": "9.0.1",
"hyperquest": "2.1.3",
"inquirer": "7.3.3",
"prompts": "2.4.0",
"semver": "7.3.2",
"tar-pack": "3.4.1",
"tmp": "0.2.1",
Expand Down
Loading