Skip to content

Commit 271b81b

Browse files
author
Kylie Stewart
authored
Update contributing guidelines, add a PR template (#72)
1 parent 7cae283 commit 271b81b

2 files changed

Lines changed: 43 additions & 16 deletions

File tree

.github/pull_request_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!--
2+
3+
For more information on any of the below, please see our Contributing guidelines:
4+
https://github.com/FormidableLabs/react-fast-compare/blob/master/CONTRIBUTING.md#before-submitting-a-pr
5+
6+
-->
7+
8+
## Description
9+
10+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
11+
12+
## Checklist:
13+
14+
- [ ] All tests are passing
15+
- [ ] Benchmark performance has not significantly decreased
16+
- [ ] Bundle size has not been significantly impacted
17+
- [ ] The bundle size badge has been updated to reflect the new size

CONTRIBUTING.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
Contributing
2-
============
1+
# Contributing
32

43
Thanks for contributing!
54

65
## Before you contribute
76

8-
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_.
7+
This package is a fork of [fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal). This library has added handling for React.
8+
Before contributing, _please make sure the issue relates directly to this library and not fast-deep-equal_.
99

1010
We encourage pull requests concerning:
1111

1212
* React features not handled in this library
13-
* 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.
14-
* 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`.
13+
* Integrating updates from `fast-deep-equal` - This, unfortunately, now requires more manual work. Use the comment blocks in `index.js`
14+
to figure out what to paste and where.
15+
* Integrating tests from `fast-deep-equal` - This usually entails upgrading the `git`-based dependencies of `fast-deep-equal-git` and
16+
`npm`-published package of `fast-deep-equal` in `package.json:devDependencies`.
1517
* Bugs in this library
1618
* New tests for React
1719
* Documentation
@@ -30,7 +32,7 @@ Install the project using `yarn` (which we've standardized on for development):
3032
$ yarn install
3133
```
3234

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

3537
```sh
3638
$ yarn run test
@@ -106,24 +108,32 @@ $ yarn -s compress
106108
$ yarn size-min-gz
107109
```
108110

109-
**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.
111+
**Note**: If the min+gz size increases, please note it in the README. If it is a significant increase,
112+
please flag to your reviewers and have a discussion about whether or not the size addition is justified.
110113

111114
## Before submitting a PR...
112115

113-
Before you go ahead and submit a PR, make sure that you have done the following:
116+
... please make sure that you have done the following:
114117

115-
```sh
116-
$ yarn run test
117-
$ yarn run benchmark
118-
```
118+
1. Confirm that all checks are passing:
119+
120+
```sh
121+
$ yarn run test
122+
$ yarn run benchmark
123+
```
124+
125+
2. Confirm we don't have any significant performance regressions (check out `master` for a baseline comparison on _your_ machine).
119126

120-
1. Everything must be correct / pass checks.
121-
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).
122-
- 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.
127+
3. Confirm you aren't impacting our bundle size.
128+
If you _do_ affect the bundle size, please update the bundle badge in the Readme by
129+
* Following the steps outlined in [size](#size):
130+
`yarn -s compress && yarn size-min-gz`
131+
* Grabbing that output and replacing the current size in the bundle_img: (`https://img.shields.io/badge/minzipped%20size-<NEW_SIZE>%20B-flatgreen.svg`)
132+
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`
123133

124134
## Releasing a new version to NPM
125135

126-
_Only for project administrators_.
136+
_Only for project administrators_
127137

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

0 commit comments

Comments
 (0)