-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] version plugin: add --all flag to version command #1229
Comments
For what it's worth I have already implemented this to fit my own needs in my fork: fggrimshaw@143ed68 |
This would be a handy addition. As an improvement on the concept, I wonder if it would be useful to also be able to declare in a versions file that packages are kept in sync with the root's version. This would make the versioning scheme explicit and less temporary than using just a flag. In many use cases, I would guess, one wants to keep updating workspaces in a monorepo in a single manner also in the future, and not just temporarily. For temporal use cases, like bumping major version, the flag would be great. I'd expect that if fixed versioning would be set in versions file, when root's version would be updated, it would resonate to other workspaces as well. There could also be use for either a whitelist or blacklist in versions file, for keeping only some of the packages in sync with root version. Another, a bit different use case, would be one where you want to keep multiple different version schemes inside a same monorepo. Say, you have a frontend and backend workspaces, multiple workspaces in both groups, that need to have internally the same versions inside their respective groups, but they don't need to follow the other group's version externally. So there would be a need to group workspaces by a shared version scheme, and be able to set simultaneously version for every workspace in a group. |
This is precisely the use case I'm currently investigating as I'm looking for a way to move off of Lerna as we only use it for fixed version releases. For context, I'm working on https://github.com/siteimprove/alfa which is marketed as a single product with a single version, but structured as a workspace with 80+ packages. Our release workflow is kicked off by doing The way I imagine it, I'd be able to do |
We went ahead with the upgrade to Berry and found that Lerna didn't want to play along when we tried cutting our first release post-upgrade today. As a replacement of
Previously, Kudos to the entire Yarn team! ❤️ |
Describe the user story
My team would like to add versioning to a CI system, and we need a way to set a versioning strategy on all modified workspaces.
Describe the solution you'd like
The
version
command should have an--all
flag which allows for setting a versioning strategy for all modified workspaces, including workspaces which depend on a modified workspace.Describe the drawbacks of your solution
--all
and--immediate
used together could be riskyDescribe alternatives you've considered
The best alternative is to add some scripting which uses the version plugin. Berry's core methods can already handle the heavy lifting of detecting modified workspaces and workspace dependency so it seems silly to not use this.
Additional context
N/A
The text was updated successfully, but these errors were encountered: