Skip to content

Commit

Permalink
chore: rename default branch (#675)
Browse files Browse the repository at this point in the history
* chore: Updating master branch refs into main

* chore: updating the validate file to support both main and master branches as an intermidiate step
  • Loading branch information
itsik-avidan authored Jul 18, 2021
1 parent 1bbac04 commit a31ecc9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'master',
'next',
'next-major',
Expand Down Expand Up @@ -46,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
if:
${{ github.repository == 'testing-library/user-event' &&
contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha',
contains('refs/heads/main,refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha',
github.ref) && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
Expand Down Expand Up @@ -74,6 +75,7 @@ jobs:
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'master',
'next',
'next-major',
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ series [How to Contribute to an Open Source Project on GitHub][egghead]
2. Run `npm run setup -s` to install dependencies and run validation
3. Create a branch for your PR with `git checkout -b pr/your-branch-name`

> Tip: Keep your `master` branch pointing at the original repository and make
> pull requests from branches on your fork. To do this, run:
> Tip: Keep your `main` branch pointing at the original repository and make pull
> requests from branches on your fork. To do this, run:
>
> ```
> git remote add upstream https://github.com/testing-library/user-event
> git fetch upstream
> git branch --set-upstream-to=upstream/master master
> git branch --set-upstream-to=upstream/main main
> ```
>
> This will add the original repository as a "remote" called "upstream," Then
> fetch the git information from that remote, then set your local `master`
> branch to use the upstream master branch whenever you run `git pull`. Then you
> can make all of your pull request branches based on this `master` branch.
> Whenever you want to update your version of `master`, do a regular `git pull`.
> fetch the git information from that remote, then set your local `main` branch
> to use the upstream main branch whenever you run `git pull`. Then you can make
> all of your pull request branches based on this `main` branch. Whenever you
> want to update your version of `main`, do a regular `git pull`.
## Consistency

Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
height="80"
width="80"
alt="dog"
src="https://raw.githubusercontent.com/testing-library/user-event/master/other/dog.png"
src="https://raw.githubusercontent.com/testing-library/user-event/main/other/dog.png"
/>
</a>

Expand Down Expand Up @@ -136,7 +136,8 @@ constructor documentation for more options.

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

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

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

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

Expand Down Expand Up @@ -796,7 +797,7 @@ MIT
<!-- prettier-ignore-start -->
[npm]: https://www.npmjs.com
[node]: https://nodejs.org
[build-badge]: https://img.shields.io/github/workflow/status/testing-library/user-event/validate/master?logo=github&style=flat-square
[build-badge]: https://img.shields.io/github/workflow/status/testing-library/user-event/validate/main?logo=github&style=flat-square
[build]: https://github.com/testing-library/user-event/actions?query=workflow%3Avalidate
[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/user-event.svg?style=flat-square
[coverage]: https://codecov.io/github/testing-library/user-event
Expand All @@ -805,11 +806,11 @@ MIT
[downloads-badge]: https://img.shields.io/npm/dm/@testing-library/user-event.svg?style=flat-square
[npmtrends]: http://www.npmtrends.com/@testing-library/user-event
[license-badge]: https://img.shields.io/npm/l/@testing-library/user-event.svg?style=flat-square
[license]: https://github.com/testing-library/user-event/blob/master/LICENSE
[license]: https://github.com/testing-library/user-event/blob/main/LICENSE
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[prs]: http://makeapullrequest.com
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
[coc]: https://github.com/testing-library/user-event/blob/master/other/CODE_OF_CONDUCT.md
[coc]: https://github.com/testing-library/user-event/blob/main/other/CODE_OF_CONDUCT.md
[emojis]: https://github.com/all-contributors/all-contributors#emoji-key
[all-contributors]: https://github.com/all-contributors/all-contributors
[all-contributors-badge]: https://img.shields.io/github/all-contributors/testing-library/user-event?color=orange&style=flat-square
Expand Down
2 changes: 1 addition & 1 deletion other/MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ to release. See the next section on Releases for more about that.

## Release

Our releases are automatic. They happen whenever code lands into `master`. A
Our releases are automatic. They happen whenever code lands into `main`. A
GitHub Action gets kicked off and if it's successful, a tool called
[`semantic-release`](https://github.com/semantic-release/semantic-release) is
used to automatically publish a new release to npm as well as a changelog to
Expand Down
2 changes: 1 addition & 1 deletion src/keyboard/getNextKeyDef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,6 @@ function getErrorMessage(
text: string,
) {
return `Expected ${expected} but found "${found ?? ''}" in "${text}"
See https://github.com/testing-library/user-event/blob/master/README.md#keyboardtext-options
See https://github.com/testing-library/user-event/blob/main/README.md#keyboardtext-options
for more information about how userEvent parses your input.`
}

0 comments on commit a31ecc9

Please sign in to comment.