Skip to content

Commit bb64e31

Browse files
committedJul 7, 2021
Switch branch name
1 parent 78d86f6 commit bb64e31

21 files changed

+59
-60
lines changed
 

‎.github/workflows/integration.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Integration Tests
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
branches:
9-
- master
9+
- main
1010

1111
jobs:
1212
job:

‎CHANGELOG-0.x.md

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

‎CHANGELOG-1.x.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ or
13651365
yarn add --dev --exact react-scripts@1.0.2
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

@@ -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

‎CONTRIBUTING.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Please also provide a **test plan**, i.e. specify how you verified that your add
4848
## Folder Structure of Create React App
4949

5050
`create-react-app` is a monorepo, meaning it is divided into independent sub-packages.<br>
51-
These packages can be found in the [`packages/`](https://github.com/facebook/create-react-app/tree/master/packages) directory.
51+
These packages can be found in the [`packages/`](https://github.com/facebook/create-react-app/tree/main/packages) directory.
5252

5353
### Overview of directory structure
5454

@@ -63,27 +63,27 @@ packages/
6363

6464
### Package Descriptions
6565

66-
#### [babel-preset-react-app](https://github.com/facebook/create-react-app/tree/master/packages/babel-preset-react-app)
66+
#### [babel-preset-react-app](https://github.com/facebook/create-react-app/tree/main/packages/babel-preset-react-app)
6767

6868
This package is a babel preset intended to be used with `react-scripts`.<br>
6969
It targets platforms that React is designed to support (IE 11+) and enables experimental features used heavily at Facebook.<br>
7070
This package is enabled by default for all `create-react-app` scaffolded applications.
7171

72-
#### [create-react-app](https://github.com/facebook/create-react-app/tree/master/packages/create-react-app)
72+
#### [create-react-app](https://github.com/facebook/create-react-app/tree/main/packages/create-react-app)
7373

7474
The global CLI command code can be found in this directory, and shouldn't often be changed. It should run on Node 0.10+.
7575

76-
#### [eslint-config-react-app](https://github.com/facebook/create-react-app/tree/master/packages/eslint-config-react-app)
76+
#### [eslint-config-react-app](https://github.com/facebook/create-react-app/tree/main/packages/eslint-config-react-app)
7777

7878
This package contains a conservative set of rules focused on making errors apparent and enforces no style rules.<br>
7979
This package is enabled by default for all `create-react-app` scaffolded applications.
8080

81-
#### [react-dev-utils](https://github.com/facebook/create-react-app/tree/master/packages/react-dev-utils)
81+
#### [react-dev-utils](https://github.com/facebook/create-react-app/tree/main/packages/react-dev-utils)
8282

8383
This package contains utilities used for `react-scripts` and sibling packages.<br>
8484
Its main purpose is to conceal code which the user shouldn't be burdened with upon ejecting.
8585

86-
#### [react-scripts](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts)
86+
#### [react-scripts](https://github.com/facebook/create-react-app/tree/main/packages/react-scripts)
8787

8888
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.<br>
8989
All functionality must be retained (and configuration given to the user) if they choose to eject.
@@ -163,7 +163,7 @@ Make sure to test the released version! If you want to be extra careful, you can
163163
1. Go to the `docusaurus/website` directory
164164
2. Run `yarn build`
165165
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="..."`
166-
4. Run `GIT_USER=<GITHUB_USERNAME> CURRENT_BRANCH=master USE_SSH=true yarn deploy`
166+
4. Run `GIT_USER=<GITHUB_USERNAME> CURRENT_BRANCH=main USE_SSH=true yarn deploy`
167167

168168
---
169169

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 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)
1+
# 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)
22

33
<img alt="Logo" align="right" src="https://create-react-app.dev/img/logo.svg" width="20%" />
44

@@ -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). The Create React App logo is licensed under a [Creative Commons Attribution 4.0 International license](https://creativecommons.org/licenses/by/4.0/).
220+
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/).

‎azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
trigger:
6-
- master
6+
- main
77

88
variables:
99
CI: true

‎docusaurus/docs/adding-a-sass-stylesheet.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This will allow you to do imports like
3434
3535
`sass` also supports the `SASS_PATH` variable.
3636

37-
To use imports relative to a path you specify, 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 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`.
37+
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`.
3838

3939
> **Note:** For the Windows operating system, separate your paths by semicolons.
4040
>
@@ -65,4 +65,4 @@ To use imports relative to a path you specify, you can add a [`.env` file](https
6565
> # or
6666
> $ yarn remove node-sass
6767
> $ yarn add sass
68-
> ```
68+
> ```

‎docusaurus/docs/custom-templates.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ npx create-react-app my-app --template [template-name]
1919

2020
We ship two templates by default:
2121

22-
- [`cra-template`](https://github.com/facebook/create-react-app/tree/master/packages/cra-template)
23-
- [`cra-template-typescript`](https://github.com/facebook/create-react-app/tree/master/packages/cra-template-typescript)
22+
- [`cra-template`](https://github.com/facebook/create-react-app/tree/main/packages/cra-template)
23+
- [`cra-template-typescript`](https://github.com/facebook/create-react-app/tree/main/packages/cra-template-typescript)
2424

2525
However, you can find many great community templates by searching for ["cra-template-\*"](https://www.npmjs.com/search?q=cra-template-*) on npm.
2626

2727
## Building a template
2828

29-
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).
29+
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).
3030

3131
A template must have the following structure:
3232

‎docusaurus/docs/documentation-intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This website is only about Create React App.
1818

1919
## Something Missing?
2020

21-
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)
21+
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)
2222

2323
## Feedback
2424

‎docusaurus/docs/fetching-data-with-ajax-requests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ The global `fetch` function allows you to make AJAX requests. It takes in a URL
1111
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.
1212

1313
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.
14-
For example, support in Internet Explorer requires a [polyfill](https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md).
14+
For example, support in Internet Explorer requires a [polyfill](https://github.com/facebook/create-react-app/blob/main/packages/react-app-polyfill/README.md).
1515

1616
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).

‎docusaurus/docs/running-tests.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Running Tests
55

66
> Note: this feature is available with `react-scripts@0.3.0` and higher.
77
8-
> [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)
8+
> [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)
99
1010
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.
1111

@@ -184,7 +184,7 @@ Note that tests run much slower with coverage so it is recommended to run it sep
184184
185185
### Configuration
186186
187-
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.
187+
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.
188188
189189
Supported overrides:
190190

‎docusaurus/docs/supported-browsers-features.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_label: Supported Browsers and Features
66

77
## Supported Browsers
88

9-
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).
9+
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).
1010

1111
## Supported Language Features
1212

@@ -23,9 +23,9 @@ Learn more about [different proposal stages](https://tc39.github.io/process-docu
2323

2424
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.
2525

26-
Note that **this project includes no [polyfills](https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md)** by default.
26+
Note that **this project includes no [polyfills](https://github.com/facebook/create-react-app/blob/main/packages/react-app-polyfill/README.md)** by default.
2727

28-
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.
28+
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.
2929

3030
## Configuring Supported Browsers
3131

‎docusaurus/docs/updating-to-new-releases.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ Create React App is divided into two packages:
88
- `create-react-app` is a global command-line utility that you use to create new projects.
99
- `react-scripts` is a development dependency in the generated projects (including this one).
1010

11-
When you run `npx create-react-app my-app` it automatically installs the latest version of Create React App.
12-
> 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.
11+
When you run `npx create-react-app my-app` it automatically installs the latest version of Create React App.
12+
13+
> 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.
1314
1415
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.
1516

16-
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.
17+
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.
1718

18-
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.
19+
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.
1920

2021
We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly.

‎docusaurus/website/docusaurus.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const siteConfig = {
2121
path: '../docs',
2222
sidebarPath: require.resolve('./sidebars.json'),
2323
editUrl:
24-
'https://github.com/facebook/create-react-app/edit/master/docusaurus/website',
24+
'https://github.com/facebook/create-react-app/edit/main/docusaurus/website',
2525
showLastUpdateAuthor: true,
2626
showLastUpdateTime: true,
2727
},

‎packages/eslint-config-react-app/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ module.exports = {
280280
'jsx-a11y/role-supports-aria-props': 'warn',
281281
'jsx-a11y/scope': 'warn',
282282

283-
// https://github.com/facebook/react/tree/master/packages/eslint-plugin-react-hooks
283+
// https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
284284
'react-hooks/rules-of-hooks': 'error',
285285

286286
// https://github.com/gajus/eslint-plugin-flowtype

‎packages/react-scripts/config/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ module.exports = function (webpackEnv) {
665665
// This is necessary to emit hot updates (CSS and Fast Refresh):
666666
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
667667
// Experimental hot reloading for React .
668-
// https://github.com/facebook/react/tree/master/packages/react-refresh
668+
// https://github.com/facebook/react/tree/main/packages/react-refresh
669669
isEnvDevelopment &&
670670
shouldUseReactRefresh &&
671671
new ReactRefreshWebpackPlugin({
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This file has moved [here](https://github.com/facebook/create-react-app/blob/master/packages/cra-template-typescript/template/README.md)
1+
This file has moved [here](https://github.com/facebook/create-react-app/blob/main/packages/cra-template-typescript/template/README.md)
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This file has moved [here](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/README.md)
1+
This file has moved [here](https://github.com/facebook/create-react-app/blob/main/packages/cra-template/template/README.md)

‎tasks/publish.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# This releases an update to the `react-scripts` package.
99
# Don't use `npm publish` for it.
1010
# Read the release instructions:
11-
# https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md#cutting-a-release
11+
# https://github.com/facebook/create-react-app/blob/main/CONTRIBUTING.md#cutting-a-release
1212
# ******************************************************************************
1313

1414
# Start in tasks/ even if run from root directory

0 commit comments

Comments
 (0)
Please sign in to comment.