diff --git a/plugins/org.eclipse.n4js/src/org/eclipse/n4js/utils/ProjectDescriptionLoader.java b/plugins/org.eclipse.n4js/src/org/eclipse/n4js/utils/ProjectDescriptionLoader.java index 0e1ed3f551..ca9ddd160d 100644 --- a/plugins/org.eclipse.n4js/src/org/eclipse/n4js/utils/ProjectDescriptionLoader.java +++ b/plugins/org.eclipse.n4js/src/org/eclipse/n4js/utils/ProjectDescriptionLoader.java @@ -293,8 +293,15 @@ private void setInformationFromPnpmWorkspace(FileURI location, ProjectDescriptio Multimap pnpmWorkspacesYaml = YamlUtil.loadYamlAtLocation(path); Collection packagesEntries = pnpmWorkspacesYaml.get("packages"); if (!packagesEntries.isEmpty()) { - target.setPnpmWorkspaceRoot(true); - target.getWorkspaces().addAll(packagesEntries); + // check for property discussed here: https://github.com/pnpm/pnpm/issues/2255#issuecomment-576866891 + Collection useYarnConfigEntries = pnpmWorkspacesYaml.get("useYarnConfig"); + if (useYarnConfigEntries.isEmpty() + || !"true".equals(useYarnConfigEntries.iterator().next().toString().toLowerCase())) { + + target.setPnpmWorkspaceRoot(true); + target.getWorkspaces().clear(); + target.getWorkspaces().addAll(packagesEntries); + } } }