Skip to content

Commit

Permalink
Don't try to meet workspace peer dependency constraints for now
Browse files Browse the repository at this point in the history
  • Loading branch information
larixer committed Sep 17, 2021
1 parent 9ff124d commit a39c4cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/yarnpkg-nm/sources/buildNodeModulesTree.ts
Expand Up @@ -287,13 +287,16 @@ const buildPackageTree = (pnp: PnpApi, options: NodeModulesTreeOptions): { packa
const isExternalSoftLinkPackage = isExternalSoftLink(pkg, locator, pnp, topPkgPortableLocation);

if (!node) {
const isWorkspace = pkg.linkType === LinkType.SOFT && locator.name.endsWith(WORKSPACE_NAME_SUFFIX);
node = {
name,
identName: locator.name,
reference: locator.reference,
dependencies: new Set(),
peerNames: pkg.packagePeers,
isWorkspace: pkg.linkType === LinkType.SOFT && locator.name.endsWith(WORKSPACE_NAME_SUFFIX),
// View peer dependencies as regular dependencies for workspaces
// (meeting workspace peer dependency constraints is sometimes hard, sometimes impossible for the nm linker)
peerNames: isWorkspace ? new Set() : pkg.packagePeers,
isWorkspace,
};

nodes.set(nodeKey, node);
Expand Down

0 comments on commit a39c4cc

Please sign in to comment.