lockfile

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachManifestLocations added in v0.0.2

func AttachManifestLocations(edges []models.DepsTreeEdge, deps []models.Dependency) []models.DepsTreeEdge

AttachManifestLocations stamps each lockfile edge's Location with the manifest-side LocationInfo (file + line in the manifest) for its dep. Direct edges (ParentKey == "") are matched by package name; transitive edges inherit the Location of the direct ancestor that pulled them in, resolved by walking the edge DAG to a fixed point.

Names are extracted from the AnalysisIdentifier ("package/<eco>/<name>") and the lockfile ChildKey ("package/<eco>/<name>?version=<v>"). Matching uses whatever normalization each ecosystem already applies (e.g. PEP 503 for pypi); both sides come from the same ecosystem and are pre-normalized by their respective parsers, so no extra normalization happens here.

func ChooseClosestWithManager

func ChooseClosestWithManager(manifestDir, repoRoot string, detectors []DetectorWithManager) (*string, *string)

func Detect

func Detect(manifestDir, repoRoot string, lockfileNames ...string) *string

func PathDepth

func PathDepth(relPath string) int

func PropagateDevFlag

func PropagateDevFlag(edges []models.DepsTreeEdge, rootKey string)

PropagateDevFlag marks edges as Dev when their ChildKey is only reachable through dev root edges. Root edges are identified by ParentKey == rootKey.

Types

type DetectorFunc

type DetectorFunc func(manifestDir, repoRoot string) *string

type DetectorWithManager

type DetectorWithManager struct {
	Detect  DetectorFunc
	Manager string
}

Jump to

Keyboard shortcuts

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