-
-
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
[Bug?]: yarn workspace version apply
removes deferred versions for other packages
#4926
Comments
Ah, I was digging through the source code to see how this could be fixed and it looks like it's been addressed by #4336. Edit: I built a patched version of the @yarnpkg/plugin-version plugin that cherry picks 5ae7b8a. I tested this out in my reproduction repository and it seems to work fine. |
Would be great if the fix that was already merged in the version plugin could be released in yarn v3 - I see that the change is included in v4 rc tags. |
I read in this discussion that v4 is now quite stable #4895 Maybe you can try upgrading to v4 using the |
Fair enough! I think for the moment I'm content using v3 with the patched version plugin that I built, but I'll consider using v4 for my project if I run into any other v4 features that I wish I had. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Is there a way to even have Sherlock run on yarn v3? |
We couldn't reproduce your issue (all the assertions passed on master). |
Self-service
Describe the bug
I have a workspace that has two packages which do not share a release cycle.
I'm using deferred versioning on the packages with
yarn workspace <workspaceName> version <strategy> --deferred
, which creates.yarn/versions/<hash>.yml
files defining the strategy just for my target workspace, as I would expect.When I run
yarn workspace <workspaceName> version apply
, thepackage.json
file for the specified workspace is updated. As expected, thepackage.json
for the other workspaces has not changed. However, the.yarn/versions
files have removed the other deferred changes.To reproduce
Here's a sherlock script with the reproduction case:
Environment
System: OS: macOS 12.5.1 CPU: (10) arm64 Apple M1 Pro Binaries: Node: 16.15.1 - /private/var/folders/kc/rkdxxgzx4q1b4cq6mpm343100000gn/T/xfs-80d59fb3/node Yarn: 3.2.3 - /private/var/folders/kc/rkdxxgzx4q1b4cq6mpm343100000gn/T/xfs-80d59fb3/yarn npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
The text was updated successfully, but these errors were encountered: