Skip to content

Commit 448e6fa

Browse files
aruniversezpbrentgaearonianschmitzdependabot[bot]
authored
sync with upstream v5.0 and react to breaking webpack5 changes (#67)
Co-authored-by: Zhou Peng <[email protected]> Co-authored-by: Dan Abramov <[email protected]> Co-authored-by: Ian Schmitz <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brody McKee <[email protected]> Co-authored-by: jasonwilliams <[email protected]> Co-authored-by: Joseph Atkins-Turkish <[email protected]> Co-authored-by: e-w-h <[email protected]> Co-authored-by: Shamprasad RH <[email protected]> Co-authored-by: James George <[email protected]> Co-authored-by: reetkr <[email protected]> Co-authored-by: Luke Karrys <[email protected]> Co-authored-by: huntr.dev | the place to protect open source <[email protected]> Co-authored-by: Morten N.O. Nørgaard Henriksen <[email protected]> Co-authored-by: ujihisa <[email protected]> Co-authored-by: Simon Lieschke <[email protected]> Co-authored-by: Christiaan van Bemmel <[email protected]> Co-authored-by: Max Romanyuta <[email protected]> Co-authored-by: Andrew Wong <[email protected]> Co-authored-by: Luke Kang <[email protected]> Co-authored-by: Jason Williams <[email protected]> Co-authored-by: Mohamed Akram <[email protected]> Co-authored-by: Brody McKee <[email protected]> Co-authored-by: Justin Grant <[email protected]> Co-authored-by: Dan Abramov <[email protected]> Co-authored-by: Michael Mok <[email protected]> Co-authored-by: Huáng Jùnliàng <[email protected]> Co-authored-by: Ian Sutherland <[email protected]> Co-authored-by: Nathan Bierema <[email protected]> Co-authored-by: Morten N.O. Nørgaard Henriksen <[email protected]> Co-authored-by: Hasan Ayan <[email protected]> Co-authored-by: Konrad Stepniak <[email protected]> Co-authored-by: Florian Guitton <[email protected]> Co-authored-by: Konrad Stepniak <[email protected]> Co-authored-by: Kristoffer K <[email protected]> Co-authored-by: Reetesh Kumar <[email protected]> Co-authored-by: shanyue <[email protected]> Co-authored-by: hadmarine <[email protected]> Co-authored-by: Leo Lamprecht <[email protected]> Co-authored-by: Michaël De Boey <[email protected]> Co-authored-by: jd1048576 <[email protected]> Co-authored-by: Jawad <[email protected]> Co-authored-by: mubarakn <[email protected]> Co-authored-by: Jason Finch <[email protected]> Co-authored-by: Dmitriy Fishman <[email protected]> Co-authored-by: Wisam Naji <[email protected]> Co-authored-by: psiservices-justin-sullard <[email protected]> Co-authored-by: Dmitry Vinnik <[email protected]> Co-authored-by: Arun George <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]> Co-authored-by: Matan Borenkraout <[email protected]> Co-authored-by: Kyle Tsang <[email protected]> Co-authored-by: Andrew Burnie <[email protected]>
1 parent 3ceb8ec commit 448e6fa

File tree

135 files changed

+54744
-23499
lines changed

Some content is hidden

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

135 files changed

