Read and write npm.lock lockfile.
The lockfile records resolved versions, integrity hashes, and dependency relationships to ensure reproducible installs.
Summary
Functions
Return the effective lockfile security policy for new locks.
Return the default npm_ex lockfile path.
Get a single package entry from the lockfile.
Check if a specific package is in the lockfile.
List all package names in the lockfile.
Parse a raw packages map into lockfile entries.
Whether a recorded lockfile policy is compatible with current settings.
Read the lockfile. Returns empty map if it doesn't exist.
Read the security policy recorded in the lockfile.
Get the lockfile version from a file.
Write the lockfile.
Types
Functions
@spec current_policy() :: map()
Return the effective lockfile security policy for new locks.
@spec default_path() :: String.t()
Return the default npm_ex lockfile path.
Get a single package entry from the lockfile.
Check if a specific package is in the lockfile.
List all package names in the lockfile.
Parse a raw packages map into lockfile entries.
Whether a recorded lockfile policy is compatible with current settings.
Read the lockfile. Returns empty map if it doesn't exist.
Read the security policy recorded in the lockfile.
Get the lockfile version from a file.
Write the lockfile.