Documentation ¶
Index ¶
- Constants
- func CachedMustCompile(exp string) *regexp.Regexp
- type Dependency
- type DependencyState
- type Ecosystem
- type NpmLockDependency
- type NpmLockPackage
- type NpmLockfile
- type PackageDetails
- type PackageDetailsParser
- type PackageFlattened
- type PnpmLockPackage
- type PnpmLockPackageResolution
- type PnpmLockfile
Constants ¶
View Source
const PnpmEcosystem = NpmEcosystem
Variables ¶
This section is empty.
Functions ¶
func CachedMustCompile ¶ added in v0.10.0
Types ¶
type Dependency ¶
type DependencyState ¶ added in v0.10.0
type DependencyState struct { Package Dependency Processed bool }
type NpmLockDependency ¶ added in v0.10.0
type NpmLockDependency struct { Version string `json:"version"` Dependencies map[string]NpmLockDependency `json:"dependencies,omitempty"` }
type NpmLockPackage ¶ added in v0.10.0
type NpmLockfile ¶ added in v0.10.0
type NpmLockfile struct { Version int `json:"lockfileVersion"` // npm v1- lockfiles use "dependencies" Dependencies map[string]NpmLockDependency `json:"dependencies"` // npm v2+ lockfiles use "packages" Packages map[string]NpmLockPackage `json:"packages,omitempty"` }
type PackageDetails ¶
type PackageDetails struct { Name string `json:"name"` Version string `json:"version"` Commit string `json:"commit,omitempty"` Ecosystem Ecosystem `json:"ecosystem,omitempty"` CompareAs Ecosystem `json:"compareAs,omitempty"` Dependencies []Dependency `json:"dependencies,omitempty"` }
func ParseNpmLock ¶ added in v0.10.0
func ParseNpmLock(pathToLockfile string) ([]PackageDetails, error)
func ParsePnpmLock ¶ added in v0.10.0
func ParsePnpmLock(pathToLockfile string) ([]PackageDetails, error)
func ParseYarnLock ¶
func ParseYarnLock(pathToLockfile string) ([]PackageDetails, error)
type PackageDetailsParser ¶
type PackageDetailsParser = func(pathToLockfile string) ([]PackageDetails, error)
type PackageFlattened ¶ added in v0.10.0
type PackageFlattened struct { Name string Version string Dependencies []DependencyState }
func ExpandPackage ¶ added in v0.10.0
func ExpandPackage(packageName string, packages []PackageDetails) (*PackageFlattened, error)
type PnpmLockPackage ¶ added in v0.10.0
type PnpmLockPackage struct { Resolution PnpmLockPackageResolution `yaml:"resolution"` Name string `yaml:"name"` Version string `yaml:"version"` Dependencies map[string]string `yaml:"dependencies"` }
type PnpmLockPackageResolution ¶ added in v0.10.0
type PnpmLockfile ¶ added in v0.10.0
type PnpmLockfile struct { Version float64 `yaml:"lockfileVersion"` Packages map[string]PnpmLockPackage `yaml:"packages,omitempty"` }
func (*PnpmLockfile) UnmarshalYAML ¶ added in v0.10.0
func (l *PnpmLockfile) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.