This repository follows a monorepo structure, for which we use lerna to manage versions of changed packages, as well as the release and publishing process.
To learn more about what commands are available for lerna, how it works and how it can be configured, please check out lerna's repository.
It's relevant to note, though, that the main workflow using lerna has already been setup as npm-scripts, which means that you should not need to use lerna commands while contributing.
In order to test all packages, you simply need to run the following command:
$ npm run test
To release and publish the packages in which changes have been made, run:
$ npm run release
❗️ IMPORTANT : do not try to release a single package from that package's root directory. Lerna takes care of figuring out which packages have suffered changes and only releases and publishes the updated packages. Please use the release scripts provided in the repository's root package.json
.
We are using lerna in fixed version mode, which means that when multiple packages are changed between releases, they will all be updated to the same version. We also use conventional-commits, which means the subject of the commit messages will decide the version bump that will occur.