
Posted in Software & Development
September 13, 2023
Tech Update: Changesets
At Acro, we are constantly updating our processes, techniques and the technology we use to make our development accelerator, Gesso, better. Dive in as Shawn and Calvin, our Gesso experts, bring us up to speed on what our team is up to.
Welcome back to another edition of #gessohype!
This month, we are bringing you another tool used in Gesso to get you pumped up about some of the best and brightest software we have access to!
A tool to manage versioning and changelogs with a focus on multi-package repositories
What are Changesets?
When using a monorepo, you can’t simply have commits trigger your releases, as you will need to specify which packages need new releases, and which ones don’t and handle internal dependencies.
Changesets are specifically set up for that job. You just run pnpm changeset, and it will prompt you to answer which packages have changed, helpfully highlighting ones with files that have changed in your branch. You then select the level of version change (Major, Minor, Fix) and create a change log message.
Changesets will create the message and details in a randomly named file under the .changeset folder. This file will hang out until you decide to publish a new version, at which point all changesets will be scanned, versions updated and then the changeset files removed.
It comes with a nice built-in GitLab bot that makes automatic merge requests (MRs) for these version changes, as well as notifying you if you might be missing a changeset.
You can also give the bot a name. Thanks to Mike Dupree, ours is annoyingly called Robo McCabe.
|
|
Robo McCabe in action on a pull request
While initially, this seemed less convenient than just using commit messages, it barely takes any more time and gives us a lot more control, both over when and how our versions change and when we publish new packages. As an added bonus, it connects to GitLab's Releases section and will list all your releases there.
Conclusion
Special thanks to Mike Dupree, who set this all up; love you, man.
Ready to talk about the future of web development?
Want to know more about the world-class development tools we use at Acro Commerce?
Fill in the form below, and one of our subject matter experts will reach out.