npm

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependency

type Dependency struct {
	Version      string                `json:"version"`
	Dev          bool                  `json:"dev"`
	Dependencies map[string]Dependency `json:"dependencies"`
	Requires     map[string]string     `json:"requires"`
	Resolved     string                `json:"resolved"`
	xjson.Location
}

type LockFile

type LockFile struct {
	Dependencies    map[string]Dependency `json:"dependencies"`
	Packages        map[string]Package    `json:"packages"`
	LockfileVersion int                   `json:"lockfileVersion"`
}

type Package

type Package struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	// License is reused from packagejson because npm copies this field from package.json.
	// Modern npm versions normalize it, but legacy lockfiles still contain object/array shapes.
	License              packagejson.License `json:"license"`
	Dependencies         map[string]string   `json:"dependencies"`
	OptionalDependencies map[string]string   `json:"optionalDependencies"`
	DevDependencies      map[string]string   `json:"devDependencies"`
	PeerDependencies     map[string]string   `json:"peerDependencies"`
	Resolved             string              `json:"resolved"`
	Dev                  bool                `json:"dev"`
	Link                 bool                `json:"link"`
	Workspaces           any                 `json:"workspaces"`
	xjson.Location
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser() *Parser

func (*Parser) Parse

Jump to

Keyboard shortcuts

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