Skip to content

Commit

Permalink
🐛 Fixed issue regarding Yarn workspaces feature eliminating _project_…
Browse files Browse the repository at this point in the history
… dependency
  • Loading branch information
noyshabtay committed Nov 22, 2023
1 parent 6c7a62a commit bf202e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/jfrog/ide/common/yarn/YarnTreeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ private List<String> extractSinglePath(String projectRootId, String packageFullN
List<String> pathResult = new ArrayList<>();
pathResult.add(projectRootId); // The root project is guaranteed to be the first element in the path

rawDependency = StringUtils.lowerCase(rawDependency); // the word specified can be in upper or lower case
rawDependency = StringUtils.lowerCase(rawDependency); // The word specified can be in upper or lower case
// remove any "_project_" strings (can be generated as part of a Yarn workspace in Yarn Monorepo feature)
rawDependency = StringUtils.remove(rawDependency, "_project_");

if (StringUtils.contains(rawDependency, "specified in")) { // This is a direct dependency
pathResult.add(packageFullName);
return pathResult;
Expand Down

0 comments on commit bf202e3

Please sign in to comment.