Documentation
¶
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 ¶ added in v1.9.0
type NpmReadWriter struct{}
func (NpmReadWriter) System ¶ added in v1.9.0
func (NpmReadWriter) System() resolve.System
func (NpmReadWriter) Write ¶ added in v1.9.0
func (rw NpmReadWriter) Write(original lockfile.DepFile, output io.Writer, patches []DependencyPatch) error
type ReadWriter ¶ added in v1.9.0
type ReadWriter interface {
// System returns which ecosystem this ReadWriter 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 GetReadWriter ¶ added in v1.9.0
func GetReadWriter(pathToLockfile string) (ReadWriter, error)
Click to show internal directories.
Click to hide internal directories.