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. *