Skip to content

Commit

Permalink
fix: auto installing peer dep in a workspace
Browse files Browse the repository at this point in the history
close #5144
  • Loading branch information
zkochan committed Sep 5, 2022
1 parent 728c0cd commit 150061b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/resolve-dependencies/src/index.ts
Expand Up @@ -133,6 +133,14 @@ export default async function (
updated: project.manifest,
})
}
if (opts.autoInstallPeers) {
if (updatedManifest?.peerDependencies) {
updatedManifest.dependencies = {
...updatedManifest.peerDependencies,
...updatedManifest.dependencies,
}
}
}

if (updatedManifest != null) {
const projectSnapshot = opts.wantedLockfile.importers[project.id]
Expand Down

0 comments on commit 150061b

Please sign in to comment.