fix: running an install after the fetch command should hoist all dependencies (#9690)

close #9689
This commit is contained in:
Zoltan Kochan
2025-06-25 01:14:45 +02:00
committed by GitHub
parent 5acbe4735f
commit b511eac107
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
---
"@pnpm/plugin-commands-installation": patch
"pnpm": patch
---
Running `pnpm install` after `pnpm fetch` should hoist all dependencies that need to be hoisted.
Fixes a regression introduced in [v10.12.2] by [#9648]; resolves [#9689].
[v10.12.2]: https://github.com/pnpm/pnpm/releases/tag/v10.12.2Add commentMore actions
[#9648]: https://github.com/pnpm/pnpm/pull/9648
[#9689]: https://github.com/pnpm/pnpm/issues/9689

View File

@@ -69,5 +69,10 @@ export async function handler (opts: FetchCommandOptions): Promise<void> {
pruneStore: true,
storeController: store.ctrl,
storeDir: store.dir,
// Hoisting is skipped anyway,
// so we store these empty patterns in node_modules/.modules.yaml
// to let the subsequent install know that hoisting should be performed.
hoistPattern: [],
publicHoistPattern: [],
} as InstallOptions)
}