1 | # Contribute
|
2 |
|
3 | 👋 Thanks for thinking about contributing to nock! We, the maintainers, are glad you're here and will be excited to help you get started if you have any questions. For now, here are some basic instructions for how we manage this project.
|
4 |
|
5 | Please note that this project is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
6 |
|
7 | **Table of Contents**
|
8 |
|
9 |
|
10 |
|
11 | - [Commit Message conventions](#commit-message-conventions)
|
12 | - [Generate README TOC](#generate-readme-toc)
|
13 | - [Running tests](#running-tests)
|
14 | * [Airplane mode](#airplane-mode)
|
15 |
|
16 |
|
17 |
|
18 | ### Commit Message conventions
|
19 |
|
20 | `nock` releases are automated using [semantic-release](https://github.com/semantic-release/semantic-release).
|
21 | To automatically calculate the correct version number as well as changelogs,
|
22 | three commit message conventions need to be followed
|
23 |
|
24 | - Commit bug fixes with `fix: ...` or `fix(scope): ...` prefix in commit subject
|
25 | - Commit new features with `feat: ...` or `feat(scope): ...` prefix in commit subject
|
26 | - Commit breaking changes by adding `BREAKING CHANGE: ` in the commit body
|
27 | (not the subject line)
|
28 |
|
29 | Other helpful conventions are
|
30 |
|
31 | - Commit test files with `test: ...` or `test(scope): ...` prefix
|
32 | - Commit changes to `package.json`, `.gitignore` and other meta files with
|
33 | `chore(filename-without-ext): ...`
|
34 | - Commit changes to README files or comments with `docs: ...`
|
35 | - Code style changes with `style: standard`
|
36 |
|
37 | The commit message(s) of a pull request can be fixed using the `squash & merge` button.
|
38 |
|
39 | ### Generate README TOC
|
40 |
|
41 | Make sure to update the README's table of contents whenever you update the README using the following npm script.
|
42 |
|
43 | ```
|
44 | $ npm run toc
|
45 | ```
|
46 |
|
47 | ### Running tests
|
48 |
|
49 | ```
|
50 | $ npm test
|
51 | ```
|
52 |
|
53 | #### Airplane mode
|
54 |
|
55 | Some of the tests depend on online connectivity. To skip them, set the `AIRPLANE` environment variable to some value.
|
56 |
|
57 | ```
|
58 | $ export AIRPLANE=true
|
59 | $ npm test
|
60 | ``` |
\ | No newline at end of file |