+54744
-23499
lines changed

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"browser": true,
55
"commonjs": true,
66
"node": true,
7-
"es6": true
7+
"es6": true,
8+
"jest": true
89
},
910
"parserOptions": {
1011
"ecmaVersion": 2018

.github/CODEOWNERS

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
packages/ @ianschmitz @iansu @mrmckeb @petetnt
2-
docusaurus/ @ianschmitz @iansu @mrmckeb
1+
packages/react-scripts @aruniverse @wgoehrig @calebmshafer

.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ labels: 'issue: bug report, needs triage'
3232
* yarn.lock
3333
3434
Then you need to decide which package manager you prefer to use.
35-
We support both npm (https://npmjs.com) and yarn (http://yarnpkg.com/).
35+
We support both npm (https://npmjs.com) and yarn (https://yarnpkg.com/).
3636
However, **they can't be used together in one project** so you need to pick one.
3737
3838
If you decided to use npm, run this in your project directory:

.github/workflows/build.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v1
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v2
11+
with:
12+
node-version: '14'
13+
cache: 'npm'
14+
- name: Install npm@8
15+
run: npm i -g npm@8
1016
- name: Install
11-
run: yarn --no-progress --non-interactive --no-lockfile
17+
run: npm ci --prefer-offline
1218
- name: Build
13-
run: yarn build
19+
run: npm run build

.github/workflows/integration.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Integration Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
job:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
17+
node: ['14', '16']
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Setup node
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: ${{ matrix.node }}
24+
cache: 'npm'
25+
- name: Install npm@8
26+
run: npm i -g npm@8
27+
- name: Install yarn
28+
run: npm i -g yarn
29+
- name: Install packages
30+
run: npm ci --prefer-offline
31+
- name: Run integration tests
32+
run: npm run test:integration

.github/workflows/lint.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ jobs:
66
lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v1
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v2
11+
with:
12+
node-version: '14'
13+
cache: 'npm'
14+
- name: Install npm@8
15+
run: npm i -g npm@8
1016
- name: Install
11-
run: yarn --no-progress --non-interactive --no-lockfile
17+
run: npm ci --prefer-offline
1218
- name: Alex
13-
run: yarn alex
19+
run: npm run alex

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ yarn-debug.log*
1212
yarn-error.log*
1313
/.changelog
1414
.npm/
15-
yarn.lock

CHANGELOG-0.x.md

+19-19
Large diffs are not rendered by default.

CHANGELOG-1.x.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ or
13651365
yarn add --dev --exact [email protected]
13661366
```
13671367

1368-
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.
1368+
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.
13691369

13701370
## 1.0.1 (May 19, 2017)
13711371

@@ -1547,7 +1547,7 @@ You can automatically convert your project to fix them by running the [correspon
15471547

15481548
#### How do I make my tests work with Jest 20?
15491549

1550-
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.
1550+
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.
15511551

15521552
If you use snapshots, you will likely need to update them once because of the change in format.
15531553

@@ -1572,7 +1572,7 @@ If you still have the problem please file an issue.
15721572

15731573
Unhandled Promise rejections will now crash tests. You can fix them by explicitly catching the errors you don’t care about.
15741574

1575-
#### 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)?
1575+
#### 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)?
15761576

15771577
After the regular update procedure above, add these line to `<head>` in `public/index.html`:
15781578

@@ -1588,9 +1588,7 @@ After the regular update procedure above, add these line to `<head>` in `public/
15881588
Add `<noscript>` to `<body>` in `public/index.html`:
15891589

15901590
```html
1591-
<noscript>
1592-
You need to enable JavaScript to run this app.
1593-
</noscript>
1591+
<noscript> You need to enable JavaScript to run this app. </noscript>
15941592
```
15951593

15961594
Then create a file called `public/manifest.json` that looks like this:

CHANGELOG-2.x.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ import 'react-app-polyfill/ie9'; // For IE 9-11 support
823823
import 'react-app-polyfill/ie11'; // For IE 11 support
824824
```
825825

826-
You can read more about [these polyfills here](https://github.com/facebook/create-react-app/tree/master/packages/react-app-polyfill).
826+
You can read more about [these polyfills here](https://github.com/facebook/create-react-app/tree/main/packages/react-app-polyfill).
827827

828828
### Dynamic `import()` of a CommonJS module now has a `.default` property
829829

@@ -845,7 +845,7 @@ We previously allowed code splitting with a webpack-specific directive, `require
845845
**Single Module**
846846

847847
```js
848-
require.ensure(['module-a'], function() {
848+
require.ensure(['module-a'], function () {
849849
var a = require('module-a');
850850
// ...
851851
});
@@ -859,7 +859,7 @@ import('module-a').then(a => {
859859
**Multiple Module**
860860

861861
```js
862-
require.ensure(['module-a', 'module-b'], function() {
862+
require.ensure(['module-a', 'module-b'], function () {
863863
var a = require('module-a');
864864
var b = require('module-b');
865865
// ...
@@ -913,7 +913,7 @@ Next, create `src/setupProxy.js` and place the following contents in it:
913913
```js
914914
const proxy = require('http-proxy-middleware');
915915

916-
module.exports = function(app) {
916+
module.exports = function (app) {
917917
// ...
918918
};
919919
```
@@ -936,7 +936,7 @@ Place entries into `src/setupProxy.js` like so:
936936
```js
937937
const proxy = require('http-proxy-middleware');
938938

939-
module.exports = function(app) {
939+
module.exports = function (app) {
940940
app.use(proxy('/api', { target: 'http://localhost:5000/' }));
941941
app.use(proxy('/*.svg', { target: 'http://localhost:5000/' }));
942942
};

CHANGELOG-3.x.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ v3.3.0 is a minor release that adds new features, including custom templates and
330330

331331
You can now create a new app using custom templates.
332332

333-
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.
333+
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.
334334

335335
The below command shows how you can create a new app with `cra-template-typescript`.
336336

0 commit comments

Comments
 (0)