Skip to content

Commit

Permalink
🔊 improved logging structure with more info pops to the user in case …
Browse files Browse the repository at this point in the history
…of not-complete dependency tree
  • Loading branch information
noyshabtay committed Nov 23, 2023
1 parent a51787c commit b1bd662
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/jfrog/ide/idea/scan/YarnScanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public class YarnScanner extends SingleDescriptorScanner {
YarnScanner(Project project, String basePath, ExecutorService executor, ScanLogic scanLogic) {
super(project, basePath, ComponentPrefix.NPM, executor, Paths.get(basePath, "package.json").toString(), scanLogic);
getLog().info("Found yarn project: " + getProjectPath());
yarnTreeBuilder = new YarnTreeBuilder(Paths.get(basePath), descriptorFilePath, EnvironmentUtil.getEnvironmentMap());
yarnTreeBuilder = new YarnTreeBuilder(Paths.get(basePath), descriptorFilePath, EnvironmentUtil.getEnvironmentMap(), getLog());
}

@Override
protected DepTree buildTree() throws IOException {
return yarnTreeBuilder.buildTree(getLog());
return yarnTreeBuilder.buildTree();
}

@Override
Expand Down Expand Up @@ -109,7 +109,7 @@ protected List<FileTreeNode> walkDepTree(Map<String, DependencyNode> vulnerableD
String packageName = entry.getKey();
Set<String> packageVersions = entry.getValue();
// find the impact paths for each package for all its vulnerable versions
Map<String, List<List<String>>> packageVersionsImpactPaths = yarnTreeBuilder.findDependencyImpactPaths(getLog(), depTree.getRootId(), packageName, packageVersions);
Map<String, List<List<String>>> packageVersionsImpactPaths = yarnTreeBuilder.findDependencyImpactPaths(depTree.getRootId(), packageName, packageVersions);
for (Map.Entry<String, List<List<String>>> aPackageVersionImpactPaths : packageVersionsImpactPaths.entrySet()) {
String packageFullName = aPackageVersionImpactPaths.getKey();
List<List<String>> impactPaths = aPackageVersionImpactPaths.getValue();
Expand Down

0 comments on commit b1bd662

Please sign in to comment.