Skip to content

Commit

Permalink
fix: don't incorrectly identify a lockfile out-of-date (#5126)
Browse files Browse the repository at this point in the history
when the package has a publishConfig.directory field

close #5124
  • Loading branch information
zkochan committed Jul 30, 2022
1 parent cd40f83 commit 44544b4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/eighty-cheetahs-shout.md
@@ -0,0 +1,6 @@
---
"@pnpm/lockfile-file": patch
"pnpm": patch
---

Don't incorrectly identify a lockfile out-of-date when the package has a publishConfig.directory field [#5124](https://github.com/pnpm/pnpm/issues/5124).
1 change: 1 addition & 0 deletions packages/lockfile-file/src/read.ts
Expand Up @@ -231,6 +231,7 @@ function convertFromLockfileFileMutable (lockfileFile: LockfileFile): Lockfile {
'.': {
specifiers: lockfileFile['specifiers'] ?? {},
dependenciesMeta: lockfileFile['dependenciesMeta'],
publishDirectory: lockfileFile['publishDirectory'],
},
}
delete lockfileFile.specifiers
Expand Down
1 change: 1 addition & 0 deletions packages/lockfile-file/test/read.test.ts
Expand Up @@ -27,6 +27,7 @@ test('readWantedLockfile()', async () => {
dependenciesMeta: {
foo: { injected: true },
},
publishDirectory: undefined,
},
})
}
Expand Down

0 comments on commit 44544b4

Please sign in to comment.