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 { // 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) Write ¶
func (rw NpmLockfileIO) Write(original lockfile.DepFile, output io.Writer, patches []DependencyPatch) error
Click to show internal directories.
Click to hide internal directories.