Monorepo Changesets
This is an example of a possible structure and tooling for a Mailchimp Open Commerce Monorepo.
Development workflow
- Create a feature branch.
- Add a changeset (if the changes should result in a new version):
npx run changeset
- Update the new file created in the previous step on
.changeset/[file-name].md
you need to put more detail. - Commit and push changes to the branch.
- Create a pull request.
- Merge the pull request into the main (default) branch.
- Repeat the above previous steps when making new changes.
Release workflow
- When ready for a release, go to the
Action
tab on github repo and run theRelease
workflow . - If the pull request contained a changeset, the changesets action will create a
Version Packages
pull request - Continue merging changes into the main (default) branch
- Merge the "Version Packages" pull request to trigger a release
Compare with nx + semantic-release
Advantage:
- The changeset descriptions are editable after creation, and a user can go in and change this as they desire.
- Unopinionated about your git workflows, with squashing and modifying commits being completely safe, without fear of breaking a release.
Disadvantage:
- Manual adding changeset.
- The contributors need to learn a new workflow.