Skip to content
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

fix(core): fix invalid yarn parser dependencies grouping key #15647

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

meeroslav
Copy link
Contributor

@meeroslav meeroslav commented Mar 13, 2023

The yarn parser uses an invalid key for grouping dependencies causing different snapshots to be grouped together.

Reported by @yharaskrik on Slack: https://nrwlcommunity.slack.com/archives/CMFKWPU6Q/p1677717333068159

Current Behavior

Expected Behavior

Related Issue(s)

Related to #15364
Fixes #15603


@meeroslav meeroslav added the scope: core core nx functionality label Mar 13, 2023
@meeroslav meeroslav self-assigned this Mar 13, 2023
@vercel
Copy link

vercel bot commented Mar 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 13, 2023 at 8:53PM (UTC)

@yharaskrik
Copy link
Contributor

Closes: #15603

@@ -227,7 +227,7 @@ function groupDependencies(
const resolutionMap = new Map<string, YarnDependency>();
const snapshotMap = new Map<YarnDependency, Set<string>>();
Object.entries(dependencies).forEach(([key, snapshot]) => {
const resolutionKey = `${snapshot.resolution}${snapshot.integrity}`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a typo - grouping is only created for Yarn Classic, which has resolved, not for Yarn Berry which has a resolution field

@FrozenPandaz FrozenPandaz merged commit 3f4ba6d into nrwl:master Mar 14, 2023
FrozenPandaz pushed a commit that referenced this pull request Mar 15, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2023
@meeroslav meeroslav deleted the fix-yarn-deps-grouping branch April 27, 2023 10:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: core core nx functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

findOriginalKeys is not a function or its return value is not iterable
3 participants