Skip to content

Commit 886ea93

Browse files
authored
Merge pull request #3 from sinecycle/fb-master
Upgrade to CRA v5.0.1
2 parents 7519045 + f577d39 commit 886ea93

File tree

74 files changed

+475
-262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+475
-262
lines changed

.eslintignore

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
node_modules/
2-
build
3-
my-app*
4-
packages/react-scripts/template
5-
packages/react-scripts/fixtures
6-
fixtures/
2+
build/
3+
test/fixtures/webpack-message-formatting/src/AppBabel.js
4+
packages/react-error-overlay/lib/

.eslintrc.json

+35-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,39 @@
1414
"no-console": "off",
1515
"strict": ["error", "global"],
1616
"curly": "warn"
17-
}
17+
},
18+
"overrides": [
19+
{
20+
"files": [
21+
"docusaurus/website/src/**/*.js",
22+
"packages/cra-template/**/*.js",
23+
"packages/react-error-overlay/**/*.js",
24+
"packages/react-scripts/fixtures/kitchensink/template/{src,integration}/**/*.js",
25+
"test/fixtures/*/src/*.js"
26+
],
27+
"excludedFiles": ["packages/react-error-overlay/*.js"],
28+
"extends": ["react-app", "react-app/jest"]
29+
},
30+
{
31+
"files": [
32+
"test/fixtures/webpack-message-formatting/src/{AppLintError,AppLintWarning,AppUnknownFile}.js"
33+
],
34+
"rules": {
35+
"no-unused-vars": "off",
36+
"no-undef": "off"
37+
}
38+
},
39+
{
40+
"files": ["test/fixtures/webpack-message-formatting/src/Export5.js"],
41+
"rules": {
42+
"import/no-anonymous-default-export": "off"
43+
}
44+
},
45+
{
46+
"files": ["test/fixtures/issue-5176-flow-class-properties/src/App.js"],
47+
"rules": {
48+
"no-dupe-class-members": "off"
49+
}
50+
}
51+
]
1852
}

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Build
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
build:

.github/workflows/lint.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Lint
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
lint:
@@ -15,5 +15,11 @@ jobs:
1515
run: npm i -g npm@8
1616
- name: Install
1717
run: npm ci --prefer-offline
18+
- name: Build
19+
run: npm run build
1820
- name: Alex
1921
run: npm run alex
22+
- name: Prettier
23+
run: npm run prettier -- --list-different
24+
- name: Eslint
25+
run: npm run eslint -- --max-warnings 0

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.idea/
22
.vscode/
33
node_modules/
4-
build
4+
build/
55
.DS_Store
66
*.tgz
77
my-app*

.prettierignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
build/
2+
package-lock.json
3+
test/fixtures/webpack-message-formatting/src/AppBabel.js
4+
test/fixtures/webpack-message-formatting/src/AppCss.css
5+
packages/react-error-overlay/fixtures/bundle*
6+
packages/react-error-overlay/fixtures/inline*
7+
packages/react-error-overlay/fixtures/junk*
8+
packages/react-error-overlay/lib/
9+
packages/react-error-overlay/coverage/

CHANGELOG.md

