NPM.LockfileCheck (NPM v0.6.0)

Copy Markdown View Source

Validates lockfile consistency against package.json dependencies.

Summary

Functions

Runs all consistency checks.

Checks if the lockfile has packages not in package.json dependencies.

Formats check results for display.

Checks if locked versions satisfy the declared ranges.

Checks if all package.json dependencies are in the lockfile.

Functions

check(pkg_data, lockfile)

@spec check(map(), map()) :: map()

Runs all consistency checks.

extraneous(pkg_data, lockfile)

@spec extraneous(map(), map()) :: [String.t()]

Checks if the lockfile has packages not in package.json dependencies.

format_results(result)

@spec format_results(map()) :: String.t()

Formats check results for display.

mismatched(pkg_data, lockfile)

@spec mismatched(map(), map()) :: [{String.t(), String.t(), String.t()}]

Checks if locked versions satisfy the declared ranges.

missing(pkg_data, lockfile)

@spec missing(map(), map()) :: [String.t()]

Checks if all package.json dependencies are in the lockfile.