Documentation
¶
Overview ¶
Package versiondiff compares lockfile states to compute per-package risk deltas.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilityChange ¶ added in v0.3.8
type CapabilityChange struct {
Package string `json:"package"`
Added []string `json:"added,omitempty"`
Removed []string `json:"removed,omitempty"`
}
CapabilityChange summarises capability additions and removals for a package.
type DiffReport ¶
type DiffReport struct {
Base string
NewPackages []PackageDiff
Escalations []PackageDiff
BlastRadiusDelta int // change in affected-package count
Score float64 // 0-20
// UpgradeSummary lists per-package capability changes across the diff.
UpgradeSummary []CapabilityChange `json:"upgrade_summary,omitempty"`
}
DiffReport summarises risk changes between two lockfile states.
func Compute ¶
func Compute(dir, base, lang string) (DiffReport, error)
Compute compares the current lockfile in dir against base (a git ref or lockfile path). lang must be "auto", "go", or "node".
Click to show internal directories.
Click to hide internal directories.