-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fixes unwanted yarn.lock optimization issue #3490 #3729
Conversation
Why not make |
I thought about this, but:
This PR also ships with a fix (the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Please use a more descriptive commit title before merging. |
We need tests for this, @arcanis. |
Ideas for tests:
|
@bestander I'm not completely sure regarding #3673 - I think it should work, but I'll have to test it manually later. Once this patch is ok'd I'll publish the 0.27.1 - David is needing the link: feature, so I'd like not to block him too long. After that, I'll make some tests with adding back the async behavior :) |
Working on the tests, btw 👍 |
…ockfile if possible, fixes yarnpkg#3490
Should be ok 👍 |
199bd5c
to
83cfafa
Compare
Summary
This PR aims to prevent the lockfile from being optimized when reading it. If a package isn't "fresh" (ie if it's present in the lockfile), we resolve it to the exact version registered in the lockfile.
Test plan
I haven't been able to come up with a minimal testcase that could be used with the integration tests :/ I used the following repository to test my changes, but it brings a lot of dependencies and some of them don't seem to work in the tests (got this apparently unrelated error:
error "neutrino#optional" is wrong version: expected "0.1.3", got "v0.1.3"
).The last line should print nothing, but before this patch it was optimizing the diff.