This is the common top level contribution guide for this mono-repo. A sub-package may have an additional CONTRIBUTING.md file if needed.
All contributors must sign the CLA
This is managed automatically via https://cla-assistant.io/ pull request voter.
- Yarn >= 1.4.2
- Yarn rather than npm is needed as this mono-repo uses yarn workspaces.
- A maintained version of node.js
- This package is targeted and tested on modern/supported versions of node.js only. Which means 8/10/12/13 at the time of writing this document.
- commitizen for managing commit messages.
The initial setup is trivial:
- clone this repo
yarn
Use git cz
to build conventional commit messages.
- requires commitizen to be installed.
Prettier is used to ensure consistent code formatting in this repository. This is normally transparent as it automatically activated in a pre-commit hook using lint-staged. However this does mean that dev flows that do not use a full dev env (e.g editing directly on github) may result in voter failures due to formatting errors.
Mocha is used for unit-testing and Istanbul/Nyc for coverage reports. Jest was avoided due to increased total tests execution time due to running the tests in multiple processes, as the Parser initialization (which happens once per process) can take 10-20ms.
- To run the tests run
yarn test
in either the top level package or a specific subpackage. - To run the tests with a coverage report run
yarn coverage:run
in either the top level package or a specific subpackage.
This project does not use any compilation step (Babel/TypeScript), this means that the full build does not generate any artifacts for runtime.
- To run the full Continuous Integration build run
yarn ci
in in either the top level package or a specific subpackage.
This monorepo uses Lerna's independent mode support a separate life-cycle (version number) for each package and automatically generate the changelog by adhering to Conventional Commits
Performing a release requires push permissions to the repository.
- Ensure you are on
master
branch and synced with origin. yarn run lerna:version
- Follow the lerna CLI instructions.
- Track the
RELEASE
tag build on circle-ci. - Once the tag build has finished successfully inspect the npm registry to see the new versions
for all the changed packages of this mono-repo.
npm view [package-name] version