Analyzes and validates peer dependency requirements.
Peer dependencies declare that a package is compatible with a specific version of another package that the consumer must provide. This module checks whether peer dependency requirements are satisfied.
Summary
Functions
Checks peer dependency satisfaction for a set of installed packages.
Extracts peer dependencies from a package manifest map. Returns a map of %{package_name => required_range}.
Formats peer dependency warnings as human-readable strings.
Extracts peer dependency metadata (which peers are optional). Returns a MapSet of optional peer dependency names.
Summarizes peer dependency status for display. Returns a map with :satisfied, :missing, and :incompatible counts.
Types
Functions
@spec check(map(), [map()]) :: [peer_warning()]
Checks peer dependency satisfaction for a set of installed packages.
Given a lockfile (map of %{name => %{version, ...}}) and a list of package manifests with their peerDependencies, returns warnings for any unmet peer dependencies.
Extracts peer dependencies from a package manifest map. Returns a map of %{package_name => required_range}.
@spec format_warnings([peer_warning()]) :: [String.t()]
Formats peer dependency warnings as human-readable strings.
Extracts peer dependency metadata (which peers are optional). Returns a MapSet of optional peer dependency names.
@spec summary([peer_warning()]) :: %{ satisfied: non_neg_integer(), missing: non_neg_integer(), incompatible: non_neg_integer() }
Summarizes peer dependency status for display. Returns a map with :satisfied, :missing, and :incompatible counts.