diff --git a/.circleci/config.yml b/.circleci/config.yml index e8c5de99aa3b0..e157cb4427079 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -171,9 +171,9 @@ jobs: - run: name: Download artifacts for base revision command: | - git fetch origin master + git fetch origin main cd ./scripts/release && yarn && cd ../../ - scripts/release/download-experimental-build.js --commit=$(git merge-base HEAD origin/master) + scripts/release/download-experimental-build.js --commit=$(git merge-base HEAD origin/main) mv ./build2 ./base-build - persist_to_workspace: root: . @@ -356,7 +356,7 @@ jobs: - run: name: Run publish script command: | - git fetch origin master + git fetch origin main cd ./scripts/release && yarn && cd ../../ scripts/release/prepare-release-from-ci.js --skipTests -r << parameters.release_channel >> --commit=<< parameters.commit_sha >> cp ./scripts/release/ci-npmrc ~/.npmrc @@ -414,7 +414,7 @@ workflows: filters: branches: only: - - master + - main # New workflow that will replace "stable" and "experimental" build_and_test: @@ -491,14 +491,14 @@ workflows: filters: branches: ignore: - - master + - main requires: - setup - sizebot: filters: branches: ignore: - - master + - main requires: - get_base_build - yarn_build_combined @@ -514,7 +514,7 @@ workflows: filters: branches: only: - - master + - main jobs: - setup - test_fuzz: @@ -555,7 +555,7 @@ workflows: filters: branches: only: - - master + - main jobs: - setup - publish_prerelease: diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 11ef400966cd8..27d6a428c0448 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ Before submitting a pull request, please make sure the following is done: - 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `master`. + 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ed8f56c51da3..a7ec5b94efdc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -679,7 +679,7 @@ This release was published in a broken state and should be skipped. ### React Is (New) -* First release of the [new package](https://github.com/facebook/react/tree/master/packages/react-is) that libraries can use to detect different React node types. ([@bvaughn](https://github.com/bvaughn) in [#12199](https://github.com/facebook/react/pull/12199)) +* First release of the [new package](https://github.com/facebook/react/tree/main/packages/react-is) that libraries can use to detect different React node types. ([@bvaughn](https://github.com/bvaughn) in [#12199](https://github.com/facebook/react/pull/12199)) * Add `ReactIs.isValidElementType()` to help higher-order components validate their inputs. ([@jamesreggio](https://github.com/jamesreggio) in [#12483](https://github.com/facebook/react/pull/12483)) ### React Lifecycles Compat (New) @@ -688,7 +688,7 @@ This release was published in a broken state and should be skipped. ### Create Subscription (New) -* First release of the [new package](https://github.com/facebook/react/tree/master/packages/create-subscription) to subscribe to external data sources safely for async rendering. ([@bvaughn](https://github.com/bvaughn) in [#12325](https://github.com/facebook/react/pull/12325)) +* First release of the [new package](https://github.com/facebook/react/tree/main/packages/create-subscription) to subscribe to external data sources safely for async rendering. ([@bvaughn](https://github.com/bvaughn) in [#12325](https://github.com/facebook/react/pull/12325)) ### React Reconciler (Experimental) @@ -819,12 +819,12 @@ Starting with 16.1.0, we will no longer be publishing new releases on Bower. You ### React Reconciler (Experimental) -* First release of the [new experimental package](https://github.com/facebook/react/blob/master/packages/react-reconciler/README.md) for creating custom renderers. ([@iamdustan](https://github.com/iamdustan) in [#10758](https://github.com/facebook/react/pull/10758)) +* First release of the [new experimental package](https://github.com/facebook/react/blob/main/packages/react-reconciler/README.md) for creating custom renderers. ([@iamdustan](https://github.com/iamdustan) in [#10758](https://github.com/facebook/react/pull/10758)) * Add support for React DevTools. ([@gaearon](https://github.com/gaearon) in [#11463](https://github.com/facebook/react/pull/11463)) ### React Call Return (Experimental) -* First release of the [new experimental package](https://github.com/facebook/react/tree/master/packages/react-call-return) for parent-child communication. ([@gaearon](https://github.com/gaearon) in [#11364](https://github.com/facebook/react/pull/11364)) +* First release of the [new experimental package](https://github.com/facebook/react/tree/main/packages/react-call-return) for parent-child communication. ([@gaearon](https://github.com/gaearon) in [#11364](https://github.com/facebook/react/pull/11364)) ## 16.0.1 (August 1, 2018) diff --git a/README.md b/README.md index 33d3929acc15d..1a5a64e0dc707 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# [React](https://reactjs.org/) · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/react/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/react.svg?style=flat)](https://www.npmjs.com/package/react) [![CircleCI Status](https://circleci.com/gh/facebook/react.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/facebook/react) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://reactjs.org/docs/how-to-contribute.html#your-first-pull-request) +# [React](https://reactjs.org/) · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/react/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/react.svg?style=flat)](https://www.npmjs.com/package/react) [![CircleCI Status](https://circleci.com/gh/facebook/react.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/facebook/react) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://reactjs.org/docs/how-to-contribute.html#your-first-pull-request) React is a JavaScript library for building user interfaces. diff --git a/appveyor.yml b/appveyor.yml index 8191e610a95ff..a50df340f51ae 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,7 +18,7 @@ platform: branches: only: - - master + - main # Disable Visual Studio build and deploy build: off diff --git a/packages/create-subscription/README.md b/packages/create-subscription/README.md index c294b894f51fd..39248568a0333 100644 --- a/packages/create-subscription/README.md +++ b/packages/create-subscription/README.md @@ -8,7 +8,7 @@ This utility should be used for subscriptions to a single value that are typical Other cases have **better long-term solutions**: * Redux/Flux stores should use the [context API](https://reactjs.org/docs/context.html) instead. -* I/O subscriptions (e.g. notifications) that update infrequently should use [`react-cache`](https://github.com/facebook/react/blob/master/packages/react-cache/README.md) instead. +* I/O subscriptions (e.g. notifications) that update infrequently should use [`react-cache`](https://github.com/facebook/react/blob/main/packages/react-cache/README.md) instead. * Complex libraries like Relay/Apollo should manage subscriptions manually with the same techniques which this library uses under the hood (as referenced [here](https://gist.github.com/bvaughn/d569177d70b50b58bff69c3c4a5353f3)) in a way that is most optimized for their library usage. ## Limitations in async mode diff --git a/packages/eslint-plugin-react-hooks/CHANGELOG.md b/packages/eslint-plugin-react-hooks/CHANGELOG.md index 0ca1cda305ed5..b3e5d1736cb4c 100644 --- a/packages/eslint-plugin-react-hooks/CHANGELOG.md +++ b/packages/eslint-plugin-react-hooks/CHANGELOG.md @@ -71,4 +71,4 @@ ## 1.x -The 1.x releases aren’t noted in this changelog, but you can find them in the [commit history](https://github.com/facebook/react/commits/master/packages/eslint-plugin-react-hooks). +The 1.x releases aren’t noted in this changelog, but you can find them in the [commit history](https://github.com/facebook/react/commits/main/packages/eslint-plugin-react-hooks). diff --git a/packages/react-devtools-extensions/flow-typed/npm/react-test-renderer_v16.x.x.js b/packages/react-devtools-extensions/flow-typed/npm/react-test-renderer_v16.x.x.js index cd2ae506d2ef5..585b215bf68ef 100644 --- a/packages/react-devtools-extensions/flow-typed/npm/react-test-renderer_v16.x.x.js +++ b/packages/react-devtools-extensions/flow-typed/npm/react-test-renderer_v16.x.x.js @@ -2,7 +2,7 @@ // flow-typed version: 9c71eca8ef/react-test-renderer_v16.x.x/flow_>=v0.47.x // Type definitions for react-test-renderer 16.x.x -// Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-test-renderer +// Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/main/types/react-test-renderer 'use strict'; diff --git a/packages/react-devtools-extensions/popups/disabled.html b/packages/react-devtools-extensions/popups/disabled.html index 3e16aa5079182..52f762253ffd0 100644 --- a/packages/react-devtools-extensions/popups/disabled.html +++ b/packages/react-devtools-extensions/popups/disabled.html @@ -13,5 +13,5 @@
This page doesn’t appear to be using React.
- If this seems wrong, follow the troubleshooting instructions.
+ If this seems wrong, follow the troubleshooting instructions.
;
diff --git a/packages/use-subscription/README.md b/packages/use-subscription/README.md
index 549230211ca84..4ea34e1bca8b4 100644
--- a/packages/use-subscription/README.md
+++ b/packages/use-subscription/README.md
@@ -8,7 +8,7 @@ This utility can be used for subscriptions to a single value that are typically
Most other cases have **better long-term solutions**:
* Redux/Flux stores should use the [context API](https://reactjs.org/docs/context.html) instead.
-* I/O subscriptions (e.g. notifications) that update infrequently should use a mechanism like [`react-cache`](https://github.com/facebook/react/blob/master/packages/react-cache/README.md) instead.
+* I/O subscriptions (e.g. notifications) that update infrequently should use a mechanism like [`react-cache`](https://github.com/facebook/react/blob/main/packages/react-cache/README.md) instead.
* Complex libraries like Relay/Apollo should manage subscriptions manually with the same techniques which this library uses under the hood (as referenced [here](https://gist.github.com/bvaughn/d569177d70b50b58bff69c3c4a5353f3)) in a way that is most optimized for their library usage.
## Limitations in concurrent mode
diff --git a/scripts/bench/README.md b/scripts/bench/README.md
index 2d1ea7bea3f18..ae567fa5169dc 100644
--- a/scripts/bench/README.md
+++ b/scripts/bench/README.md
@@ -27,8 +27,8 @@ yarn start --local
# will only build and run remote merge base repo against benchmarks (no local values will be shown)
yarn start --remote
-# will only build and run remote master repo against benchmarks
-yarn start --remote=master
+# will only build and run remote main repo against benchmarks
+yarn start --remote=main
# same as "yarn start"
yarn start --remote --local
diff --git a/scripts/bench/build.js b/scripts/bench/build.js
index 3ef0ffe18673a..9147d8519e524 100644
--- a/scripts/bench/build.js
+++ b/scripts/bench/build.js
@@ -55,7 +55,7 @@ async function getMergeBaseFromLocalGitRepo(localRepo) {
return await Git.Merge.base(
repo,
await repo.getHeadCommit(),
- await repo.getBranchCommit('master')
+ await repo.getBranchCommit('main')
);
}
@@ -82,15 +82,15 @@ async function buildBenchmarkBundlesFromGitRepo(
// if not, clone the repo to remote-repo folder
repo = await Git.Clone(url, remoteRepoDir);
}
- let commit = await repo.getBranchCommit('master');
+ let commit = await repo.getBranchCommit('main');
// reset hard to this remote head
await Git.Reset.reset(repo, commit, Git.Reset.TYPE.HARD);
- // then we checkout the latest master head
- await repo.checkoutBranch('master');
+ // then we checkout the latest main head
+ await repo.checkoutBranch('main');
// make sure we pull in the latest changes
- await repo.mergeBranches('master', 'origin/master');
+ await repo.mergeBranches('main', 'origin/main');
// then we check if we need to move the HEAD to the merge base
- if (commitId && commitId !== 'master') {
+ if (commitId && commitId !== 'main') {
// as the commitId probably came from our local repo
// we use it to lookup the right commit in our remote repo
commit = await Git.Commit.lookup(repo, commitId);
diff --git a/scripts/bench/runner.js b/scripts/bench/runner.js
index ce4e411063c81..922e914d4ea2d 100644
--- a/scripts/bench/runner.js
+++ b/scripts/bench/runner.js
@@ -61,7 +61,7 @@ async function runBenchmarks(reactPath) {
}
// get the performance benchmark results
-// from remote master (default React repo)
+// from remote main (default React repo)
async function benchmarkRemoteMaster() {
console.log(chalk.gray(`- Building React bundles...`));
let commit = argv.remote;
diff --git a/scripts/error-codes/README.md b/scripts/error-codes/README.md
index 7d0988660f534..9933e9903d1ea 100644
--- a/scripts/error-codes/README.md
+++ b/scripts/error-codes/README.md
@@ -2,14 +2,14 @@ The error code system substitutes React's error messages with error IDs to
provide a better debugging support in production. Check out the blog post
[here](https://reactjs.org/blog/2016/07/11/introducing-reacts-error-code-system.html).
-- [`codes.json`](https://github.com/facebook/react/blob/master/scripts/error-codes/codes.json)
+- [`codes.json`](https://github.com/facebook/react/blob/main/scripts/error-codes/codes.json)
contains the mapping from IDs to error messages. This file is generated by the
Gulp plugin and is used by both the Babel plugin and the error decoder page in
our documentation. This file is append-only, which means an existing code in
the file will never be changed/removed.
-- [`extract-errors.js`](https://github.com/facebook/react/blob/master/scripts/error-codes/extract-errors.js)
+- [`extract-errors.js`](https://github.com/facebook/react/blob/main/scripts/error-codes/extract-errors.js)
is an node script that traverses our codebase and updates `codes.json`. You
can test it by running `yarn extract-errors`.
-- [`transform-error-messages`](https://github.com/facebook/react/blob/master/scripts/error-codes/transform-error-messages.js)
+- [`transform-error-messages`](https://github.com/facebook/react/blob/main/scripts/error-codes/transform-error-messages.js)
is a Babel pass that rewrites error messages to IDs for a production
(minified) build.
diff --git a/scripts/error-codes/extract-errors.js b/scripts/error-codes/extract-errors.js
index 58823cbe16873..4541a3eeeab6c 100644
--- a/scripts/error-codes/extract-errors.js
+++ b/scripts/error-codes/extract-errors.js
@@ -18,7 +18,7 @@ const babylonOptions = {
// As a parser, babylon has its own options and we can't directly
// import/require a babel preset. It should be kept **the same** as
// the `babel-plugin-syntax-*` ones specified in
- // https://github.com/facebook/fbjs/blob/master/packages/babel-preset-fbjs/configure.js
+ // https://github.com/facebook/fbjs/blob/main/packages/babel-preset-fbjs/configure.js
plugins: [
'classProperties',
'flow',
diff --git a/scripts/merge-fork/README.md b/scripts/merge-fork/README.md
index 75208a5781a12..2b01bfe156bdd 100644
--- a/scripts/merge-fork/README.md
+++ b/scripts/merge-fork/README.md
@@ -51,7 +51,7 @@ By default, the changes are compared to HEAD. You can use `--base-ref` to compar
```sh
yarn merge-fork \
- --base-ref=$(git merge-base HEAD origin/master)
+ --base-ref=$(git merge-base HEAD origin/main)
--base-dir=packages/react-reconciler/src \
ReactFiberWorkLoop
```
diff --git a/scripts/print-warnings/print-warnings.js b/scripts/print-warnings/print-warnings.js
index 9bdd6543d2a3d..95dabcc1e11e0 100644
--- a/scripts/print-warnings/print-warnings.js
+++ b/scripts/print-warnings/print-warnings.js
@@ -19,7 +19,7 @@ const parserOptions = {
// babelParser has its own options and we can't directly
// import/require a babel preset. It should be kept **the same** as
// the `babel-plugin-syntax-*` ones specified in
- // https://github.com/facebook/fbjs/blob/master/packages/babel-preset-fbjs/configure.js
+ // https://github.com/facebook/fbjs/blob/main/packages/babel-preset-fbjs/configure.js
plugins: [
'classProperties',
'flow',
diff --git a/scripts/release/README.md b/scripts/release/README.md
index 979062dd1484d..1737c3cf18800 100644
--- a/scripts/release/README.md
+++ b/scripts/release/README.md
@@ -50,7 +50,7 @@ The sections below include meaningful `--tags` in the instructions. However, kee
"Next" builds are meant to be lightweight and published often. In most cases, they can be published using artifacts built by Circle CI.
To prepare a build for a particular commit:
-1. Choose a commit from [the commit log](https://github.com/facebook/react/commits/master).
+1. Choose a commit from [the commit log](https://github.com/facebook/react/commits/main).
2. Copy the SHA (by clicking the 📋 button)
5. Run the [`prepare-release-from-ci`](#prepare-release-from-ci) script with the SHA 1 you found:
```sh
@@ -115,7 +115,7 @@ Begin by creating a branch from the previous git tag1:
git checkout -b 16.8.3 v16.8.2
```
-Next cherry pick any changes from master that you want to include in the release:
+Next cherry pick any changes from main that you want to include in the release:
```sh
git cherry-pick