Skip to content

Commit

Permalink
Switch branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Jul 7, 2021
1 parent 78d86f6 commit bb64e31
Show file tree
Hide file tree
Showing 21 changed files with 59 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Integration Tests
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
job:
Expand Down
30 changes: 15 additions & 15 deletions CHANGELOG-0.x.md

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions CHANGELOG-1.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ or
yarn add --dev --exact react-scripts@1.0.2
```

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

## 1.0.1 (May 19, 2017)

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

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

#### 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)?
#### 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)?

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

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

```html
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<noscript> You need to enable JavaScript to run this app. </noscript>
```

Then create a file called `public/manifest.json` that looks like this:
Expand Down
10 changes: 5 additions & 5 deletions CHANGELOG-2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ import 'react-app-polyfill/ie9'; // For IE 9-11 support
import 'react-app-polyfill/ie11'; // For IE 11 support
```

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

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

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

```js
require.ensure(['module-a'], function() {
require.ensure(['module-a'], function () {
var a = require('module-a');
// ...
});
Expand All @@ -859,7 +859,7 @@ import('module-a').then(a => {
**Multiple Module**

```js
require.ensure(['module-a', 'module-b'], function() {
require.ensure(['module-a', 'module-b'], function () {
var a = require('module-a');
var b = require('module-b');
// ...
Expand Down Expand Up @@ -913,7 +913,7 @@ Next, create `src/setupProxy.js` and place the following contents in it:
```js
const proxy = require('http-proxy-middleware');

module.exports = function(app) {
module.exports = function (app) {
// ...
};
```
Expand All @@ -936,7 +936,7 @@ Place entries into `src/setupProxy.js` like so:
```js
const proxy = require('http-proxy-middleware');

module.exports = function(app) {
module.exports = function (app) {
app.use(proxy('/api', { target: 'http://localhost:5000/' }));
app.use(proxy('/*.svg', { target: 'http://localhost:5000/' }));
};
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG-3.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ v3.3.0 is a minor release that adds new features, including custom templates and

You can now create a new app using custom templates.

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

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

Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Please also provide a **test plan**, i.e. specify how you verified that your add
## Folder Structure of Create React App

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

### Overview of directory structure

Expand All @@ -63,27 +63,27 @@ packages/

### Package Descriptions

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

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

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

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

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

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

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

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

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

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

---

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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)
# 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)

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

Expand Down 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). The Create React App logo is licensed under a [Creative Commons Attribution 4.0 International license](https://creativecommons.org/licenses/by/4.0/).
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/).
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

trigger:
- master
- main

variables:
CI: true
Expand Down
4 changes: 2 additions & 2 deletions docusaurus/docs/adding-a-sass-stylesheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This will allow you to do imports like
`sass` also supports the `SASS_PATH` variable.

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`.
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`.

> **Note:** For the Windows operating system, separate your paths by semicolons.
>
Expand Down Expand Up @@ -65,4 +65,4 @@ To use imports relative to a path you specify, you can add a [`.env` file](https
> # or
> $ yarn remove node-sass
> $ yarn add sass
> ```
> ```
6 changes: 3 additions & 3 deletions docusaurus/docs/custom-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ npx create-react-app my-app --template [template-name]

We ship two templates by default:

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

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

## Building a template

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

A template must have the following structure:

Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/documentation-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This website is only about Create React App.

## Something Missing?

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

## Feedback

Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/fetching-data-with-ajax-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ The global `fetch` function allows you to make AJAX requests. It takes in a URL
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.

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

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).
4 changes: 2 additions & 2 deletions docusaurus/docs/running-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Running Tests

> Note: this feature is available with `react-scripts@0.3.0` and higher.
> [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)
> [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)
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.

Expand Down Expand Up @@ -184,7 +184,7 @@ Note that tests run much slower with coverage so it is recommended to run it sep
### Configuration
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.
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.
Supported overrides:
Expand Down
6 changes: 3 additions & 3 deletions docusaurus/docs/supported-browsers-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: Supported Browsers and Features

## Supported Browsers

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

## Supported Language Features

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

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.

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

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

## Configuring Supported Browsers

Expand Down
9 changes: 5 additions & 4 deletions docusaurus/docs/updating-to-new-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ Create React App is divided into two packages:
- `create-react-app` is a global command-line utility that you use to create new projects.
- `react-scripts` is a development dependency in the generated projects (including this one).

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

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

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

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

We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly.
2 changes: 1 addition & 1 deletion docusaurus/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const siteConfig = {
path: '../docs',
sidebarPath: require.resolve('./sidebars.json'),
editUrl:
'https://github.com/facebook/create-react-app/edit/master/docusaurus/website',
'https://github.com/facebook/create-react-app/edit/main/docusaurus/website',
showLastUpdateAuthor: true,
showLastUpdateTime: true,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ module.exports = {
'jsx-a11y/role-supports-aria-props': 'warn',
'jsx-a11y/scope': 'warn',

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

// https://github.com/gajus/eslint-plugin-flowtype
Expand Down
Loading

0 comments on commit bb64e31

Please sign in to comment.