Documentation
¶
Overview ¶
Package scan orchestrates the CLI's "what changed between these two commits" logic. It wraps git ops, manifest parsing, and the set-difference that produces the (added, bumped, removed) lists deps-analyze consumes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeKind ¶
type ChangeKind string
ChangeKind distinguishes the three ways a dependency can change between base and head.
const ( KindAdded ChangeKind = "added" KindBumped ChangeKind = "bumped" KindRemoved ChangeKind = "removed" )
func (ChangeKind) String ¶
func (k ChangeKind) String() string
type ChangedDep ¶
type ChangedDep struct {
Ecosystem manifest.Ecosystem
Name string
Version string
PreviousVersion string // Empty for KindAdded.
Kind ChangeKind // KindAdded | KindBumped | KindRemoved
File string // Lockfile path change was detected in
}
ChangedDep is one dependency whose (ecosystem, name, version) tuple changed between base and head. Kind distinguishes the three change modes so the workflow can prioritise "new version + bumped version" for analyze calls while skipping removals (removed deps don't have a new version to analyse).
func Diff ¶
func Diff(ctx context.Context, repoPath, baseRef, headRef string, parsers []manifest.Parser) ([]ChangedDep, error)
Diff compares two commits by reading their lockfiles via `git show` and diffing the parsed manifest entries. Returns the changed deps ordered by (file, name) for stable display.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package manifest parses lockfiles + manifests to produce a flat (ecosystem, name, version) list that nullify deps analyze compares between two commits.
|
Package manifest parses lockfiles + manifests to produce a flat (ecosystem, name, version) list that nullify deps analyze compares between two commits. |