Skip to content

Commit

Permalink
Updated scripts and config to replace "master" with "main" branch (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn authored Jun 29, 2021
1 parent cae6350 commit d483463
Show file tree
Hide file tree
Showing 34 changed files with 65 additions and 65 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -414,7 +414,7 @@ workflows:
filters:
branches:
only:
- master
- main

# New workflow that will replace "stable" and "experimental"
build_and_test:
Expand Down Expand Up @@ -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
Expand All @@ -514,7 +514,7 @@ workflows:
filters:
branches:
only:
- master
- main
jobs:
- setup
- test_fuzz:
Expand Down Expand Up @@ -555,7 +555,7 @@ workflows:
filters:
branches:
only:
- master
- main
jobs:
- setup
- publish_prerelease:
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand Down Expand Up @@ -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)

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

React is a JavaScript library for building user interfaces.

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ platform:

branches:
only:
- master
- main

# Disable Visual Studio build and deploy
build: off
Expand Down
2 changes: 1 addition & 1 deletion packages/create-subscription/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-hooks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-extensions/popups/disabled.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
<p>
<b>This page doesn&rsquo;t appear to be using React.</b>
<br />
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>.
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>.
</p>
2 changes: 1 addition & 1 deletion packages/react-devtools-inline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,4 @@ Once the above packages have been built or downloaded, you can watch for changes
yarn start
```

To test package changes, refer to the [`react-devtools-shell` README](https://github.com/facebook/react/blob/master/packages/react-devtools-shell/README.md).
To test package changes, refer to the [`react-devtools-shell` README](https://github.com/facebook/react/blob/main/packages/react-devtools-shell/README.md).
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow
*/

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

export type NormalizedWheelDelta = {|
deltaX: number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ describe('ProfilingCache', () => {

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

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

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

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

const linkRef = React.createRef();

// Mimics https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/modules/Link.js
// Mimics https://github.com/ReactTraining/react-router/blob/main/packages/react-router-dom/modules/Link.js
function Link({children, path}) {
return (
<RouterContext.Consumer>
Expand Down
4 changes: 2 additions & 2 deletions packages/react-devtools-shared/src/backend/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2633,7 +2633,7 @@ export function attach(
const UNMOUNTED = 3;

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

// This function is copied from React and should be kept in sync:
// https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberTreeReflection.js
// https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberTreeReflection.js
// It would be nice if we updated React to inject this function directly (vs just indirectly via findDOMNode).
// BEGIN copied code
function findCurrentFiberUsingSlowPathById(id: number): Fiber | null {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-shared/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const LOCAL_STORAGE_TRACE_UPDATES_ENABLED_KEY =
export const PROFILER_EXPORT_VERSION = 5;

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

export const UNSUPPORTED_VERSION_URL =
'https://reactjs.org/blog/2019/08/15/new-react-devtools.html#how-do-i-get-the-old-version-back';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-shared/src/devtools/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {createContext} from 'react';
// TODO (cache) Remove this cache; it is outdated and will not work with newer APIs like startTransition.

// Cache implementation was forked from the React repo:
// https://github.com/facebook/react/blob/master/packages/react-cache/src/ReactCache.js
// https://github.com/facebook/react/blob/main/packages/react-cache/src/ReactCache.js
//
// This cache is simpler than react-cache in that:
// 1. Individual items don't need to be invalidated.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Harness for testing local changes to the `react-devtools-inline` and `react-devt

## Development

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

The test harness can then be run as follows:
```sh
Expand Down
6 changes: 3 additions & 3 deletions packages/react-devtools/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<details>
<summary>
Changes that have landed in master but are not yet released.
Changes that have landed in main but are not yet released.
Click to see more.
</summary>

Expand Down Expand Up @@ -380,7 +380,7 @@ New keys can be added to object props/state/hooks now. Existing keys can be rena
#### Improved performance
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.

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

#### Component stacks

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

#### No more inline props

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

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

Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools/OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ Even when dealing with a single component, serializing deeply nested properties

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

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

> **Note**: DevTools obtains hooks info by re-rendering a component.
> Breakpoints will be invoked during this additional (shallow) render,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Or you could develop with a local HTTP server [like `serve`](https://www.npmjs.c

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

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

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

Expand Down
Loading

0 comments on commit d483463

Please sign in to comment.