|
| 1 | +# Contributing to React Native Async Storage |
| 2 | + |
| 3 | +Thank you for helping out with Async Storage! |
| 4 | +We'd like to make contributions as pleasent as possible, so here's a small guide of how we see it. Happy to hear your feedback about anything, so please let us know. |
| 5 | + |
| 6 | + |
| 7 | +## Tests |
| 8 | +We use `flow` for type check, `eslint` with `prettier` for linting/formatting, `jest/detox` for tests (unit and e2e). All tests are run on CircleCI for all opened pull requests, but you should use them locally when making changes. |
| 9 | + |
| 10 | +* `yarn test`: Run all tests, except for e2e (see note below). |
| 11 | +* `yarn test:lint`: Run `eslint` check. |
| 12 | +* `yarn test:flow`: Run `flow` type check. |
| 13 | +* `yarn test:e2e:<ios|android>`: Runs e2e tests. Before you can run it, you should build the app that can be run, by using `yarn build:e2e:<ios|android>`. |
| 14 | + |
| 15 | + |
| 16 | +## Sending a pull request |
| 17 | +When you're sending a pull request: |
| 18 | + |
| 19 | +* Communication is a key. If you want fix/add something, please open new/find existing issue, so we can discuss it. |
| 20 | +* We prefer small pull requests focused on one change, as those are easier to test/check. |
| 21 | +* Please make sure that all tests are passing on your local machine. |
| 22 | +* Follow the template when opening a PR. |
| 23 | + |
| 24 | + |
| 25 | +## Commits and versioning |
| 26 | +All PRs are squashed into `master` and wrapped up in a single commit, following [conventional commit message](https://www.conventionalcommits.org/en/v1.0.0-beta.3). Combined with [semantic versioning](https://semver.org/), this allows us to have a frequent releases of the library. |
| 27 | + |
| 28 | +*Note*: We don't force this convention on Pull Requests from contributors, but it's a clean way to see what type of changes are made, so feel free to follow it. |
| 29 | + |
| 30 | + |
| 31 | +Most notably prefixes you'll see: |
| 32 | + |
| 33 | +* **fix**: Bug fixes, triggers *patch* release |
| 34 | +* **feat**: New feature implemented, triggers *minor* |
| 35 | +* **chore**: Changes that are not affecting end user (CI config changes, scripts, ["grunt work"](https://stackoverflow.com/a/26944812/3510245)) |
| 36 | +* **docs**: Documentation changes. |
| 37 | +* **perf**: A code change that improves performance. |
| 38 | +* **refactor**: A code change that neither fixes a bug nor adds a feature. |
| 39 | +* **test**: Adding missing tests or correcting existing tests. |
| 40 | + |
| 41 | + |
| 42 | +## Release process |
| 43 | +We use [Semantic Release](http://semantic-release.org) to automatically release new versions of the library when changes are merged into master. Using the commit message convention described above, it will detect if we need to release a patch, minor, or major version of the library. |
| 44 | + |
| 45 | + |
| 46 | +## Reporting issues |
| 47 | +You can report issues on our [bug tracker](https://github.com/react-native-community/react-native-async-storage/issues). Please search for existing issues and follow the issue template when opening an one. |
| 48 | + |
| 49 | + |
| 50 | +## License |
| 51 | +By contributing to React Native Async Storage, you agree that your contributions will be licensed under the **MIT** license. |
0 commit comments