Contributions are always welcome, no matter how large or small!
When contributing to this repository, please first discuss the change you wish to make via an issue with the owners of this repository before making a change.
Please follow the code of conduct in all your interactions with the project.
This section will walk you through how to get started working with the code.
Verify that node.js is installed.
Verify that pnpm
is installed.
Alternatively, we recommend you install Volta to run the correct node.js and package manager versions for this project.
All code changes must work on the minimum Node version specified in package.json under the engines
key.
Fork the papr
repository to your GitHub Account.
Then, run:
$ git clone https://github.com/<your-github-username>/papr
$ cd papr
$ pnpm install
Unit tests:
$ pnpm test
TypeScript tests:
$ pnpm test:types
Linting tests:
$ pnpm lint
Running tests in watch mode:
$ pnpm watch
$ pnpm watch:types
This repository follows the Conventional Commits standard.
The format should look something like the following (note the blank lines):
<type>[optional scope]: <description>
[optional body]
[optional footer]
The types allowed are the types enforced by the @commitlint/config-conventional
package:
build
chore
ci
docs
feat
fix
perf
refactor
revert
style
test
This helps us automate the HISTORY.md generation.
This repository follows semver versioning. The metadata from the commit messages is used when determining the next version to be released:
- major versions:
feat
commits withBREAKING CHANGE
labels inside the commit footer - minor versions:
feat
commits - patch versions: all non-
feat
commits
- Create your branch from
main
- Make your code or other changes.
- Add or update relevant unit/type tests.
- Push the code to your forked repository and open a draft pull request (please follow the guidelines in How to write the perfect pull request)
- Perform a self-review using the reviewer guidelines below prior to taking the PR out of draft state.
Reviewers should use the following questions to evaluate the implementation for correctness/completeness and ensure all housekeeping items have been addressed prior to merging the code.
-
Correctness/completeness
- Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
- Is the intention of the code captured in relevant tests?
- Does the description of each test accurately represent the assertions?
- For any test explicitly called out on the issue as desirable to implement, was it implemented?
- Could these changes impact any adjacent functionality?
- Are there any errors that might not be correctly caught or propagated?
- Is there anything that could impact performance?
- Can you think of a better way to implement any of the functional code or tests? "Better" means any combination of:
- more performant
- better organized / easier to understand / clearer separation of concerns
- easier to maintain (easier to change, harder to accidentally break)
-
Housekeeping
- Does the title and description of the PR reference the correct issue and does it use the correct conventional commit type (e.g., fix, feat, test, breaking change etc)?
- If there are new TODOs, has a related issue been created?
- Should any documentation be updated?