Skip to content

Commit

Permalink
fix(core): use root version for yarn lock file pruning (#12964)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Nov 3, 2022
1 parent e6ff5bc commit a146745
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/nx/src/utils/lock-file/yarn.ts
Expand Up @@ -198,8 +198,9 @@ function pruneDependencies(

packages.forEach((packageName) => {
if (dependencies[packageName]) {
// take the first version of the package as the default
const [key, value] = Object.entries(dependencies[packageName])[0];
const [key, value] = Object.entries(dependencies[packageName]).find(
([, v]) => v.rootVersion
);

result[packageName] = result[packageName] || {};
result[packageName][key] = value;
Expand Down

1 comment on commit a146745

@vercel
Copy link

@vercel vercel bot commented on a146745 Nov 3, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.