Skip to content

Commit a31ecc9

Browse files
authored
chore: rename default branch (#675)
* chore: Updating master branch refs into main * chore: updating the validate file to support both main and master branches as an intermidiate step
1 parent 1bbac04 commit a31ecc9

File tree

5 files changed

+19
-16
lines changed

5 files changed

+19
-16
lines changed

.github/workflows/validate.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches:
55
[
66
'+([0-9])?(.{+([0-9]),x}).x',
7+
'main',
78
'master',
89
'next',
910
'next-major',
@@ -46,7 +47,7 @@ jobs:
4647
runs-on: ubuntu-latest
4748
if:
4849
${{ github.repository == 'testing-library/user-event' &&
49-
contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha',
50+
contains('refs/heads/main,refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha',
5051
github.ref) && github.event_name == 'push' }}
5152
steps:
5253
- name: ⬇️ Checkout repo
@@ -74,6 +75,7 @@ jobs:
7475
branches: |
7576
[
7677
'+([0-9])?(.{+([0-9]),x}).x',
78+
'main',
7779
'master',
7880
'next',
7981
'next-major',

CONTRIBUTING.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ series [How to Contribute to an Open Source Project on GitHub][egghead]
1111
2. Run `npm run setup -s` to install dependencies and run validation
1212
3. Create a branch for your PR with `git checkout -b pr/your-branch-name`
1313

14-
> Tip: Keep your `master` branch pointing at the original repository and make
15-
> pull requests from branches on your fork. To do this, run:
14+
> Tip: Keep your `main` branch pointing at the original repository and make pull
15+
> requests from branches on your fork. To do this, run:
1616
>
1717
> ```
1818
> git remote add upstream https://github.com/testing-library/user-event
1919
> git fetch upstream
20-
> git branch --set-upstream-to=upstream/master master
20+
> git branch --set-upstream-to=upstream/main main
2121
> ```
2222
>
2323
> This will add the original repository as a "remote" called "upstream," Then
24-
> fetch the git information from that remote, then set your local `master`
25-
> branch to use the upstream master branch whenever you run `git pull`. Then you
26-
> can make all of your pull request branches based on this `master` branch.
27-
> Whenever you want to update your version of `master`, do a regular `git pull`.
24+
> fetch the git information from that remote, then set your local `main` branch
25+
> to use the upstream main branch whenever you run `git pull`. Then you can make
26+
> all of your pull request branches based on this `main` branch. Whenever you
27+
> want to update your version of `main`, do a regular `git pull`.
2828
2929
## Consistency
3030

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
height="80"
77
width="80"
88
alt="dog"
9-
src="https://raw.githubusercontent.com/testing-library/user-event/master/other/dog.png"
9+
src="https://raw.githubusercontent.com/testing-library/user-event/main/other/dog.png"
1010
/>
1111
</a>
1212

@@ -136,7 +136,8 @@ constructor documentation for more options.
136136

137137
Note that `click` will trigger hover events before clicking. To disable this,
138138
set the `skipHover` option to `true`. Also note that trying to click an element
139-
with `pointer-events` being set to `"none"` (i.e. unclickable) will throw an error.
139+
with `pointer-events` being set to `"none"` (i.e. unclickable) will throw an
140+
error.
140141

141142
### `dblClick(element, eventInit, options)`
142143

@@ -323,7 +324,7 @@ userEvent.keyboard('a', {keyboardState}) // press [KeyA] with active ctrlKey mod
323324
```
324325

325326
The mapping of `key` to `code` is performed by a
326-
[default key map](https://github.com/testing-library/user-event/blob/master/src/keyboard/keyMap.ts)
327+
[default key map](https://github.com/testing-library/user-event/blob/main/src/keyboard/keyMap.ts)
327328
portraying a "default" US-keyboard. You can provide your own local keyboard
328329
mapping per option.
329330

@@ -796,7 +797,7 @@ MIT
796797
<!-- prettier-ignore-start -->
797798
[npm]: https://www.npmjs.com
798799
[node]: https://nodejs.org
799-
[build-badge]: https://img.shields.io/github/workflow/status/testing-library/user-event/validate/master?logo=github&style=flat-square
800+
[build-badge]: https://img.shields.io/github/workflow/status/testing-library/user-event/validate/main?logo=github&style=flat-square
800801
[build]: https://github.com/testing-library/user-event/actions?query=workflow%3Avalidate
801802
[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/user-event.svg?style=flat-square
802803
[coverage]: https://codecov.io/github/testing-library/user-event
@@ -805,11 +806,11 @@ MIT
805806
[downloads-badge]: https://img.shields.io/npm/dm/@testing-library/user-event.svg?style=flat-square
806807
[npmtrends]: http://www.npmtrends.com/@testing-library/user-event
807808
[license-badge]: https://img.shields.io/npm/l/@testing-library/user-event.svg?style=flat-square
808-
[license]: https://github.com/testing-library/user-event/blob/master/LICENSE
809+
[license]: https://github.com/testing-library/user-event/blob/main/LICENSE
809810
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
810811
[prs]: http://makeapullrequest.com
811812
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
812-
[coc]: https://github.com/testing-library/user-event/blob/master/other/CODE_OF_CONDUCT.md
813+
[coc]: https://github.com/testing-library/user-event/blob/main/other/CODE_OF_CONDUCT.md
813814
[emojis]: https://github.com/all-contributors/all-contributors#emoji-key
814815
[all-contributors]: https://github.com/all-contributors/all-contributors
815816
[all-contributors-badge]: https://img.shields.io/github/all-contributors/testing-library/user-event?color=orange&style=flat-square

other/MAINTAINING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ to release. See the next section on Releases for more about that.
6161

6262
## Release
6363

64-
Our releases are automatic. They happen whenever code lands into `master`. A
64+
Our releases are automatic. They happen whenever code lands into `main`. A
6565
GitHub Action gets kicked off and if it's successful, a tool called
6666
[`semantic-release`](https://github.com/semantic-release/semantic-release) is
6767
used to automatically publish a new release to npm as well as a changelog to

src/keyboard/getNextKeyDef.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,6 @@ function getErrorMessage(
142142
text: string,
143143
) {
144144
return `Expected ${expected} but found "${found ?? ''}" in "${text}"
145-
See https://github.com/testing-library/user-event/blob/master/README.md#keyboardtext-options
145+
See https://github.com/testing-library/user-event/blob/main/README.md#keyboardtext-options
146146
for more information about how userEvent parses your input.`
147147
}

0 commit comments

Comments
 (0)