Documentation
¶
Overview ¶
Package lockfile provides functionality for reading and writing lockfiles.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Overwrite ¶
func Overwrite(rw ReadWriter, filename string, patches []DependencyPatch) error
Types ¶
type DependencyPatch ¶
type DependencyPatch struct {
Pkg resolve.PackageKey
OrigVersion string
NewVersion string
}
type NpmReadWriter ¶
type NpmReadWriter struct{}
func (NpmReadWriter) System ¶
func (NpmReadWriter) System() resolve.System
func (NpmReadWriter) Write ¶
func (rw NpmReadWriter) Write(original depfile.DepFile, output io.Writer, patches []DependencyPatch) error
type ReadWriter ¶
type ReadWriter interface {
// System returns which ecosystem this ReadWriter is for.
System() resolve.System
// Read parses a lockfile into a resolved graph
Read(file depfile.DepFile) (*resolve.Graph, error)
// Write applies the DependencyPatches to the lockfile, with minimal changes to the file.
// `original` is the original lockfile to read from. The updated lockfile is written to `output`.
Write(original depfile.DepFile, output io.Writer, patches []DependencyPatch) error
}
func GetReadWriter ¶
func GetReadWriter(pathToLockfile string) (ReadWriter, error)
Click to show internal directories.
Click to hide internal directories.