versiondiff

package
v0.4.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 9 Imported by: 0

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".

type PackageDiff

type PackageDiff struct {
	Package    string
	ChangeType string // "new" | "escalated" | "new_install_script" | "blast_radius"
	OldCaps    []string
	NewCaps    []string
	RiskDelta  float64
}

PackageDiff describes a risk-relevant change for a single package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL