mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-27 18:46:18 -04:00
chore: document how lockfileToDepGraph returns a partial graph (#9806)
This commit is contained in:
5
.changeset/icy-shoes-rest.md
Normal file
5
.changeset/icy-shoes-rest.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@pnpm/deps.graph-builder": patch
|
||||
---
|
||||
|
||||
Add a JSDoc for the `lockfileToDepGraph` function.
|
||||
9
deps/graph-builder/src/lockfileToDepGraph.ts
vendored
9
deps/graph-builder/src/lockfileToDepGraph.ts
vendored
@@ -93,6 +93,15 @@ export interface LockfileToDepGraphResult {
|
||||
pkgLocationsByDepPath?: Record<string, string[]>
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a dependency graph from lockfiles.
|
||||
*
|
||||
* If a current lockfile is provided, this function only includes new or changed
|
||||
* packages in the graph. In other words, the graph returned will be a set
|
||||
* subtraction of the packages in the wanted lockfile minus the current
|
||||
* lockfile. This behavior can be configured with the `includeUnchangedDeps`
|
||||
* option.
|
||||
*/
|
||||
export async function lockfileToDepGraph (
|
||||
lockfile: LockfileObject,
|
||||
currentLockfile: LockfileObject | null,
|
||||
|
||||
Reference in New Issue
Block a user