Skip to content

Commit

Permalink
fix: modernize the project and fix a few bugs (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed May 20, 2020
1 parent 9634863 commit 8de61c1
Show file tree
Hide file tree
Showing 44 changed files with 10,316 additions and 16,071 deletions.
13 changes: 0 additions & 13 deletions .babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion .gitattributes
@@ -1 +1 @@
text=auto
* text=auto eol=lf
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE.md
@@ -0,0 +1,46 @@
<!--
Thanks for your interest in the project. I appreciate bugs filed and PRs submitted!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Please fill out this template with all the relevant information so we can
understand what's going on and fix the issue.
I'll probably ask you to submit the fix (after giving some direction). If you've
never done that before, that's great! Check this free short video tutorial to
learn how: http://kcd.im/pull-request
-->

- `@testing-library/user-event` version:
- Testing Framework and version:
<!-- are you using jest, mocha, puppeteer, ava? And what version? -->
- DOM Environment:
<!-- If you're using jsdom (the default with jest), what version? Otherwise, what browser and version are you running tests in? -->

<!--
Keep in mind that if you're using a version of node we don't support that
could also be an issue. Check our package.json "engines" file for the
supported version.
-->

Relevant code or config

```javascript
```

What you did:

What happened:

<!-- Please provide the full error message/screenshots/anything -->

Reproduction repository:

<!--
If possible, please create a repository that reproduces the issue with the
minimal amount of code possible.
-->

Problem description:

Suggested solution:
42 changes: 42 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,42 @@
<!--
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
Please make sure that you are familiar with and follow the Code of Conduct for
this project (found in the CODE_OF_CONDUCT.md file).
Also, please make sure you're familiar with and follow the instructions in the
contributing guidelines (found in the CONTRIBUTING.md file).
If you're new to contributing to open source projects, you might find this free
video course helpful: http://kcd.im/pull-request
Please fill out the information below to expedite the review and (hopefully)
merge of your pull request!
-->

<!-- What changes are being made? (What feature/bug is being fixed here?) -->

**What**:

<!-- Why are these changes necessary? -->

**Why**:

<!-- How were these changes implemented? -->

**How**:

<!-- Have you done all of these things? -->

**Checklist**:

<!-- add "N/A" to the end of each line that's irrelevant to your changes -->
<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->

- [ ] Documentation
- [ ] Tests
- [ ] Typings
- [ ] Ready to be merged
<!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->

<!-- feel free to add additional comments -->
11 changes: 8 additions & 3 deletions .gitignore
@@ -1,4 +1,9 @@
node_modules
coverage/
dist/
.idea/
coverage
dist
.DS_Store

# these cause more harm than good
# when working with contributors
package-lock.json
yarn.lock
1 change: 1 addition & 0 deletions .huskyrc.js
@@ -0,0 +1 @@
module.exports = require('kcd-scripts/husky')
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
registry=http://registry.npmjs.org/
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

3 changes: 3 additions & 0 deletions .prettierignore
@@ -0,0 +1,3 @@
node_modules
coverage
dist
4 changes: 1 addition & 3 deletions .prettierrc.js
@@ -1,3 +1 @@
module.exports = {
proseWrap: "always"
};
module.exports = require('kcd-scripts/prettier')
42 changes: 18 additions & 24 deletions .travis.yml
@@ -1,30 +1,24 @@
env:
global:
- CC_TEST_REPORTER_ID=432df2a7d2692b54e9c072feb2c8cec8cd943456c14800c18445b6e65f709a3c
- CODECOV_TOKEN="a0f80db0-4517-4d00-a6e6-eaf8a7089079"
language: node_js
cache:
directories:
- ~/.npm
cache: npm
notifications:
email: false
node_js:
- '13'
- '12'
- '10'
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- 10
- 12
- 14
- node
install: npm install
script:
- npm run test:coverage
after_success:
- npm run codecov
- npm run build
- rm ./cc-test-reporter
- npm run travis-deploy-once "npm run semantic-release"
- npm run validate
- npx codecov@3
branches:
except:
- /^v\d+\.\d+\.\d+$/
only:
- master
- beta

jobs:
include:
- stage: release
node_js: 14
script: kcd-scripts travis-release
if: fork = false
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,5 @@
# CHANGELOG

The changelog is automatically updated using
[semantic-release](https://github.com/semantic-release/semantic-release). You
can see it on the [releases page](../../releases).
46 changes: 46 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,46 @@
# Contributing

Thanks for being willing to contribute!

**Working on your first Pull Request?** You can learn how from this _free_
series [How to Contribute to an Open Source Project on GitHub][egghead]

## Project setup

1. Fork and clone the repo
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:
>
> ```
> git remote add upstream https://github.com/testing-library/user-event
> git fetch upstream
> git branch --set-upstream-to=upstream/master master
> ```
>
> 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`.
## Committing and Pushing changes

Please make sure to run the tests before you commit your changes. You can run
`npm run test:update` which will update any snapshots that need updating. Make
sure to include those changes (if they exist) in your commit.

## Help needed

Please checkout the [the open issues][issues]

Also, please watch the repo and respond to questions/bug reports/feature
requests! Thanks!

<!-- prettier-ignore-start -->
[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
[all-contributors]: https://github.com/all-contributors/all-contributors
[issues]: https://github.com/testing-library/user-event/issues
<!-- prettier-ignore-end -->
5 changes: 2 additions & 3 deletions LICENSE
@@ -1,6 +1,5 @@
MIT License

Copyright (c) 2018 Giorgio Polvara
The MIT License (MIT)
Copyright (c) 2020 Giorgio Polvara

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

0 comments on commit 8de61c1

Please sign in to comment.