From e251e1431165521d8992c2865b54a3db4ff84410 Mon Sep 17 00:00:00 2001 From: Miroslav Jonas Date: Wed, 19 Apr 2023 10:20:37 +0200 Subject: [PATCH] fix(core): do not expect each package to have hoisted version in lockfile --- packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts b/packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts index 97c957b4a15786..4609cdfbcb2098 100644 --- a/packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts +++ b/packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts @@ -85,6 +85,7 @@ function findNodeMatchingVersion( return nodes.sort((a, b) => +gte(b.data.version, a.data.version))[0]; } if ( + graph.externalNodes[`npm:${packageName}`] && satisfies( graph.externalNodes[`npm:${packageName}`].data.version, versionExpr