From 390d64acf83ed403c098118df0bdfafc1f861799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Thu, 20 Apr 2023 09:16:45 +0200 Subject: [PATCH] fix(core): do not expect each package to have hoisted version in lockfile (#16393) (cherry picked from commit a51ac58a456607943469b286909afc4411e8b3a0) --- 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