+60
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,63 @@
1+
## 5.0.1 (2022-04-12)
2+
3+
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.
4+
5+
# Migrating from 5.0.0 to 5.0.1
6+
7+
Inside any created project that has not been ejected, run:
8+
9+
```
10+
npm install --save --save-exact [email protected]
11+
```
12+
13+
or
14+
15+
```
16+
yarn add --exact [email protected]
17+
```
18+
19+
#### :bug: Bug Fix
20+
21+
- `react-scripts`
22+
- [#12245](https://github.com/facebook/create-react-app/pull/12245) fix: webpack noise printed only if error or warning ([@Andrew47](https://github.com/Andrew47))
23+
- `create-react-app`
24+
- [#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))
25+
- `react-dev-utils`
26+
- [#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))
27+
28+
#### :nail_care: Enhancement
29+
30+
- `cra-template-typescript`, `cra-template`, `react-scripts`
31+
- [#12220](https://github.com/facebook/create-react-app/pull/12220) Update templates to use React 18 `createRoot` ([@kyletsang](https://github.com/kyletsang))
32+
- `cra-template-typescript`, `cra-template`
33+
- [#12223](https://github.com/facebook/create-react-app/pull/12223) chore: upgrade rtl version to support react 18 ([@MatanBobi](https://github.com/MatanBobi))
34+
- `eslint-config-react-app`
35+
- [#11622](https://github.com/facebook/create-react-app/pull/11622) updated deprecated rules ([@wisammechano](https://github.com/wisammechano))
36+
37+
#### :memo: Documentation
38+
39+
- [#11594](https://github.com/facebook/create-react-app/pull/11594) Fix a typo in deployment.md ([@fishmandev](https://github.com/fishmandev))
40+
- [#11805](https://github.com/facebook/create-react-app/pull/11805) docs: Changelog 5.0.0 ([@jafin](https://github.com/jafin))
41+
- [#11757](https://github.com/facebook/create-react-app/pull/11757) prevent both npm and yarn commands from being copied ([@mubarakn](https://github.com/mubarakn))
42+
43+
#### :house: Internal
44+
45+
- [#11985](https://github.com/facebook/create-react-app/pull/11985) Ignore docs when publishing ([@iansu](https://github.com/iansu))
46+
47+
#### Committers: 11
48+
49+
- Andrew Burnie ([@Andrew47](https://github.com/Andrew47))
50+
- Clément Vannicatte ([@shortcuts](https://github.com/shortcuts))
51+
- Dmitriy Fishman ([@fishmandev](https://github.com/fishmandev))
52+
- Dmitry Vinnik ([@dmitryvinn](https://github.com/dmitryvinn))
53+
- Ian Sutherland ([@iansu](https://github.com/iansu))
54+
- Jason Finch ([@jafin](https://github.com/jafin))
55+
- Kyle Tsang ([@kyletsang](https://github.com/kyletsang))
56+
- Matan Borenkraout ([@MatanBobi](https://github.com/MatanBobi))
57+
- Wisam Naji ([@wisammechano](https://github.com/wisammechano))
58+
- [@mubarakn](https://github.com/mubarakn)
59+
- [@psiservices-justin-sullard](https://github.com/psiservices-justin-sullard)
60+
161
## 5.0.0 (2021-12-14)
262

363
Create React App 5.0 is a major release with several new features and the latest version of all major dependencies.

docusaurus/docs/adding-typescript.md

+4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ To start a new Create React App project with [TypeScript](https://www.typescript
1414
```sh
1515
npx create-react-app my-app --template typescript
1616
```
17+
1718
or
19+
1820
```sh
1921
yarn create react-app my-app --template typescript
2022
```
@@ -28,7 +30,9 @@ To add [TypeScript](https://www.typescriptlang.org/) to an existing Create React
2830
```sh
2931
npm install --save typescript @types/node @types/react @types/react-dom @types/jest
3032
```
33+
3134
or
35+
3236
```sh
3337
yarn add typescript @types/node @types/react @types/react-dom @types/jest
3438
```

docusaurus/docs/advanced-configuration.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can adjust various development and production settings by setting environmen
1515
| 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. |
1616
| HTTPS | ✅ Used | 🚫 Ignored | When set to `true`, Create React App will run the development server in `https` mode. |
1717
| 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. |
18-
| 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. |
18+
| 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. |
1919
| 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. |
2020
| 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. |
2121
| 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
2424
| 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. |
2525
| 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. |
2626
| 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. |
27-
| 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. |
27+
| 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. |
2828
| 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. |
2929
| 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. |
3030
| 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. |

docusaurus/docs/loading-graphql-files.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ You can also use the `gql` template tag the same way you would use the non-macro
5757

5858
```js
5959
import { gql } from 'graphql.macro';
60-
60+
6161
const query = gql`
6262
query User {
6363
user(id: 5) {

docusaurus/docs/proxying-api-requests-in-development.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Next, create `src/setupProxy.js` and place the following contents in it:
8787
```js
8888
const { createProxyMiddleware } = require('http-proxy-middleware');
8989

90-
module.exports = function(app) {
90+
module.exports = function (app) {
9191
// ...
9292
};
9393
```
@@ -97,7 +97,7 @@ You can now register proxies as you wish! Here's an example using the above `htt
9797
```js
9898
const { createProxyMiddleware } = require('http-proxy-middleware');
9999

100-
module.exports = function(app) {
100+
module.exports = function (app) {
101101
app.use(
102102
'/api',
103103
createProxyMiddleware({

docusaurus/website/docusaurus.config.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*/
7+
'use strict';
78

89
const siteConfig = {
910
title: 'Create React App',
@@ -43,8 +44,8 @@ const siteConfig = {
4344
isCloseable: false,
4445
},
4546
algolia: {
46-
appId: 'create-react-app',
47-
apiKey: '3be60f4f8ffc24c75da84857d6323791',
47+
appId: 'AUJYIQ70HN',
48+
apiKey: '25243dbf9049cf036e87f64b361bd2b9',
4849
indexName: 'create-react-app',
4950
},
5051
navbar: {
@@ -88,8 +89,7 @@ const siteConfig = {
8889
items: [
8990
{
9091
label: 'Stack Overflow',
91-
href:
92-
'https://stackoverflow.com/questions/tagged/create-react-app',
92+
href: 'https://stackoverflow.com/questions/tagged/create-react-app',
9393
},
9494
{
9595
label: 'GitHub Discussions',
@@ -101,8 +101,7 @@ const siteConfig = {
101101
},
102102
{
103103
label: 'Contributor Covenant',
104-
href:
105-
'https://www.contributor-covenant.org/version/1/4/code-of-conduct',
104+
href: 'https://www.contributor-covenant.org/version/1/4/code-of-conduct',
106105
},
107106
],
108107
},

0 commit comments

Comments
 (0)