Auto bump linked dependencies of monorepo
Greeting. Thanks for this amazing tool.
I used release-it on my mono repo project as an example below:
.
├── ...
├── packages
│ ├── package-a
│ ├── package-b
And package-b uses package-a internally.
Currently. When using release-it to the new version with @release-it-plugins/workspaces. All the packages will share the same version.
My question is: Is there any way these packages have a different version? Only bump when have any changes to it. In the example above, this is how it works:
package-a on 0.2.0
package-b on 0.2.3
I made some changes to package-a, so will be bumped to 0.2.1, and package-b will automatically be bumped to 0.2.4. (like changesets)
Thanks for your help.
Sounds like an issue for the https://github.com/release-it-plugins/workspaces repo, right? It's a separate project not maintained by me :)
Yes. It is definitely an issue of release-it-plugins/workspaces. But following the monorepo recipe (not using release-it-plugins/workspaces anymore). Is there any way to archive that release behavior? @webpro
Yes, it's the default behavior when you use that recipe, it just runs the release-it process for each workspace separately
Yes, it's the default behavior when you use that recipe, it just runs the release-it process for each workspace separately
Hmm. I see the docs write "If all workspaces should be bumped to the same version and are published at the same time, then follow the two steps in this guide.". That means the behavior is not like I mentioned before. Am I missing something?
It depends. The release-it process runs for each package separately, so you can version them independently. Indeed the main thing for you here, "auto bump linked dependencies" would need to be resolved differently. So it's not something you can just copy as-is indeed.
Perhaps you could defer the npm publish step to Changesets? I think it does this?
Closing due to inactivity