mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-28 02:53:15 -04:00
6
.changeset/neat-suns-smoke.md
Normal file
6
.changeset/neat-suns-smoke.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/resolve-dependencies": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Fix lockfile v6 on projects that use patched dependencies [#5967](https://github.com/pnpm/pnpm/issues/5967).
|
||||
@@ -159,6 +159,7 @@ export interface ResolutionContext {
|
||||
resolutionMode?: 'highest' | 'time-based'
|
||||
virtualStoreDir: string
|
||||
updateMatching?: (pkgName: string) => boolean
|
||||
useLockfileV6?: boolean
|
||||
workspacePackages?: WorkspacePackages
|
||||
missingPeersOfChildrenByPkgId: Record<string, { parentImporterId: string, missingPeersOfChildren: MissingPeersOfChildren }>
|
||||
}
|
||||
@@ -1158,7 +1159,7 @@ async function resolveDependency (
|
||||
const patchFile = ctx.patchedDependencies?.[nameAndVersion]
|
||||
if (patchFile) {
|
||||
ctx.appliedPatches.add(nameAndVersion)
|
||||
depPath += `_${patchFile.hash}`
|
||||
depPath += ctx.useLockfileV6 ? `(patch_hash=${patchFile.hash})` : `_${patchFile.hash}`
|
||||
}
|
||||
|
||||
// We are building the dependency tree only until there are new packages
|
||||
|
||||
@@ -129,6 +129,7 @@ export async function resolveDependencyTree<T> (
|
||||
updatedSet: new Set<string>(),
|
||||
workspacePackages: opts.workspacePackages,
|
||||
missingPeersOfChildrenByPkgId: {},
|
||||
useLockfileV6: opts.useLockfileV6,
|
||||
}
|
||||
|
||||
const resolveArgs: ImporterToResolve[] = importers.map((importer) => {
|
||||
|
||||
Reference in New Issue
Block a user