Skip to content

Changesets

Quentin Jaccarino edited this page Jan 27, 2023 · 10 revisions

As a way of making the versioning of our libraries and apps easier in the context of a mono repository we use changesets for managing releases.

Changesets is a tool that enables an automatic tracking of versions, is able to handle multiple packages in a mono repository architecture, publish them and also supports pre-releases pretty well.

Here is how it works.

Changeset

You can refer to the CONTRIBUTING.md guidelines for more detailed explanations on how to work with the mono repo. This document will focus on the changesets part.

Definition

Changesets are designed to make your workflows easier, by allowing the person making contributions to make key decisions when they are making their contribution.

Changesets hold two key bits of information: a version type (following semver), and change information to be added to a changelog.

In order to have your PR merged you will need to attach one or more changeset to your contribution (99% of the time).

How to

To ship a changeset with a PR, it’s quite easy, you just need to run:

pnpm changelog

This will display a list of all known packages in the mono repository:

1

From there you will be able to select all packages affected by the code change.

Once you are done choosing which packages have been affected, you can choose the type of bump you want for each selected package.

Note: the Ledger Live packages follow the semver convention.

2

On the last step, you will need to enter a summary for our change. If possible add the context to this message (eg: github issue number) as well as an explicit description of what the changes bring.

For Ledger Employees: please add the Jira ticket number in the changeset if relevant.

This will allow us to have a better understanding of what has been done and what has been merged in our code base.

Note: When a PR does not contain any changeset, a custom github action will comment on the PR to ensure that this is not an oversight.

CleanShot 2022-04-28 at 16 30 54@2x

Changesets are actually markdown files that are created in the .changeset/ folder.

After merge

Let us assume that a PR has been created and a changelog has been added to it. If it passes CI and has been reviewed by devs + QA (again, refer to CONTRIBUTING.MD) then it should be ready to merge.

Changesets will keep getting accumulated in the develop branch until the release day, at which point they will be consumed and CHANGELOG.md files will get populated.

Clone this wiki locally