Skip to content

Commit d4c5fe4

Browse files
committedJun 20, 2022
chore(main): change references to the master branch to main (#638)
1 parent b44beff commit d4c5fe4

27 files changed

+81
-80
lines changed
 

‎components/git/backport.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ const epilogue = `====================== Example =======================
1010
Demo: https://asciinema.org/a/221244
1111
Backporting https://github.com/nodejs/node/pull/24816 to v11.x
1212
13-
# Sync master with upstream for the commits, if they are not yet there
14-
$ git checkout master
15-
$ ncu-config set branch master
13+
# Sync main with upstream for the commits, if they are not yet there
14+
$ git checkout main
15+
$ ncu-config set branch main
1616
$ git node sync
1717
18-
# Backport existing commits from master to v11.x-staging
18+
# Backport existing commits from main to v11.x-staging
1919
$ git checkout v11.x-staging
2020
$ ncu-config set branch v11.x-staging
2121
$ git node sync

‎components/git/epilogue.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ $ cd path/to/node/project
44
55
# If you have not configured it before
66
$ ncu-config set upstream <name-of-remote-to-nodejs/node>
7-
$ ncu-config set branch master # Assuming you are landing commits on master
7+
$ ncu-config set branch main # Assuming you are landing commits on main
88
9-
$ git checkout master
9+
$ git checkout main
1010
$ git node land --abort # Abort a landing session, just in case
1111
$ git node land $PRID # Start a new landing session
1212
$ git node land $URL # Start a new landing session using the PR URL

‎docs/git-node.md

+33-32
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,29 @@
33
A custom Git command for managing pull requests. You can run it as
44
`git-node` or `git node`. To see the help text, run `git node`.
55

6-
- [`git node land`](#git-node-land)
7-
- [Prerequisites](#git-node-land-prerequisites)
8-
- [Git bash for Windows](#git-bash-for-windows)
9-
- [Demo & Usage](#demo--usage)
10-
- [Optional Settings](#git-node-land-optional-settings)
11-
- [`git node backport`](#git-node-backport)
12-
- [Example](#example)
13-
- [`git node release`](#git-node-release)
14-
- [Example](#example-1)
15-
- [`git node sync`](#git-node-sync)
16-
- [`git node metadata`](#git-node-metadata)
17-
- [Optional Settings](#git-node-metadata-optional-settings)
18-
- [`git node v8`](#git-node-v8)
19-
- [Prerequisites](#git-node-v8-prerequisites)
20-
- [`git node v8 major`](#git-node-v8-major)
21-
- [`git node v8 minor`](#git-node-v8-minor)
22-
- [`git node v8 backport <sha..>`](#git-node-v8-backport-sha)
23-
- [General options](#general-options)
24-
- [`git node status`](#git-node-status)
25-
- [Example](#example)
26-
- [`git node wpt`](#git-node-wpt)
27-
- [Example](#example-2)
6+
- [git-node](#git-node)
7+
- [`git node land`](#git-node-land)
8+
- [Prerequisites](#prerequisites)
9+
- [Git bash for Windows](#git-bash-for-windows)
10+
- [Demo & Usage](#demo--usage)
11+
- [Optional Settings](#optional-settings)
12+
- [`git node backport`](#git-node-backport)
13+
- [Example](#example)
14+
- [`git node release`](#git-node-release)
15+
- [Example](#example-1)
16+
- [`git node sync`](#git-node-sync)
17+
- [`git node metadata`](#git-node-metadata)
18+
- [Optional Settings](#optional-settings-1)
19+
- [`git node v8`](#git-node-v8)
20+
- [Prerequisites](#prerequisites-1)
21+
- [`git node v8 major`](#git-node-v8-major)
22+
- [`git node v8 minor`](#git-node-v8-minor)
23+
- [`git node v8 backport <sha..>`](#git-node-v8-backport-sha)
24+
- [General options](#general-options)
25+
- [`git node status`](#git-node-status)
26+
- [Example](#example-2)
27+
- [`git node wpt`](#git-node-wpt)
28+
- [Example](#example-3)
2829

2930
## `git node land`
3031

@@ -93,8 +94,8 @@ Examples:
9394
# Tell ncu that your upstream remote is named "upstream"
9495
$ ncu-config set upstream upstream
9596
96-
# Tell ncu that you are landing patches to "master" branch
97-
$ ncu-config set branch master
97+
# Tell ncu that you are landing patches to "main" branch
98+
$ ncu-config set branch main
9899
```
99100

100101
Note: If you are behind a firewall and run into `ECONNREFUSED` issues with
@@ -130,9 +131,9 @@ $ cd path/to/node/project
130131
131132
# If you have not configured it before
132133
$ ncu-config set upstream <name-of-remote-to-nodejs/node>
133-
$ ncu-config set branch master # Assuming you are landing commits on master
134+
$ ncu-config set branch main # Assuming you are landing commits on main
134135
135-
$ git checkout master
136+
$ git checkout main
136137
$ git node land --abort # Abort a landing session, just in case
137138
$ git node land $PRID # Start a new landing session
138139
$ git node land $URL # Start a new landing session using the PR URL
@@ -192,11 +193,11 @@ Options:
192193
```
193194
Backporting https://github.com/nodejs/node/pull/12344 to v10.x
194195
195-
# Sync master with upstream for the commits, if they are not yet there
196-
$ git checkout master
196+
# Sync main with upstream for the commits, if they are not yet there
197+
$ git checkout main
197198
$ git node sync
198199
199-
# Backport existing commits from master to v10.x-staging
200+
# Backport existing commits from main to v10.x-staging
200201
$ git checkout v10.x-staging
201202
$ git node sync
202203
$ git node backport 12344 --to 10
@@ -397,14 +398,14 @@ Return status and information about the current git-node land session. Shows the
397398
### Example
398399

399400
```sh
400-
node on git:master ❯ git node status 11:32AM
401+
node on git:main ❯ git node status 11:32AM
401402
✔ Landing session in progress
402403
--------------------------------------------------------------------------------
403404
PR: https:/github.com/nodejs/node/pull/34800
404405
State: AMENDING
405406
Username: codebytere
406407
Upstream: upstream
407-
Branch: master
408+
Branch: main
408409
```
409410

410411
## `git node wpt`
@@ -441,4 +442,4 @@ $ git node wpt url # Will update test/fixtures/wpt/url and related files
441442
$ git node wpt url --commit=43feb7f612fe9160639e09a47933a29834904d69
442443
```
443444

444-
[node.js abi version registry]: https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json
445+
[node.js abi version registry]: https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json

‎docs/ncu-ci.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Options:
4242
Examples:
4343

4444
```sh
45-
node on git:master ❯ ncu-ci rate pr
45+
node on git:main ❯ ncu-ci rate pr
4646
--------------------------------------------------------------------------------
4747
[1/1] Running health
4848
--------------------------------------------------------------------------------
@@ -53,7 +53,7 @@ node on git:master ❯ ncu-ci rate pr
5353
```
5454

5555
```sh
56-
node on git:master ❯ ncu-ci rate commit
56+
node on git:main ❯ ncu-ci rate commit
5757
--------------------------------------------------------------------------------
5858
[1/1] Running health
5959
--------------------------------------------------------------------------------
@@ -69,7 +69,7 @@ node on git:master ❯ ncu-ci rate commit
6969

7070
Example:
7171
```sh
72-
node on git:master ❯ ncu-ci walk commit
72+
node on git:main ❯ ncu-ci walk commit
7373
✔ Done--------------------------------------------------------------------------------
7474
[1/60] Running health
7575
--------------------------------------------------------------------------------
@@ -133,7 +133,7 @@ For example, if you would like to see the results of `node-test-pull-request` fo
133133

134134
Example:
135135
```sh
136-
node on git:master ❯ ncu-ci pr 32158
136+
node on git:main ❯ ncu-ci pr 32158
137137
--------------------------------------------------------------------------------
138138
[1/1] Running PR: 32158
139139
--------------------------------------------------------------------------------
@@ -157,7 +157,7 @@ For example, if you would like to see the results of `node-test-commit` for http
157157

158158
Example:
159159
```sh
160-
node on git:master ❯ ncu-ci commit 39377
160+
node on git:main ❯ ncu-ci commit 39377
161161
--------------------------------------------------------------------------------
162162
[1/1] Running COMMIT: 39377
163163
--------------------------------------------------------------------------------
@@ -180,7 +180,7 @@ Unstable https://ci.nodejs.org/job/node-test-commit-arm-fanned/15148/
180180

181181
Example:
182182
```sh
183-
node on git:master ❯ ncu-ci url https://github.com/nodejs/node/pull/34127
183+
node on git:main ❯ ncu-ci url https://github.com/nodejs/node/pull/34127
184184
--------------------------------------------------------------------------------
185185
[1/1] Running PR: 32158
186186
--------------------------------------------------------------------------------
@@ -202,7 +202,7 @@ Unstable https://ci.nodejs.org/job/node-test-commit-arm-fanned/15155/
202202

203203
Example:
204204
```sh
205-
node on git:master ❯ ncu-ci benchmark 636
205+
node on git:main ❯ ncu-ci benchmark 636
206206
--------------------------------------------------------------------------------
207207
[1/1] Running BENCHMARK: 636
208208
--------------------------------------------------------------------------------
@@ -237,7 +237,7 @@ Finished: SUCCESS
237237
238238
Example:
239239
```
240-
node on git:master ❯ ncu-ci citgm 2400
240+
node on git:main ❯ ncu-ci citgm 2400
241241
--------------------------------------------------------------------------------
242242
[1/1] Running CITGM: 2400
243243
--------------------------------------------------------------------------------
@@ -316,7 +316,7 @@ FAILURE: 5 failures in 2390 not present in 2392
316316
`ncu-ci daily` show recent results of `node-daily-master`. You can also aggregate the results by passing `--cache`, or limit the maximum number of CIs jobs to get data from with `--limit=N`. See `ncu-ci daily --help` for more.
317317
318318
```sh
319-
node on git:master ❯ ncu-ci daily
319+
node on git:main ❯ ncu-ci daily
320320
✔ Done--------------------------------------------------------------------------------
321321
[1/16] Running health
322322
--------------------------------------------------------------------------------
@@ -333,7 +333,7 @@ node on git:master ❯ ncu-ci daily
333333
----------------------------------- Summary ------------------------------------
334334
Result FAILURE
335335
URL https://ci.nodejs.org/job/node-test-commit/39692/
336-
Source https://api.github.com/repos/nodejs/node/git/refs/heads/master
336+
Source https://api.github.com/repos/nodejs/node/git/refs/heads/main
337337
Commit [bf0d82c10247] test: remove common.localhostIPv6
338338
Date 2020-07-16 16:57:30 -0700
339339
Author Rich Trott <rtrott@gmail.com>

‎lib/backport_session.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ export default class BackportSession extends Session {
141141
// TODO(joyeechuneg): add more warnings
142142
const { prid } = this;
143143
const url = getPrURL(this);
144-
cli.log(`Looking for commits of ${url} on master...`);
144+
cli.log(`Looking for commits of ${url} on main...`);
145145

146-
const commits = this.getCommitsFromBranch(prid, 'master');
146+
const commits = this.getCommitsFromBranch(prid, 'main');
147147

148148
if (commits.length === 0) {
149149
cli.error('Could not find any commit matching the PR');

‎lib/collaborators.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export async function getCollaborators(cli, request, argv) {
6868

6969
function parseCollaborators(readme, cli) {
7070
// This is more or less taken from
71-
// https://github.com/rvagg/archived-iojs-tools/blob/master/pr-metadata/pr-metadata.js
71+
// https://github.com/rvagg/archived-iojs-tools/blob/main/pr-metadata/pr-metadata.js
7272
const collaborators = new Map();
7373
let m;
7474

‎lib/prepare_release.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ export default class ReleasePreparation {
587587
'baking-for-lts'
588588
];
589589

590-
let comparisonBranch = 'master';
590+
let comparisonBranch = 'main';
591591
const isSemverMinor = versionComponents.patch === 0;
592592
if (isLTS) {
593593
// Assume Current branch matches tag with highest semver value.

‎lib/session.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ export default class Session {
369369
cli.separator();
370370
cli.info(
371371
'For example, if your want to land commits on the ' +
372-
'`master` branch, you can run:\n\n' +
373-
' $ ncu-config set branch master');
372+
'`main` branch, you can run:\n\n' +
373+
' $ ncu-config set branch main');
374374
cli.separator();
375375
cli.setExitCode(1);
376376
}

‎test/fixtures/closed_pr.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
]
1818
},
1919
"title": "testing: do not merge",
20-
"baseRefName": "master",
20+
"baseRefName": "main",
2121
"headRefName": "awesome-changes",
2222
"closed": true,
2323
"closedAt": "2017-10-28T11:13:43Z",

‎test/fixtures/code_and_learn_pr.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
]
1919
},
2020
"title": "test: awesome changes",
21-
"baseRefName": "master",
21+
"baseRefName": "main",
2222
"headRefName": "awesome-changes"
2323
}

