You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+49-20Lines changed: 49 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -9,20 +9,20 @@ Before contributing, _please make sure the issue relates directly to this librar
9
9
10
10
We encourage pull requests concerning:
11
11
12
-
* React features not handled in this library
13
-
* Integrating updates from `fast-deep-equal` - This, unfortunately, now requires more manual work. Use the comment blocks in `index.js`
12
+
- React features not handled in this library
13
+
- Integrating updates from `fast-deep-equal` - This, unfortunately, now requires more manual work. Use the comment blocks in `index.js`
14
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
15
+
- Integrating tests from `fast-deep-equal` - This usually entails upgrading the `git`-based dependencies of `fast-deep-equal-git` and
16
16
`npm`-published package of `fast-deep-equal` in `package.json:devDependencies`.
17
-
* Bugs in this library
18
-
* New tests for React
19
-
* Documentation
17
+
- Bugs in this library
18
+
- New tests for React
19
+
- Documentation
20
20
21
21
Pull requests that should be for [fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal):
22
22
23
-
* Equality of non-react comparisons
24
-
* Performance of non-react comparisons
25
-
* Tests for non-react comparisons
23
+
- Equality of non-react comparisons
24
+
- Performance of non-react comparisons
25
+
- Tests for non-react comparisons
26
26
27
27
## Development
28
28
@@ -130,23 +130,52 @@ please flag to your reviewers and have a discussion about whether or not the siz
130
130
131
131
3. Confirm you aren't impacting our bundle size.
132
132
If you _do_ affect the bundle size, please update the bundle badge in the Readme by
133
-
* Following the steps outlined in [size](#size):
133
+
- Following the steps outlined in [size](#size):
134
134
`yarn -s compress && yarn size-min-gz`
135
-
* Grabbing that output and replacing the current size in the bundle_img: (`https://img.shields.io/badge/minzipped%20size-<NEW_SIZE>%20B-flatgreen.svg`)
135
+
- Grabbing that output and replacing the current size in the bundle_img: (`https://img.shields.io/badge/minzipped%20size-<NEW_SIZE>%20B-flatgreen.svg`)
136
136
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`
137
-
*_Org members:_ Update the README's benchmark comparison png using this [internal Google Sheet template](https://docs.google.com/spreadsheets/d/1GuqpO0wgPjQ9usx6sR3t0Y_HTmAdRqjXkSjs3SBsmTc/edit?usp=sharing_eip&ts=5ed1642f).
137
+
-_Org members:_ Update the README's benchmark comparison png using this [internal Google Sheet template](https://docs.google.com/spreadsheets/d/1GuqpO0wgPjQ9usx6sR3t0Y_HTmAdRqjXkSjs3SBsmTc/edit?usp=sharing_eip&ts=5ed1642f).
138
138
139
-
##Releasing a new version to NPM
139
+
### Using changesets
140
140
141
-
_Only for project administrators_
141
+
Our official release path is to use automation to perform the actual publishing of our packages. The steps are to:
142
+
143
+
1. A human developer adds a changeset. Ideally this is as a part of a PR that will have a version impact on a package.
144
+
2. On merge of a PR our automation system opens a "Version Packages" PR.
145
+
3. On merging the "Version Packages" PR, the automation system publishes the packages.
146
+
147
+
Here are more details:
148
+
149
+
### Add a changeset
150
+
151
+
When you would like to add a changeset (which creates a file indicating the type of change), in your branch/PR issue this command:
142
152
143
153
```sh
144
-
# (1) Run tests, lint, build published dir, update package.json
145
-
$ npm version [patch|minor|major|<version>]
154
+
$ yarn changeset
155
+
```
156
+
157
+
to produce an interactive menu. Navigate the packages with arrow keys and hit `<space>` to select 1+ packages. Hit `<return>` when done. Select semver versions for packages and add appropriate messages. From there, you'll be prompted to enter a summary of the change. Some tips for this summary:
158
+
159
+
1. Aim for a single line, 1+ sentences as appropriate.
160
+
2. Include issue links in GH format (e.g. `#123`).
161
+
3. You don't need to reference the current pull request or whatnot, as that will be added later automatically.
146
162
147
-
# (2) If all is well, publish the new version to the npm registry
148
-
$ npm publish
163
+
After this, you'll see a new uncommitted file in `.changesets` like:
149
164
150
-
# (3) Then, update github with the associated tag
151
-
$ git push && git push --tags
165
+
```sh
166
+
$ git status
167
+
# ....
168
+
Untracked files:
169
+
(use "git add <file>..." to include in what will be committed)
170
+
.changeset/flimsy-pandas-marry.md
152
171
```
172
+
173
+
Review the file, make any necessary adjustments, and commit it to source. When we eventually do a package release, the changeset notes and version will be incorporated!
174
+
175
+
### Creating versions
176
+
177
+
On a merge of a feature PR, the changesets GitHub action will open a new PR titled `"Version Packages"`. This PR is automatically kept up to date with additional PRs with changesets. So, if you're not ready to publish yet, just keep merging feature PRs and then merge the version packages PR later.
178
+
179
+
### Publishing packages
180
+
181
+
On the merge of a version packages PR, the changesets GitHub action will publish the packages to npm.
0 commit comments