From efb4a127cea702c0e9f4540cb4c16da7d256ab35 Mon Sep 17 00:00:00 2001 From: noys Date: Thu, 23 Nov 2023 14:04:00 +0200 Subject: [PATCH] :bug: virtual Yarn workspace-aggregator created in Yarn monorepo feature removed from impact graph --- src/main/java/com/jfrog/ide/common/yarn/YarnTreeBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jfrog/ide/common/yarn/YarnTreeBuilder.java b/src/main/java/com/jfrog/ide/common/yarn/YarnTreeBuilder.java index b6cd950..7da4118 100644 --- a/src/main/java/com/jfrog/ide/common/yarn/YarnTreeBuilder.java +++ b/src/main/java/com/jfrog/ide/common/yarn/YarnTreeBuilder.java @@ -92,8 +92,10 @@ private void addDepTreeNodes(Map nodes, JsonNode jsonDep, D private boolean isDirectDependency(String rawDependency) { rawDependency = StringUtils.lowerCase(rawDependency); // The word specified can be in upper or lower case - return StringUtils.contains(rawDependency, "specified in"); + // If rawDependency contains "specified in" or "workspace-aggregator-" it is a direct dependency + return StringUtils.contains(rawDependency, "specified in") || StringUtils.contains(rawDependency, "workspace-aggregator-"); } + /** * Extracts a single dependency path from a raw dependency Json string returned from 'Yarn why' command. *