fix: reporting of added dependencies (#7396)

close #7384
This commit is contained in:
Zoltan Kochan
2023-12-11 10:16:57 +01:00
committed by GitHub
parent 49f0027f13
commit e3b9832955
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/headless": patch
"pnpm": patch
---
Don't report dependencies with optional dependencies as being added on repeat install. This was a bug in reporting [#7384](https://github.com/pnpm/pnpm/issues/7384).

View File

@@ -343,7 +343,7 @@ export async function headlessInstall (opts: HeadlessOptions): Promise<Installat
}
const depNodes = Object.values(graph)
const added = depNodes.length
const added = depNodes.filter(({ fetching }) => fetching).length
statsLogger.debug({
added,
prefix: lockfileDir,