lockfile

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(lf LockFile, path string) error

Save serializes lf to YAML and writes it to path.

Types

type LockDiff

type LockDiff struct {
	Added   []LockedDep
	Removed []LockedDep
	Updated []LockedDep // present in both but version changed
}

LockDiff describes what changed between two LockFile snapshots.

func Diff

func Diff(old, new LockFile) LockDiff

Diff computes the set of added, removed, and updated deps between old and new.

type LockFile

type LockFile struct {
	GeneratedAt  string      `yaml:"generated_at"`
	Dependencies []LockedDep `yaml:"dependencies"`
}

LockFile is the in-memory representation of melon.lock.

func Load

func Load(path string) (LockFile, error)

Load reads and parses a melon.lock file at path.

type LockedDep

type LockedDep struct {
	Name       string   `yaml:"name"`
	Version    string   `yaml:"version"`
	GitTag     string   `yaml:"git_tag"`
	RepoURL    string   `yaml:"repo_url"`
	Subdir     string   `yaml:"subdir"`
	Entrypoint string   `yaml:"entrypoint"`
	TreeHash   string   `yaml:"tree_hash"`
	Files      []string `yaml:"files"`
}

LockedDep is one entry in melon.lock.

Jump to

Keyboard shortcuts

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