What are Changesets and How Do They Manage Versioning?
What are changesets and how to use them
Get the project source code below, and follow along with the lesson material.
Download Project Source CodeTo set up the project on your local machine, please follow the directions provided in the README.md
file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.
This lesson preview is part of the Build a Complete Company Design System course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.
Get unlimited access to Build a Complete Company Design System, plus 70+ \newline books, guides and courses with the \newline Pro subscription.
[00:00 - 00:06] So almost everything is in place and we are ready to publish our design system. How would we do this?
[00:07 - 00:25] I like to work with a tool called TaintSet, which is a really nice tool that helps us with basing the version of our packageization when we are ready to publish, and with TaintLogs. So how would it work?
[00:26 - 00:32] Let's find out really quick. First of all, let's install this.
[00:33 - 00:44] And to install this, we would execute this one, and we will install this in the root directory, because this is a script that we will use for all the packages. And we are ready.
[00:45 - 01:01] And then to initialize it, yarn, TaintSet, and then init from initialize. And you will see that we have some new files, the TaintSet folder, the configuration, readme file.
[01:02 - 01:16] And basically, those are the new files that were created from TaintSet. And for it to work properly, we need to go to every single package.json and create our first version.
[01:17 - 01:31] So we went to react and we will go to the foundation. We can also go to Storybook if we wish, but remember that Storybook is a private package, meaning that we will not publish this.
[01:32 - 01:40] And now let's create our first TaintSet. To do this, we go here, yarn, TaintSet, and add.
[01:41 - 01:49] And now the CLI asks us which packages we want to include in this TaintSet. And in our case, we want the foundation and the react package.
[01:50 - 01:54] Then do we want to release a major version? No, a minor.
[01:55 - 02:03] No, we want the parts for both of them. And let's say this is our very first release.
[02:04 - 02:10] And this is it. That's how easy it is to work.
[02:11 - 02:21] And now if we go back, we can see that we have a new markdown file. And this is actually a TaintSet, which holds some information.
[02:22 - 02:33] For example, here it holds the information of the packages that changed. And what was the Taint, if it was a part, a minor release for us.
[02:34 - 02:48] And then our message. And now how we are publishing, there is a TaintSet.com mod called version, which basically takes all of our markdown files.
[02:49 - 03:02] Now you can see that our markdown file is deleted. So it takes the markdown files and it tries to understand what would be the version changed for each of the packages.
[03:03 - 03:12] So you can see here we have the version we modified from version 0.0.0. It bumped to 0.0.1.
[03:13 - 03:26] And with the TaintLook included, the same for React Packets with the TaintLook included. And here we can see that it's pumped, but we don't care about storebook at all.
[03:27 - 03:37] And basically that's how it works. And those TaintLook files, if you push them to your Git, they will look something like this.
[03:38 - 03:54] This is the TaintLook file for the TaintSet repository and for the CLI packets, which is a really nice way and a really nice tool to help us and manage and delegate. Every complexity of publishing and versioning and TaintLook for our packages.
[03:55 - 04:08] And in the next lesson we will see how we can publish and test our packages with GitHub actions as our CI/CD.