NPM.DepsOutput (NPM v0.6.0)

Copy Markdown View Source

Formats installed npm packages for display, similar to mix deps.

Summary

Functions

Formats a lockfile diff (added, removed, updated packages).

Formats a lockfile as a mix deps-style listing.

Formats install summary with timing.

Prints the lockfile listing to the Mix shell.

Functions

format_diff(old, new)

@spec format_diff(map(), map()) :: String.t()

Formats a lockfile diff (added, removed, updated packages).

format_lockfile(lockfile)

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

Formats a lockfile as a mix deps-style listing.

Each entry shows: * name version (npm registry) with locked version and status on the next line.

format_summary(count, ms)

@spec format_summary(non_neg_integer(), non_neg_integer()) :: String.t()

Formats install summary with timing.

print(lockfile)

@spec print(map()) :: :ok

Prints the lockfile listing to the Mix shell.