Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Overwrite ¶
func Overwrite(rw LockfileIO, filename string, patches []DependencyPatch) error
Types ¶
type DependencyPatch ¶
type DependencyPatch struct {
Pkg resolve.PackageKey
OrigVersion string
NewVersion string
}
type LockfileIO ¶
type LockfileIO interface {
// System returns which ecosystem this LockfileIO is for.
System() resolve.System
// Read parses a lockfile into a resolved graph
Read(file lockfile.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 lockfile.DepFile, output io.Writer, patches []DependencyPatch) error
}
func GetLockfileIO ¶
func GetLockfileIO(pathToLockfile string) (LockfileIO, error)
type NpmLockfileIO ¶
type NpmLockfileIO struct{}
func (NpmLockfileIO) System ¶ added in v1.8.4
func (NpmLockfileIO) System() resolve.System
func (NpmLockfileIO) Write ¶
func (rw NpmLockfileIO) Write(original lockfile.DepFile, output io.Writer, patches []DependencyPatch) error
Click to show internal directories.
Click to hide internal directories.