‎test/fixtures/conflicting_pr.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"title": "test: This PR has conflicts",
18-
"baseRefName": "master",
18+
"baseRefName": "main",
1919
"headRefName": "pr-conflicts",
2020
"mergeable": "CONFLICTING"
2121
}

‎test/fixtures/empty_profile_pr.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
]
1818
},
1919
"title": "doc: fix mdn links",
20-
"baseRefName": "master",
20+
"baseRefName": "main",
2121
"headRefName": "fix-links"
2222
}

‎test/fixtures/first_timer_pr.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
]
2424
},
2525
"title": "test: awesome changes",
26-
"baseRefName": "master",
26+
"baseRefName": "main",
2727
"headRefName": "awesome-changes"
2828
}

‎test/fixtures/first_timer_pr_with_private_email.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
]
2121
},
2222
"title": "test: awesome changes",
23-
"baseRefName": "master",
23+
"baseRefName": "main",
2424
"headRefName": "awesome-changes"
2525
}

‎test/fixtures/jenkins/benchmark-buffer/benchmark-node-micro-benchmarks-150.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ RUNS not set (ok)
1515
MACHINE_THREADS not set (ok), default is: 88
1616
Cloning into 'node'...
1717
Checking out files: 42% (11166/26057) Checking out files: 43% (11205/26057) Checking out files: 44% (11466/26057) Checking out files: 45% (11726/26057) Checking out files: 46% (11987/26057) Checking out files: 47% (12247/26057) Checking out files: 48% (12508/26057) Checking out files: 49% (12768/26057) Checking out files: 50% (13029/26057) Checking out files: 51% (13290/26057) Checking out files: 52% (13550/26057) Checking out files: 53% (13811/26057) Checking out files: 54% (14071/26057) Checking out files: 55% (14332/26057) Checking out files: 56% (14592/26057) Checking out files: 57% (14853/26057) Checking out files: 58% (15114/26057) Checking out files: 59% (15374/26057) Checking out files: 60% (15635/26057) Checking out files: 61% (15895/26057) Checking out files: 62% (16156/26057) Checking out files: 63% (16416/26057) Checking out files: 64% (16677/26057) Checking out files: 65% (16938/26057) Checking out files: 66% (17198/26057) Checking out files: 67% (17459/26057) Checking out files: 68% (17719/26057) Checking out files: 69% (17980/26057) Checking out files: 70% (18240/26057) Checking out files: 71% (18501/26057) Checking out files: 72% (18762/26057) Checking out files: 73% (19022/26057) Checking out files: 74% (19283/26057) Checking out files: 75% (19543/26057) Checking out files: 76% (19804/26057) Checking out files: 77% (20064/26057) Checking out files: 78% (20325/26057) Checking out files: 79% (20586/26057) Checking out files: 80% (20846/26057) Checking out files: 81% (21107/26057) Checking out files: 82% (21367/26057) Checking out files: 83% (21628/26057) Checking out files: 84% (21888/26057) Checking out files: 85% (22149/26057) Checking out files: 86% (22410/26057) Checking out files: 87% (22670/26057) Checking out files: 88% (22931/26057) Checking out files: 89% (23191/26057) Checking out files: 90% (23452/26057) Checking out files: 91% (23712/26057) Checking out files: 92% (23973/26057) Checking out files: 93% (24234/26057) Checking out files: 94% (24494/26057) Checking out files: 95% (24755/26057) Checking out files: 96% (25015/26057) Checking out files: 97% (25276/26057) Checking out files: 98% (25536/26057) Checking out files: 99% (25797/26057) Checking out files: 100% (26057/26057) Checking out files: 100% (26057/26057), done.
18-
Already on 'master'
19-
Your branch is up-to-date with 'origin/master'.
18+
Already on 'main'
19+
Your branch is up-to-date with 'origin/main'.
2020
../deps/icu-small/source/i18n/olsontz.cpp: In member function ‘virtual UBool icu_60::OlsonTimeZone::inDaylightTime(UDate, UErrorCode&) const’:
2121
../deps/icu-small/source/i18n/olsontz.cpp:604:18: warning: ‘dst’ may be used uninitialized in this function [-Wmaybe-uninitialized]
2222
int32_t raw, dst;

