Skip to content

Commit

Permalink
Update contributing guidelines, add a PR template (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
kale-stew committed May 4, 2020
1 parent 7cae283 commit 271b81b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 16 deletions.
17 changes: 17 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
For more information on any of the below, please see our Contributing guidelines:
https://github.com/FormidableLabs/react-fast-compare/blob/master/CONTRIBUTING.md#before-submitting-a-pr
-->

## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

## Checklist:

- [ ] All tests are passing
- [ ] Benchmark performance has not significantly decreased
- [ ] Bundle size has not been significantly impacted
- [ ] The bundle size badge has been updated to reflect the new size
42 changes: 26 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
Contributing
============
# Contributing

Thanks for contributing!

## Before you contribute

This package is a fork of [fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal). This library has added handling for React. Before contributing, _please make sure the issue relates directly to this library and not fast-deep-equals_.
This package is a fork of [fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal). This library has added handling for React.
Before contributing, _please make sure the issue relates directly to this library and not fast-deep-equal_.

We encourage pull requests concerning:

* React features not handled in this library
* Integrating updates from `fast-deep-equal`. This unfortunately, now requires more manual work to use the comment blocks in `index.js` to figure out what to paste and where.
* Integrating tests from `fast-deep-equal`. This usually entails upgrading the `git`-based dependencies of `fast-deep-equal-git` and `npm`-published package of `fast-deep-equal` in `package.json:devDependencies`.
* Integrating updates from `fast-deep-equal` - This, unfortunately, now requires more manual work. Use the comment blocks in `index.js`
to figure out what to paste and where.
* Integrating tests from `fast-deep-equal` - This usually entails upgrading the `git`-based dependencies of `fast-deep-equal-git` and
`npm`-published package of `fast-deep-equal` in `package.json:devDependencies`.
* Bugs in this library
* New tests for React
* Documentation
Expand All @@ -30,7 +32,7 @@ Install the project using `yarn` (which we've standardized on for development):
$ yarn install
```

`tl;dr` -- Everything you normally need to run is aggregated into:
**TL; DR:** Everything you normally need to run is aggregated into:

```sh
$ yarn run test
Expand Down Expand Up @@ -106,24 +108,32 @@ $ yarn -s compress
$ yarn size-min-gz
```

**Note**: If the min+gz size increases, please note it in the README. If it is a significant increase, please flag to your reviewers and have a discussion about whether or not the size addition is justified.
**Note**: If the min+gz size increases, please note it in the README. If it is a significant increase,
please flag to your reviewers and have a discussion about whether or not the size addition is justified.

## Before submitting a PR...

Before you go ahead and submit a PR, make sure that you have done the following:
... please make sure that you have done the following:

```sh
$ yarn run test
$ yarn run benchmark
```
1. Confirm that all checks are passing:

```sh
$ yarn run test
$ yarn run benchmark
```

2. Confirm we don't have any significant performance regressions (check out `master` for a baseline comparison on _your_ machine).

1. Everything must be correct / pass checks.
2. You should also check the benchmark stats and make sure that we don't have any significant performance regressions (check out `master` for a baseline comparison on _your_ machine).
- Please **do** update the README benchmark numbers for changes in your PR so that we have much easier discussion points _and_ our users get up-to-date information.
3. Confirm you aren't impacting our bundle size.
If you _do_ affect the bundle size, please update the bundle badge in the Readme by
* Following the steps outlined in [size](#size):
`yarn -s compress && yarn size-min-gz`
* Grabbing that output and replacing the current size in the bundle_img: (`https://img.shields.io/badge/minzipped%20size-<NEW_SIZE>%20B-flatgreen.svg`)
For example, if the new size is `650`, the new bundle_img will be `https://img.shields.io/badge/minzipped%20size-650%20B-flatgreen.svg`

## Releasing a new version to NPM

_Only for project administrators_.
_Only for project administrators_

1. Run `npm version patch` (or `minor|major|VERSION`) to run tests and lint,
build published directories, then update `package.json` + add a git tag.
Expand Down

0 comments on commit 271b81b

Please sign in to comment.