For support or usage questions like "How do I do X with bpost." and "My code doesn't work.", please search and ask on StackOverflow with a 'bpost' tag first.
Before filing an issue please search the issue tracker; your issue may have already been discussed or fixed in master
.
Fill in the template provided by the issue tracker, try to be as clear and complete as possible, providing a Short, Self Contained, Correct (Compilable), Example (SSCE) (link to a repository) helps a lot.
Feature or enhancement requests should be submitted in the issue tracker, with a description (follow the template) of the expected behavior & use case, where they’ll remain until approval by the lead maintainer(s) and/or enough interest from the community.
You can request a feature by writing a pull request, but this is no guarantee it will be merged.
In general, the contribution workflow looks like this:
- Fork the repo.
- Clone the repo.
git clone https://github.com/your-username/bpost.git
. - Create a new branch based off the master branch, provide a descriptive name
(ex. 'ft-add-better-logging', 'fix-removed-double-method') - Before running the code you’ll need to install the dependencies (
npm install
oryarn
). - Implement your feature / bugfix (using the watch scripts), you should only need to modify
/src
. Don’t worry about regenerating the build folders (/cjs
,/es
,/dist
), they are built in the prepublish phase. - Make sure all tests pass, coverage is 70+% for your new addition and there are no linting errors.
- Submit a PR, referencing what it addresses.
- Please try to keep your PR focused in scope and try squashing them before sending a PR. Lots of commits will be squashed, use Gitmoji in your commits.
After you have submitted your PR, we'll try to get back to you as soon as possible.
Every PR needs to be approved by a repo administrator.
You can run the watch scripts
npm run build:watch
and
npm run test:watch
to make development easier.
Please follow the conventions already established in the code.
Guidelines are enforced using ESLint.
You can run the linting script by using
$ npm run lint
Include updated (or add new) tests in the __tests__
directory as part of your PR.
In the unlikely event that you need to test a new network request please mock your code in the __mocks__
folder.
You can run the test script by using
$ npm test
or if your test requires changes to existing snapshots:
$ npm run test:update
Try getting 70%+ coverage on newly introduced code.
We added pre-commit and pre-push hooks to make sure you don't commit non-working code.