Skip to content

Commit 8de61c1

Browse files
authored
fix: modernize the project and fix a few bugs (#290)
1 parent 9634863 commit 8de61c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+10316
-16071
lines changed

.babelrc

-13
This file was deleted.

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
text=auto
1+
* text=auto eol=lf

.github/ISSUE_TEMPLATE.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!--
2+
Thanks for your interest in the project. I appreciate bugs filed and PRs submitted!
3+
Please make sure that you are familiar with and follow the Code of Conduct for
4+
this project (found in the CODE_OF_CONDUCT.md file).
5+
6+
Please fill out this template with all the relevant information so we can
7+
understand what's going on and fix the issue.
8+
9+
I'll probably ask you to submit the fix (after giving some direction). If you've
10+
never done that before, that's great! Check this free short video tutorial to
11+
learn how: http://kcd.im/pull-request
12+
-->
13+
14+
- `@testing-library/user-event` version:
15+
- Testing Framework and version:
16+
<!-- are you using jest, mocha, puppeteer, ava? And what version? -->
17+
- DOM Environment:
18+
<!-- If you're using jsdom (the default with jest), what version? Otherwise, what browser and version are you running tests in? -->
19+
20+
<!--
21+
Keep in mind that if you're using a version of node we don't support that
22+
could also be an issue. Check our package.json "engines" file for the
23+
supported version.
24+
-->
25+
26+
Relevant code or config
27+
28+
```javascript
29+
```
30+
31+
What you did:
32+
33+
What happened:
34+
35+
<!-- Please provide the full error message/screenshots/anything -->
36+
37+
Reproduction repository:
38+
39+
<!--
40+
If possible, please create a repository that reproduces the issue with the
41+
minimal amount of code possible.
42+
-->
43+
44+
Problem description:
45+
46+
Suggested solution:

.github/PULL_REQUEST_TEMPLATE.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!--
2+
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
3+
4+
Please make sure that you are familiar with and follow the Code of Conduct for
5+
this project (found in the CODE_OF_CONDUCT.md file).
6+
7+
Also, please make sure you're familiar with and follow the instructions in the
8+
contributing guidelines (found in the CONTRIBUTING.md file).
9+
10+
If you're new to contributing to open source projects, you might find this free
11+
video course helpful: http://kcd.im/pull-request
12+
13+
Please fill out the information below to expedite the review and (hopefully)
14+
merge of your pull request!
15+
-->
16+
17+
<!-- What changes are being made? (What feature/bug is being fixed here?) -->
18+
19+
**What**:
20+
21+
<!-- Why are these changes necessary? -->
22+
23+
**Why**:
24+
25+
<!-- How were these changes implemented? -->
26+
27+
**How**:
28+
29+
<!-- Have you done all of these things? -->
30+
31+
**Checklist**:
32+
33+
<!-- add "N/A" to the end of each line that's irrelevant to your changes -->
34+
<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->
35+
36+
- [ ] Documentation
37+
- [ ] Tests
38+
- [ ] Typings
39+
- [ ] Ready to be merged
40+
<!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
41+
42+
<!-- feel free to add additional comments -->

.gitignore

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
node_modules
2-
coverage/
3-
dist/
4-
.idea/
2+
coverage
3+
dist
4+
.DS_Store
5+
6+
# these cause more harm than good
7+
# when working with contributors
8+
package-lock.json
9+
yarn.lock

.huskyrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('kcd-scripts/husky')

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=http://registry.npmjs.org/

.nvmrc

-1
This file was deleted.

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
coverage
3+
dist

.prettierrc.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
module.exports = {
2-
proseWrap: "always"
3-
};
1+
module.exports = require('kcd-scripts/prettier')

.travis.yml

+18-24
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
1-
env:
2-
global:
3-
- CC_TEST_REPORTER_ID=432df2a7d2692b54e9c072feb2c8cec8cd943456c14800c18445b6e65f709a3c
4-
- CODECOV_TOKEN="a0f80db0-4517-4d00-a6e6-eaf8a7089079"
51
language: node_js
6-
cache:
7-
directories:
8-
- ~/.npm
2+
cache: npm
93
notifications:
104
email: false
115
node_js:
12-
- '13'
13-
- '12'
14-
- '10'
15-
before_script:
16-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
17-
- chmod +x ./cc-test-reporter
18-
- ./cc-test-reporter before-build
19-
after_script:
20-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
6+
- 10
7+
- 12
8+
- 14
9+
- node
10+
install: npm install
2111
script:
22-
- npm run test:coverage
23-
after_success:
24-
- npm run codecov
25-
- npm run build
26-
- rm ./cc-test-reporter
27-
- npm run travis-deploy-once "npm run semantic-release"
12+
- npm run validate
13+
- npx codecov@3
2814
branches:
29-
except:
30-
- /^v\d+\.\d+\.\d+$/
15+
only:
16+
- master
17+
- beta
18+
19+
jobs:
20+
include:
21+
- stage: release
22+
node_js: 14
23+
script: kcd-scripts travis-release
24+
if: fork = false

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG
2+
3+
The changelog is automatically updated using
4+
[semantic-release](https://github.com/semantic-release/semantic-release). You
5+
can see it on the [releases page](../../releases).

CONTRIBUTING.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributing
2+
3+
Thanks for being willing to contribute!
4+
5+
**Working on your first Pull Request?** You can learn how from this _free_
6+
series [How to Contribute to an Open Source Project on GitHub][egghead]
7+
8+
## Project setup
9+
10+
1. Fork and clone the repo
11+
2. Run `npm run setup -s` to install dependencies and run validation
12+
3. Create a branch for your PR with `git checkout -b pr/your-branch-name`
13+
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:
16+
>
17+
> ```
18+
> git remote add upstream https://github.com/testing-library/user-event
19+
> git fetch upstream
20+
> git branch --set-upstream-to=upstream/master master
21+
> ```
22+
>
23+
> 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`.
28+
29+
## Committing and Pushing changes
30+
31+
Please make sure to run the tests before you commit your changes. You can run
32+
`npm run test:update` which will update any snapshots that need updating. Make
33+
sure to include those changes (if they exist) in your commit.
34+
35+
## Help needed
36+
37+
Please checkout the [the open issues][issues]
38+
39+
Also, please watch the repo and respond to questions/bug reports/feature
40+
requests! Thanks!
41+
42+
<!-- prettier-ignore-start -->
43+
[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
44+
[all-contributors]: https://github.com/all-contributors/all-contributors
45+
[issues]: https://github.com/testing-library/user-event/issues
46+
<!-- prettier-ignore-end -->

LICENSE

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
MIT License
2-
3-
Copyright (c) 2018 Giorgio Polvara
1+
The MIT License (MIT)
2+
Copyright (c) 2020 Giorgio Polvara
43

54
Permission is hereby granted, free of charge, to any person obtaining a copy
65
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)