Skip to content

Commit d483463

Browse files
author
Brian Vaughn
authored
Updated scripts and config to replace "master" with "main" branch (#21768)
1 parent cae6350 commit d483463

File tree

34 files changed

+65
-65
lines changed

34 files changed

+65
-65
lines changed

.circleci/config.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ jobs:
171171
- run:
172172
name: Download artifacts for base revision
173173
command: |
174-
git fetch origin master
174+
git fetch origin main
175175
cd ./scripts/release && yarn && cd ../../
176-
scripts/release/download-experimental-build.js --commit=$(git merge-base HEAD origin/master)
176+
scripts/release/download-experimental-build.js --commit=$(git merge-base HEAD origin/main)
177177
mv ./build2 ./base-build
178178
- persist_to_workspace:
179179
root: .
@@ -356,7 +356,7 @@ jobs:
356356
- run:
357357
name: Run publish script
358358
command: |
359-
git fetch origin master
359+
git fetch origin main
360360
cd ./scripts/release && yarn && cd ../../
361361
scripts/release/prepare-release-from-ci.js --skipTests -r << parameters.release_channel >> --commit=<< parameters.commit_sha >>
362362
cp ./scripts/release/ci-npmrc ~/.npmrc
@@ -414,7 +414,7 @@ workflows:
414414
filters:
415415
branches:
416416
only:
417-
- master
417+
- main
418418

419419
# New workflow that will replace "stable" and "experimental"
420420
build_and_test:
@@ -491,14 +491,14 @@ workflows:
491491
filters:
492492
branches:
493493
ignore:
494-
- master
494+
- main
495495
requires:
496496
- setup
497497
- sizebot:
498498
filters:
499499
branches:
500500
ignore:
501-
- master
501+
- main
502502
requires:
503503
- get_base_build
504504
- yarn_build_combined
@@ -514,7 +514,7 @@ workflows:
514514
filters:
515515
branches:
516516
only:
517-
- master
517+
- main
518518
jobs:
519519
- setup
520520
- test_fuzz:
@@ -555,7 +555,7 @@ workflows:
555555
filters:
556556
branches:
557557
only:
558-
- master
558+
- main
559559
jobs:
560560
- setup
561561
- publish_prerelease:

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
Before submitting a pull request, please make sure the following is done:
66
7-
1. Fork [the repository](https://github.com/facebook/react) and create your branch from `master`.
7+
1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`.
88
2. Run `yarn` in the repository root.
99
3. If you've fixed a bug or added code that should be tested, add tests!
1010
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.

CHANGELOG.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ This release was published in a broken state and should be skipped.
679679

680680
### React Is (New)
681681

682-
* 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))
682+
* 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))
683683
* 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))
684684

685685
### React Lifecycles Compat (New)
@@ -688,7 +688,7 @@ This release was published in a broken state and should be skipped.
688688

689689
### Create Subscription (New)
690690

691-
* 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))
691+
* 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))
692692

693693
### React Reconciler (Experimental)
694694

@@ -819,12 +819,12 @@ Starting with 16.1.0, we will no longer be publishing new releases on Bower. You
819819

820820
### React Reconciler (Experimental)
821821

822-
* 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))
822+
* 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))
823823
* Add support for React DevTools. ([@gaearon](https://github.com/gaearon) in [#11463](https://github.com/facebook/react/pull/11463))
824824

825825
### React Call Return (Experimental)
826826

827-
* 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))
827+
* 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))
828828

829829
## 16.0.1 (August 1, 2018)
830830

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [React](https://reactjs.org/) &middot; [![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)
1+
# [React](https://reactjs.org/) &middot; [![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)
22

33
React is a JavaScript library for building user interfaces.
44

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ platform:
1818

1919
branches:
2020
only:
21-
- master
21+
- main
2222

2323
# Disable Visual Studio build and deploy
2424
build: off

packages/create-subscription/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This utility should be used for subscriptions to a single value that are typical
88

99
Other cases have **better long-term solutions**:
1010
* Redux/Flux stores should use the [context API](https://reactjs.org/docs/context.html) instead.
11-
* 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.
11+
* 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.
1212
* 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.
1313

1414
## Limitations in async mode

packages/eslint-plugin-react-hooks/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@
7171

7272
## 1.x
7373

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

packages/react-devtools-extensions/flow-typed/npm/react-test-renderer_v16.x.x.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// flow-typed version: 9c71eca8ef/react-test-renderer_v16.x.x/flow_>=v0.47.x
33

44
// Type definitions for react-test-renderer 16.x.x
5-
// Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-test-renderer
5+
// Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/main/types/react-test-renderer
66

77
'use strict';
88

packages/react-devtools-extensions/popups/disabled.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
<p>
1414
<b>This page doesn&rsquo;t appear to be using React.</b>
1515
<br />
16-
If this seems wrong, follow the <a href="https://github.com/facebook/react/tree/master/packages/react-devtools#the-react-tab-doesnt-show-up">troubleshooting instructions</a>.
16+
If this seems wrong, follow the <a href="https://github.com/facebook/react/tree/main/packages/react-devtools#the-react-tab-doesnt-show-up">troubleshooting instructions</a>.
1717
</p>

packages/react-devtools-inline/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,4 @@ Once the above packages have been built or downloaded, you can watch for changes
211211
yarn start
212212
```
213213

214-
To test package changes, refer to the [`react-devtools-shell` README](https://github.com/facebook/react/blob/master/packages/react-devtools-shell/README.md).
214+
To test package changes, refer to the [`react-devtools-shell` README](https://github.com/facebook/react/blob/main/packages/react-devtools-shell/README.md).

packages/react-devtools-scheduling-profiler/src/view-base/utils/normalizeWheel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @flow
88
*/
99

10-
// Adapted from: https://github.com/facebookarchive/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js
10+
// Adapted from: https://github.com/facebookarchive/fixed-data-table/blob/main/src/vendor_upstream/dom/normalizeWheel.js
1111

1212
export type NormalizedWheelDelta = {|
1313
deltaX: number,

packages/react-devtools-shared/src/__tests__/profilingCache-test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ describe('ProfilingCache', () => {
672672

673673
const About = () => <div>About</div>;
674674

675-
// Mimics https://github.com/ReactTraining/react-router/blob/master/packages/react-router/modules/Router.js
675+
// Mimics https://github.com/ReactTraining/react-router/blob/main/packages/react-router/modules/Router.js
676676
function Router({children}) {
677677
const [path, setPath] = React.useState('/');
678678
return (
@@ -682,7 +682,7 @@ describe('ProfilingCache', () => {
682682
);
683683
}
684684

685-
// Mimics https://github.com/ReactTraining/react-router/blob/master/packages/react-router/modules/Switch.js
685+
// Mimics https://github.com/ReactTraining/react-router/blob/main/packages/react-router/modules/Switch.js
686686
function Switch({children}) {
687687
return (
688688
<RouterContext.Consumer>
@@ -699,14 +699,14 @@ describe('ProfilingCache', () => {
699699
);
700700
}
701701

702-
// Mimics https://github.com/ReactTraining/react-router/blob/master/packages/react-router/modules/Route.js
702+
// Mimics https://github.com/ReactTraining/react-router/blob/main/packages/react-router/modules/Route.js
703703
function Route({children, path}) {
704704
return null;
705705
}
706706

707707
const linkRef = React.createRef();
708708

709-
// Mimics https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/modules/Link.js
709+
// Mimics https://github.com/ReactTraining/react-router/blob/main/packages/react-router-dom/modules/Link.js
710710
function Link({children, path}) {
711711
return (
712712
<RouterContext.Consumer>

packages/react-devtools-shared/src/backend/renderer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2633,7 +2633,7 @@ export function attach(
26332633
const UNMOUNTED = 3;
26342634

26352635
// This function is copied from React and should be kept in sync:
2636-
// https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberTreeReflection.js
2636+
// https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberTreeReflection.js
26372637
function isFiberMountedImpl(fiber: Fiber): number {
26382638
let node = fiber;
26392639
let prevNode = null;
@@ -2689,7 +2689,7 @@ export function attach(
26892689
}
26902690

26912691
// This function is copied from React and should be kept in sync:
2692-
// https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberTreeReflection.js
2692+
// https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberTreeReflection.js
26932693
// It would be nice if we updated React to inject this function directly (vs just indirectly via findDOMNode).
26942694
// BEGIN copied code
26952695
function findCurrentFiberUsingSlowPathById(id: number): Fiber | null {

packages/react-devtools-shared/src/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const LOCAL_STORAGE_TRACE_UPDATES_ENABLED_KEY =
4444
export const PROFILER_EXPORT_VERSION = 5;
4545

4646
export const CHANGE_LOG_URL =
47-
'https://github.com/facebook/react/blob/master/packages/react-devtools/CHANGELOG.md';
47+
'https://github.com/facebook/react/blob/main/packages/react-devtools/CHANGELOG.md';
4848

4949
export const UNSUPPORTED_VERSION_URL =
5050
'https://reactjs.org/blog/2019/08/15/new-react-devtools.html#how-do-i-get-the-old-version-back';

packages/react-devtools-shared/src/devtools/cache.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {createContext} from 'react';
1515
// TODO (cache) Remove this cache; it is outdated and will not work with newer APIs like startTransition.
1616

1717
// Cache implementation was forked from the React repo:
18-
// https://github.com/facebook/react/blob/master/packages/react-cache/src/ReactCache.js
18+
// https://github.com/facebook/react/blob/main/packages/react-cache/src/ReactCache.js
1919
//
2020
// This cache is simpler than react-cache in that:
2121
// 1. Individual items don't need to be invalidated.

packages/react-devtools-shell/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Harness for testing local changes to the `react-devtools-inline` and `react-devt
22

33
## Development
44

5-
This target should be run in parallel with the `react-devtools-inline` package. The first step then is to run that target following the instructions in the [`react-devtools-inline` README](https://github.com/facebook/react/blob/master/packages/react-devtools-inline/README.md).
5+
This target should be run in parallel with the `react-devtools-inline` package. The first step then is to run that target following the instructions in the [`react-devtools-inline` README](https://github.com/facebook/react/blob/main/packages/react-devtools-inline/README.md).
66

77
The test harness can then be run as follows:
88
```sh

packages/react-devtools/CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<details>
44
<summary>
5-
Changes that have landed in master but are not yet released.
5+
Changes that have landed in main but are not yet released.
66
Click to see more.
77
</summary>
88

@@ -380,7 +380,7 @@ New keys can be added to object props/state/hooks now. Existing keys can be rena
380380
#### Improved performance
381381
The legacy DevTools extension used to add significant performance overhead, making it unusable for some larger React applications. That overhead has been effectively eliminated in version 4.
382382

383-
[Learn more](https://github.com/facebook/react/blob/master/packages/react-devtools/OVERVIEW.md) about the performance optimizations that made this possible.
383+
[Learn more](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md) about the performance optimizations that made this possible.
384384

385385
#### Component stacks
386386

@@ -406,7 +406,7 @@ Filter preferences are remembered between sessions.
406406

407407
#### No more inline props
408408

409-
Components in the tree no longer show inline props. This was done to [make DevTools faster](https://github.com/facebook/react/blob/master/packages/react-devtools/OVERVIEW.md) and to make it easier to browse larger component trees.
409+
Components in the tree no longer show inline props. This was done to [make DevTools faster](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md) and to make it easier to browse larger component trees.
410410

411411
You can view a component's props, state, and hooks by selecting it:
412412

packages/react-devtools/OVERVIEW.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ Even when dealing with a single component, serializing deeply nested properties
259259

260260
Hooks present a unique challenge for the DevTools because of the concept of _custom_ hooks. (A custom hook is essentially any function that calls at least one of the built-in hooks. By convention custom hooks also have names that begin with "use".)
261261

262-
So how does DevTools identify custom functions called from within third party components? It does this by temporarily overriding React's built-in hooks and shallow rendering the component in question. Whenever one of the (overridden) built-in hooks are called, it parses the call stack to spot potential custom hooks (functions between the component itself and the built-in hook). This approach enables it to build a tree structure describing all of the calls to both the built-in _and_ custom hooks, along with the values passed to those hooks. (If you're interested in learning more about this, [here is the source code](https://github.com/facebook/react/blob/master/packages/react-debug-tools/src/ReactDebugHooks.js).)
262+
So how does DevTools identify custom functions called from within third party components? It does this by temporarily overriding React's built-in hooks and shallow rendering the component in question. Whenever one of the (overridden) built-in hooks are called, it parses the call stack to spot potential custom hooks (functions between the component itself and the built-in hook). This approach enables it to build a tree structure describing all of the calls to both the built-in _and_ custom hooks, along with the values passed to those hooks. (If you're interested in learning more about this, [here is the source code](https://github.com/facebook/react/blob/main/packages/react-debug-tools/src/ReactDebugHooks.js).)
263263

264264
> **Note**: DevTools obtains hooks info by re-rendering a component.
265265
> Breakpoints will be invoked during this additional (shallow) render,

packages/react-devtools/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Or you could develop with a local HTTP server [like `serve`](https://www.npmjs.c
105105

106106
**If your app is inside of CodePen**, make sure you are registered. Then press Fork (if it's not your pen), and then choose Change View > Debug. The Debug view is inspectable with DevTools because it doesn't use an iframe.
107107

108-
**If your app is inside an iframe, a Chrome extension, React Native, or in another unusual environment**, try [the standalone version instead](https://github.com/facebook/react/tree/master/packages/react-devtools). Chrome apps are currently not inspectable.
108+
**If your app is inside an iframe, a Chrome extension, React Native, or in another unusual environment**, try [the standalone version instead](https://github.com/facebook/react/tree/main/packages/react-devtools). Chrome apps are currently not inspectable.
109109

110110
**If you still have issues** please [report them](https://github.com/facebook/react/issues/new?labels=Component:%20Developer%20Tools). Don't forget to specify your OS, browser version, extension version, and the exact instructions to reproduce the issue with a screenshot.
111111

0 commit comments

Comments
 (0)