We welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github. We are very happy to merge your code in the official repository. Make sure to sign our Contributor License Agreement (CLA) first. See our license file for more details.
$ yarn install
$ yarn test
We use ESLint for linting and Prettier for code formatting. We enforce formatting with pre-commit hook, linting with CI. If your IDE has integration with these tools, it's recommended to set them up.
Since we're autogenerating our CHANGELOG and version bump, we need to follow a specific commit message convention on the main
branch.
The recommended approach is to use "Squash and merge" and make sure the PR title follows the conventional commits format. Here's how a usual PR title looks like for a new feature: feat: allow provided config object to extend other configs
. A bugfix: fix: prevent racing of requests
. We have a CI action to make sure the PR title follows the necessary format.
If you don't want to squash your commits, make sure that your commits follow the above format.
Checkout the protocol or chat reporisitories and run one of the following commands:
# if you have protocol repo:
$ yarn generate:open-api
# if you have chat repo
$ yarn generate:open-api:dev
Releasing this package involves two GitHub Action steps:
- Whenever a new feature/fix is pushed to
main
a release PR is created (example PR). That PR will be automatically updated on pushes tomain
. - When you're ready to release, merge the release PR
Once the PR is merged, it automatically kicks off another job which will release the pacakge to npm.