-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support yarn 3 lockfile entries #643
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/vercel/turbo-site/3kvjVXhqufuDDJLWGQnipykbyKL4 |
Ah, you're right. It looks like my "soft" links (the monorepo packages) are missing from the pruned lockfile. Perhaps something to do with version parsing? Example: "@***/admin@workspace:apps/admin":
version: 0.0.0-use.local
resolution: "@***/admin@workspace:apps/admin"
dependencies:
... |
Probably, when I implemented Yarn 3 I didn't realize how much there was, I probably missed a bunch of stuff. |
@jaredpalmer I haven't had a chance to go back and look at this again since I left it, but IIRC the local workspaces weren't listed in |
I'm not entirely sure if that's the case, I was just running |
We'd need to go through and fix --immutable line by line |
This change, as is, makes my EDIT 2: I have a WIP here quinnturner#2 EDIT: I do think there are some places for improvement that get us closer to This is more correct than what is currently there: type LockfileEntry struct {
// resolved version for the particular entry based on the provided semver revision
Version string `yaml:"version"`
Resolved string `yaml:"resolved,omitempty"`
Integrity string `yaml:"integrity,omitempty"`
Resolution string `yaml:"resolution,omitempty"`
// the list of unresolved modules and revisions (e.g. type-detect : ^4.0.0)
Dependencies map[string]string `yaml:"dependencies,omitempty"`
PeerDependencies map[string]string `yaml:"peerDependencies,omitempty"`
PeerDependenciesMeta map[string]map[string]bool `yaml:"peerDependenciesMeta,omitempty"`
// the list of unresolved modules and revisions (e.g. type-detect : ^4.0.0)
Bin map[string]string `yaml:"bin,omitempty"`
OptionalDependencies map[string]string `yaml:"optionalDependencies,omitempty"`
Checksum string `yaml:"checksum,omitempty"`
Conditions string `yaml:"conditions,omitempty"`
LanguageName string `yaml:"languageName,omitempty"`
LinkType string `yaml:"linkType,omitempty"`
} I went ahead and published Here are the blockers that I identified for
|
Hi all, with #1789 we should be able to better support different types of lockfiles. Once that merges, I'll begin looking at updating this PR to use the new abstraction. |
@chris-olszewski That's great! I haven't had much time to dedicate to this, but I'm looking forward to checking out the new abstraction. |
Similarly, I haven't been able to dedicate as much time to my WIP PR. However, I have implemented a few changes in my draft quinnturner#2 that are required for full support. My checklist above is in an accurate state. Things that are solved:
Things there are not solved:
|
This would be really great to have this! The yarnpkg/yarn#5428 Just for context, my situation is:
I know all this is not perfectly relevant for this PR but if it can add some more motivation to see an additional use case and several issues linked to it, well, why not 😛. |
FYI: |
Yeah |
@theJoeBiz we suspect that this has been superseded by #2019, with support released in 1.5. Thank you for the early pass which helped us understand the shape of the problem! |
The yarn berry support is looking good, but I can't truly use
turbo prune
with yarn 3 because thechecksum
,resolution
andlinkType
properties aren't being carried over. I updated theLockfileEntry
struct locally and tested it out - here is the side-by-side comparison of rootyarn.lock
andout/yarn.lock
:Btw, not sure how important the
__metadata
key is in the lockfile, but I think it'd be ideal if that was copied directly