mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
fix: hoisting of dependencies after resolution stage (#9686)
close #9685
This commit is contained in:
11
.changeset/silver-clubs-eat.md
Normal file
11
.changeset/silver-clubs-eat.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
"@pnpm/core": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Restore hoisting of optional peer dependencies when installing with an outdated lockfile.
|
||||
Regression introduced in [v10.12.2] by [#9648]; resolves [#9685].
|
||||
|
||||
[v10.12.2]: https://github.com/pnpm/pnpm/releases/tag/v10.12.2
|
||||
[#9648]: https://github.com/pnpm/pnpm/pull/9648
|
||||
[#9685]: https://github.com/pnpm/pnpm/issues/9685
|
||||
@@ -218,7 +218,12 @@ export async function linkPackages (projects: ImporterToUpdate[], depGraph: Depe
|
||||
...await hoist({
|
||||
extraNodePath: opts.extraNodePaths,
|
||||
graph: depGraph,
|
||||
directDepsByImporterId: opts.dependenciesByProjectId,
|
||||
directDepsByImporterId: {
|
||||
...opts.dependenciesByProjectId,
|
||||
'.': new Map(Array.from(opts.dependenciesByProjectId['.']?.entries() ?? []).filter(([alias]) => {
|
||||
return newCurrentLockfile.importers['.' as ProjectId].specifiers[alias]
|
||||
})),
|
||||
},
|
||||
importerIds: projectIds,
|
||||
privateHoistedModulesDir: opts.hoistedModulesDir,
|
||||
privateHoistPattern: opts.hoistPattern ?? [],
|
||||
|
||||
Reference in New Issue
Block a user