‎test/fixtures/jenkins/git-failure-1/node-test-commit-19225.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{
2929
"_class": "hudson.model.StringParameterValue",
3030
"name": "REBASE_ONTO",
31-
"value": "origin/master"
31+
"value": "origin/main"
3232
},
3333
{
3434
"_class": "hudson.model.StringParameterValue",

‎test/fixtures/jenkins/git-failure-2/console.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
19:15:56 Exporting parameter NODEJS_VERSION with Node.js version '11.0.0'
3030
19:15:56 Exporting parameter NODEJS_MAJOR_VERSION with Node.js major version '11'
3131
19:15:56 [rhel72-s390x] $ /bin/sh -xe /tmp/jenkins7325057057705257195.sh
32-
19:15:56 + curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-pre.sh
32+
19:15:56 + curl https://raw.githubusercontent.com/nodejs/build/main/jenkins/scripts/node-test-commit-pre.sh
3333
19:15:56 + bash -ex -s before
3434
19:15:56 % Total % Received % Xferd Average Speed Time Time Time Current
3535
19:15:56 Dload Upload Total Spent Left Speed

‎test/fixtures/jenkins/js-flake-1/node-test-commit-19123.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{
2929
"_class": "hudson.model.StringParameterValue",
3030
"name": "REBASE_ONTO",
31-
"value": "origin/master"
31+
"value": "origin/main"
3232
},
3333
{
3434
"_class": "hudson.model.StringParameterValue",

‎test/fixtures/jenkins/js-flake-1/node-test-commit-linux-nodes=debian9-64-19446.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Exporting parameter NODEJS_VERSION with Node.js version '11.0.0'
3030
Exporting parameter NODEJS_MAJOR_VERSION with Node.js major version '11'
3131
[debian9-64] $ /bin/sh -xe /tmp/jenkins3291460991233382964.sh
3232
+ bash
33-
+ curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-pre.sh
33+
+ curl https://raw.githubusercontent.com/nodejs/build/main/jenkins/scripts/node-test-commit-pre.sh
3434
% Total % Received % Xferd Average Speed Time Time Time Current
3535
Dload Upload Total Spent Left Speed
3636
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0100 1165 100 1165 0 0 18116 0 --:--:-- --:--:-- --:--:-- 18203

‎test/fixtures/jenkins/no-compiler-error/node-test-commit-osx-nodes=osx1010-19307.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Resetting working tree
3333
> git reset --hard # timeout=10
3434
> git clean -fdx # timeout=10
3535
[osx1010] $ /bin/sh -xe /var/folders/dr/m8hrvy3d71172187rtx7vm380000gp/T/jenkins17599764209366008267.sh
36-
+ curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-pre.sh
36+
+ curl https://raw.githubusercontent.com/nodejs/build/main/jenkins/scripts/node-test-commit-pre.sh
3737
+ bash -ex
3838
% Total % Received % Xferd Average Speed Time Time Time Current
3939
Dload Upload Total Spent Left Speed
@@ -76,7 +76,7 @@ Current branch HEAD is up to date, rebase forced.
7676
First, rewinding head to replay your work on top of it...
7777
Applying: workers,trace_events: set thread name for workers
7878
+ '[' -n '' ']'
79-
+ curl https://raw.githubusercontent.com/nodejs/build/master/jenkins/scripts/node-test-commit-diagnostics.sh
79+
+ curl https://raw.githubusercontent.com/nodejs/build/main/jenkins/scripts/node-test-commit-diagnostics.sh
8080
+ bash -ex -s before
8181
% Total % Received % Xferd Average Speed Time Time Time Current
8282
Dload Upload Total Spent Left Speed

‎test/fixtures/jenkins/success/node-test-commit-18960.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{
2929
"_class": "hudson.model.StringParameterValue",
3030
"name": "REBASE_ONTO",
31-
"value": "origin/master"
31+
"value": "origin/main"
3232
},
3333
{
3434
"_class": "hudson.model.StringParameterValue",

0 commit comments

Comments
 (0)
Please sign in to comment.