Version Management
Charm uses Changesets to assist with versioning and change management. Engineers will use Changesets to generate a changeset with each PR. At release time, Changesets will generate a changelog from all changesets since the last release.
- Complete your work on a branch.
- Stage and commit your changes.
- Run
pnpm changeset. Changesets will prompt you to select which packages have changed. - For each package that contains changes, follow the prompts to generate an appropriate changeset:
- Change type - select the correct Semantic Versioning change type:
Patch- backwards-compatible bug fixesMinor- backwards-compatible added functionalityMajor- incompatible API (aka “breaking”) changes
- Describe changes
- Craft a human-readable message following our guidance in Describing changes.
- Change type - select the correct Semantic Versioning change type:
- Changesets will create a markdown file in
.changeset/with a randomly generated name. - Review and edit the changeset file if needed to improve the description.
- Stage and commit the changeset file.
- Create your PR, which now includes a changeset file.
Describing changes
Section titled “Describing changes”Writing a good changelog is essential to keeping our users informed and up-to-date with the latest changes in our packages.
A well-crafted changelog can make a big difference in user experience, so it’s important to get it right. Here are some tips on how to write a good changelog comment:
- A change should be brief and to the point, no more than one line long.
- If changes were made to a component, prefix your change comment with
[ComponentName]. - Use consistent phrasing:
Addedfor new features.Changedfor changes in existing functionality.Deprecatedfor soon-to-be removed features.Removedfor now removed features.Fixedfor any bug fixes.Bumped <package> from x.x.x to x.x.xfor dependency updates.
Remember: changelogs are for humans, not machines.
For more detail, see How do I make a good changelog? and Why keep a changelog?
Examples
Section titled “Examples”- [Dialog] Fixed open animation not show up when dialog is in shadowroot
- [Dialog, Push Pane] Added
hide-close-buttonattribute - Bumped
@charm/themingfrom0.0.1-alpha.1to0.0.1-alpha.2