Skip to main content

parse_lockfile

Function parse_lockfile 

Source
pub fn parse_lockfile(
    project_dir: &Path,
    manifest: &PackageJson,
) -> Result<LockfileGraph, Error>
Expand description

Detect and parse the lockfile in the given project directory.

Priority: aube-lock.yamlpnpm-lock.yamlbun.lockyarn.locknpm-shrinkwrap.jsonpackage-lock.json. (Shrinkwrap takes priority over package-lock.json when both exist, matching npm’s behavior.)

manifest is needed to classify direct vs transitive deps when reading yarn.lock (which has no notion of that distinction).