lockfile

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) Read added in v1.9.0

func (rw NpmReadWriter) Read(file lockfile.DepFile) (*resolve.Graph, error)

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)

Jump to

Keyboard shortcuts

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