Skip to content

Commit

Permalink
fix: incorrect error block when subproject has been patched (pnpm#6183)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter committed Mar 5, 2023
1 parent 890b497 commit cb01448
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/violet-insects-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@pnpm/resolve-dependencies": patch
---

Fix the incorrect error block when subproject has been patched (#6183)
2 changes: 1 addition & 1 deletion pkg-manager/resolve-dependencies/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export async function resolveDependencies (
// We only check whether patches were applied in cases when the whole lockfile was reanalyzed.
if (
opts.patchedDependencies &&
(opts.forceFullResolution || !opts.wantedLockfile.packages?.length) &&
(opts.forceFullResolution || !Object.keys(opts.wantedLockfile.packages ?? {})?.length) &&
Object.keys(opts.wantedLockfile.importers).length === importers.length
) {
verifyPatches({
Expand Down

0 comments on commit cb01448

Please sign in to comment.