Automate all the things
This is an attempt to automate the changelog, versioning and publishing of packages from the monorepo.
I added a few things:
yarn workspaces to make working with the monorepo easier. Now we only need to run yarn in the parent folder and it will install everything for all packages
lerna to automatically generate changelog files. lerna uses https://www.conventionalcommits.org/en/v1.0.0/ to get the relevant changes. So from now on we should write commit messages accordingly
lerna to to automatically version all packages. It will generate dev prerelease versions when code is pushed to or merged into the develop branch and latest tags when code is pushed to or merged into main
lerna to publish packages to NPM automatically. It will publish every package version that is not yet published to the registry.
If we want to stay below a 1.0 version for now, we should avoid the BREAKING CHANGE term in commit messages.
It is configured the way that it will update versions for all packages at the same time. So when there is a feat: change in e.g. the cli package, it will update the minor version for all packages.
We could also have it version the packages individually by adding the following setting to the lerna.json config:
Automate all the things This is an attempt to automate the changelog, versioning and publishing of packages from the monorepo.
I added a few things:
yarn workspaces
to make working with the monorepo easier. Now we only need to runyarn
in the parent folder and it will install everything for all packageslerna
to automatically generate changelog files.lerna
uses https://www.conventionalcommits.org/en/v1.0.0/ to get the relevant changes. So from now on we should write commit messages accordinglylerna
to to automatically version all packages. It will generatedev
prerelease versions when code is pushed to or merged into thedevelop
branch andlatest
tags when code is pushed to or merged intomain
lerna
to publish packages to NPM automatically. It will publish every package version that is not yet published to the registry.If we want to stay below a 1.0 version for now, we should avoid the
BREAKING CHANGE
term in commit messages. It is configured the way that it will update versions for all packages at the same time. So when there is afeat:
change in e.g. thecli
package, it will update theminor
version for all packages. We could also have it version the packages individually by adding the following setting to thelerna.json
config: