Skip to content

Commit 429e0f4

Browse files
lpincatargos
authored andcommitted
doc: update main branch name in doc/contributing/*
Refs: #33864 PR-URL: #43438 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Danielle Adams <adamzdanielle@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent cbaf120 commit 429e0f4

11 files changed

+47
-47
lines changed

doc/contributing/backporting-to-release-lines.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For the active staging branches see the [Release Schedule][].
1010

1111
## What needs to be backported?
1212

13-
If a cherry-pick from master does not land cleanly on a staging branch, the
13+
If a cherry-pick from `main` does not land cleanly on a staging branch, the
1414
releaser will mark the pull request with a particular label for that release
1515
line (e.g. `backport-requested-vN.x`), specifying to our tooling that this
1616
pull request should not be included. The releaser will then add a comment

doc/contributing/collaborator-guide.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,11 @@ in the form:
287287

288288
* `GIT_REMOTE_REF`: Change to the remote portion of git refspec.
289289
To specify the branch this way, `refs/heads/BRANCH` is used
290-
(e.g. for `master` -> `refs/heads/master`).
290+
(e.g. for `main` -> `refs/heads/main`).
291291
For pull requests, it will look like `refs/pull/PR_NUMBER/head`
292292
(e.g. for pull request #42 -> `refs/pull/42/head`).
293-
* `REBASE_ONTO`: Change that to `origin/master` so the pull request gets rebased
294-
onto master. This can especially be important for pull requests that have been
293+
* `REBASE_ONTO`: Change that to `origin/main` so the pull request gets rebased
294+
onto `main`. This can especially be important for pull requests that have been
295295
open a while.
296296

297297
Look at the list of jobs on the left hand side under "Build History" and copy
@@ -337,7 +337,7 @@ For undocumented APIs that are public, open a pull request documenting the API.
337337
### Breaking changes
338338

339339
At least two TSC members must approve backward-incompatible changes to the
340-
master branch.
340+
`main` branch.
341341

342342
Examples of breaking changes include:
343343

@@ -373,7 +373,7 @@ providing a Public API in such cases.
373373
#### Unintended breaking changes
374374

375375
Sometimes, a change intended to be non-breaking turns out to be a breaking
376-
change. If such a change lands on the master branch, a collaborator can revert
376+
change. If such a change lands on the `main` branch, a collaborator can revert
377377
it. As an alternative to reverting, the TSC can apply the semver-major label
378378
after-the-fact.
379379

@@ -462,7 +462,7 @@ duration.
462462

463463
Communicate pending deprecations and associated mitigations with the ecosystem
464464
as soon as possible. If possible, do it before the pull request adding the
465-
deprecation lands on the master branch.
465+
deprecation lands on the `main` branch.
466466

467467
Use the `notable-change` label on pull requests that add or change the
468468
deprecation level of an API.
@@ -554,15 +554,15 @@ $ git rebase --abort
554554
Checkout proper target branch:
555555

556556
```text
557-
$ git checkout master
557+
$ git checkout main
558558
```
559559

560560
Update the tree (assumes your repository is set up as detailed in
561561
[CONTRIBUTING.md](./pull-requests.md#step-1-fork)):
562562

563563
```text
564564
$ git fetch upstream
565-
$ git merge --ff-only upstream/master
565+
$ git merge --ff-only upstream/main
566566
```
567567

568568
Apply external patches:
@@ -588,19 +588,19 @@ has landed since the CI run. You will have to ask the author to rebase.
588588
Check and re-review the changes:
589589

590590
```text
591-
$ git diff upstream/master
591+
$ git diff upstream/main
592592
```
593593

594594
Check the number of commits and commit messages:
595595

596596
```text
597-
$ git log upstream/master...master
597+
$ git log upstream/main...main
598598
```
599599

600600
Squash commits and add metadata:
601601

602602
```text
603-
$ git rebase -i upstream/master
603+
$ git rebase -i upstream/main
604604
```
605605

606606
This will open a screen like this (in the default shell editor):
@@ -670,19 +670,19 @@ for that commit. This is an opportunity to fix commit messages.
670670
pull request.
671671
* Protects against the assumption that GitHub will be around forever.
672672

673-
Other changes might have landed on master since the successful CI run. As a
673+
Other changes might have landed on `main` since the successful CI run. As a
674674
precaution, run tests (`make -j4 test` or `vcbuild test`).
675675

676676
Confirm that the commit message format is correct using
677677
[core-validate-commit](https://github.com/nodejs/core-validate-commit).
678678

679679
```text
680-
$ git rev-list upstream/master...HEAD | xargs core-validate-commit
680+
$ git rev-list upstream/main...HEAD | xargs core-validate-commit
681681
```
682682

683683
Optional: For your own commits, force push the amended commit to the pull
684684
request branch. If your branch name is `bugfix`, then:
685-
`git push --force-with-lease origin master:bugfix`. Don't close the pull
685+
`git push --force-with-lease origin main:bugfix`. Don't close the pull
686686
request. It will close after you push it upstream. It will have the purple
687687
merged status rather than the red closed status. If you close the pull request
688688
before GitHub adjusts its status, it will show up as a 0 commit pull
@@ -693,7 +693,7 @@ the issue with the red closed status.
693693
Time to push it:
694694

695695
```text
696-
$ git push upstream master
696+
$ git push upstream main
697697
```
698698

699699
Close the pull request with a "Landed in `<commit hash>`" comment. Even if
@@ -705,27 +705,27 @@ more than one commit.
705705

706706
### Troubleshooting
707707

708-
Sometimes, when running `git push upstream master`, you might get an error
708+
Sometimes, when running `git push upstream main`, you might get an error
709709
message like this:
710710

711711
```console
712712
To https://github.com/nodejs/node
713-
! [rejected] master -> master (fetch first)
713+
! [rejected] main -> main (fetch first)
714714
error: failed to push some refs to 'https://github.com/nodejs/node'
715715
hint: Updates were rejected because the tip of your current branch is behind
716716
hint: its remote counterpart. Integrate the remote changes (e.g.
717717
hint: 'git pull ...') before pushing again.
718718
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
719719
```
720720

721-
That means a commit has landed since your last rebase against `upstream/master`.
721+
That means a commit has landed since your last rebase against `upstream/main`.
722722
To fix this, pull with rebase from upstream, run the tests again, and (if the
723723
tests pass) push again:
724724

725725
```bash
726-
git pull upstream master --rebase
726+
git pull upstream main --rebase
727727
make -j4 test
728-
git push upstream master
728+
git push upstream main
729729
```
730730

731731
### I made a mistake
@@ -755,7 +755,7 @@ the branch.
755755
Each LTS release has a corresponding branch (v10.x, v8.x, etc.). Each also has a
756756
corresponding staging branch (v10.x-staging, v8.x-staging, etc.).
757757

758-
Commits that land on master are cherry-picked to each staging branch as
758+
Commits that land on `main` are cherry-picked to each staging branch as
759759
appropriate. If a change applies only to the LTS branch, open the pull request
760760
against the _staging_ branch. Commits from the staging branch land on the LTS
761761
branch only when a release is being prepared. They might land on the LTS branch
@@ -901,7 +901,7 @@ We use labels to keep track of which branches a commit should land on:
901901
* (for example semver-minor changes that need or should go into an LTS
902902
release)
903903
* `v?.x`
904-
* Automatically applied to changes that do not target `master` but rather the
904+
* Automatically applied to changes that do not target `main` but rather the
905905
`v?.x-staging` branch
906906

907907
Once a release line enters maintenance mode, the corresponding labels do not

doc/contributing/commit-queue.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Commit Queue is an experimental feature for the project which simplifies the
88
landing process by automating it via GitHub Actions. With it, collaborators can
99
land pull requests by adding the `commit-queue` label to a PR. All
1010
checks will run via node-core-utils, and if the pull request is ready to land,
11-
the Action will rebase it and push to master.
11+
the Action will rebase it and push to `main`.
1212

1313
This document gives an overview of how the Commit Queue works, as well as
1414
implementation details, reasoning for design choices, and current limitations.
@@ -108,7 +108,7 @@ forwarding stdout and stderr to a file. If any errors happen,
108108
to the PR, as well as a comment with the output of `git node land`.
109109

110110
If no errors happen during `git node land`, the script will use the
111-
`GITHUB_TOKEN` to push the changes to `master`, and then will leave a
111+
`GITHUB_TOKEN` to push the changes to `main`, and then will leave a
112112
`Landed in ...` comment in the PR, and then will close it. Iteration continues
113113
until all PRs have done the steps above.
114114

doc/contributing/diagnostic-tooling-support-tiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ the following tiers.
1414
suite for the tool/API is not green. To be considered for inclusion
1515
in this tier it must have a good test suite and that test suite and a job
1616
must exist in the Node.js CI so that it can be run as part of the release
17-
process. Tests on master will be run nightly when possible to provide
17+
process. Tests on `main` will be run nightly when possible to provide
1818
early warning of potential issues. No commit to the current and LTS
1919
release branches should break this tool/API if the next major release
2020
is within 1 month. In addition:

doc/contributing/maintaining-V8.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,12 @@ The rough outline of the process is:
326326

327327
```bash
328328
# Assuming your fork of Node.js is checked out in $NODE_DIR
329-
# and you want to update the Node.js master branch.
329+
# and you want to update the Node.js main branch.
330330
# Find the current (OLD) version in
331331
# $NODE_DIR/deps/v8/include/v8-version.h
332332
cd $NODE_DIR
333-
git checkout master
334-
git merge --ff-only origin/master
333+
git checkout main
334+
git merge --ff-only origin/main
335335
git checkout -b V8_NEW_VERSION
336336
curl -L https://github.com/v8/v8/compare/${V8_OLD_VERSION}...${V8_NEW_VERSION}.patch | git apply --directory=deps/v8
337337
# You may want to amend the commit message to describe the nature of the update
@@ -345,13 +345,13 @@ to apply a minor update.
345345

346346
### Major updates
347347

348-
We upgrade the version of V8 in Node.js master whenever a V8 release goes stable
348+
We upgrade the version of V8 in Node.js `main` whenever a V8 release goes stable
349349
upstream, that is, whenever a new release of Chrome comes out.
350350

351351
Upgrading major versions would be much harder to do with the patch mechanism
352352
above. A better strategy is to
353353

354-
1. Audit the current master branch and look at the patches that have been
354+
1. Audit the current `main` branch and look at the patches that have been
355355
floated since the last major V8 update.
356356
2. Replace the copy of V8 in Node.js with a fresh checkout of the latest stable
357357
V8 branch. Special care must be taken to recursively update the DEPS that V8
@@ -394,7 +394,7 @@ branches. This has several benefits:
394394
* The history of the V8 branch in `nodejs/v8` becomes purer and it would make it
395395
easier to pull in the V8 team for help with reviewing.
396396
* It would make it simpler to setup an automated build that tracks Node.js
397-
master + V8 lkgr integration build.
397+
`main` + V8 lkgr integration build.
398398

399399
This would require some tooling to:
400400

doc/contributing/maintaining-cjs-module-lexer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ implementation using WebAssembly which is generated from a
1717
C based implementation. These two paths
1818
resolve to the files in `deps/cjs-module-lexer` due to their
1919
inclusion in the `deps_files` entry in
20-
[node.gyp](https://github.com/nodejs/node/blob/master/node.gyp).
20+
[node.gyp](https://github.com/nodejs/node/blob/main/node.gyp).
2121

2222
The two different versions of lexer.js are maintained in the
2323
[nodejs/cjs-module-lexer][] project.

doc/contributing/maintaining-npm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Note: please ensure you are only making the updates that are changed by npm.
4141
## Step 4: Apply whitespace fix
4242

4343
```console
44-
$ git rebase --whitespace=fix master
44+
$ git rebase --whitespace=fix main
4545
```
4646

4747
## Step 5: Test the build

doc/contributing/maintaining-openssl.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This document describes how to update `deps/openssl/`.
55
If you need to provide updates across all active release lines you will
66
currently need to generate four PRs as follows:
77

8-
* a PR for master which is generated following the instructions
8+
* a PR for `main` which is generated following the instructions
99
below for OpenSSL 3.x.x.
1010
* a PR for 16.x following the instructions in the v16.x-staging version
1111
of this guide.

doc/contributing/maintaining-web-assembly.md

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

33
Support for [WebAssembly](https://webassembly.org/)
44
has been identified as one of the
5-
[top technical priorities](https://github.com/nodejs/node/blob/master/doc/contributing/technical-priorities.md#webassembly)
5+
[top technical priorities](https://github.com/nodejs/node/blob/main/doc/contributing/technical-priorities.md#webassembly)
66
for the future success of Node.js.
77

88
This document provides an overview of our high-level strategy for
@@ -76,7 +76,7 @@ The Node.js WASI implementation is maintained in the
7676
[uvwasi](https://github.com/nodejs/uvwasi) repository in the
7777
Node.js GitHub organization. As needed, an updated copy
7878
is vendored into the Node.js deps in
79-
[deps/uvwasi](https://github.com/nodejs/node/tree/master/deps/uvwasi).
79+
[deps/uvwasi](https://github.com/nodejs/node/tree/main/deps/uvwasi).
8080

8181
To update the copy of uvwasi in the Node.js deps:
8282

@@ -92,6 +92,6 @@ The documentation for this API is in
9292

9393
The implementation of the bindings and the public API is in:
9494

95-
* [src/node\_wasi.h](https://github.com/nodejs/node/blob/master/src/node_wasi.h)
96-
* [src/node\_wasi.cc](https://github.com/nodejs/node/blob/master/src/node_wasi.cc)
97-
* [lib/wasi.js](https://github.com/nodejs/node/blob/master/lib/wasi.js)
95+
* [src/node\_wasi.h](https://github.com/nodejs/node/blob/main/src/node_wasi.h)
96+
* [src/node\_wasi.cc](https://github.com/nodejs/node/blob/main/src/node_wasi.cc)
97+
* [lib/wasi.js](https://github.com/nodejs/node/blob/main/lib/wasi.js)

doc/contributing/writing-and-running-benchmarks.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -256,17 +256,17 @@ As an example on how to check for a possible performance improvement, the
256256
an example. This pull request _claims_ to improve the performance of the
257257
`node:string_decoder` module.
258258

259-
First build two versions of Node.js, one from the master branch (here called
260-
`./node-master`) and another with the pull request applied (here called
259+
First build two versions of Node.js, one from the `main` branch (here called
260+
`./node-main`) and another with the pull request applied (here called
261261
`./node-pr-5134`).
262262

263263
To run multiple compiled versions in parallel you need to copy the output of the
264-
build: `cp ./out/Release/node ./node-master`. Check out the following example:
264+
build: `cp ./out/Release/node ./node-main`. Check out the following example:
265265

266266
```console
267-
$ git checkout master
267+
$ git checkout main
268268
$ ./configure && make -j4
269-
$ cp ./out/Release/node ./node-master
269+
$ cp ./out/Release/node ./node-main
270270

271271
$ git checkout pr-5134
272272
$ ./configure && make -j4
@@ -276,7 +276,7 @@ $ cp ./out/Release/node ./node-pr-5134
276276
The `compare.js` tool will then produce a csv file with the benchmark results.
277277

278278
```console
279-
$ node benchmark/compare.js --old ./node-master --new ./node-pr-5134 string_decoder > compare-pr-5134.csv
279+
$ node benchmark/compare.js --old ./node-main --new ./node-pr-5134 string_decoder > compare-pr-5134.csv
280280
```
281281

282282
_Tips: there are some useful options of `benchmark/compare.js`. For example,

doc/contributing/writing-tests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ will depend on what is being tested if this is required or not.
469469
To generate a test coverage report, see the
470470
[Test Coverage section of the Building guide][].
471471

472-
Nightly coverage reports for the Node.js master branch are available at
472+
Nightly coverage reports for the Node.js `main` branch are available at
473473
<https://coverage.nodejs.org/>.
474474

475475
[ASCII]: https://man7.org/linux/man-pages/man7/ascii.7.html

0 commit comments

Comments
 (0)