Help us shape the future of Go! Take the 2026 Go Developer Survey

yarnlock

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 9 Imported by: 1

README

go-yarnlock

A yarn.lock parser written in go. Reference: https://github.com/yarnpkg/yarn/blob/master/src/lockfile/parse.js

Documentation

Index

Constants

View Source
const LockfileVersion = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type LockFile

type LockFile map[string]LockFileEntry

func ParseLockFileData

func ParseLockFileData(data []byte) (lf LockFile, err error)

func (*LockFile) Encode added in v0.1.1

func (f *LockFile) Encode(w io.Writer) error

Encode the contents of the LockFile

func (LockFile) RootElement

func (f LockFile) RootElement() []string

RootElement returns elements which not be referenced. The result list is sorted.

type LockFileEntry added in v0.1.1

type LockFileEntry struct {
	Name                 string            `json:"name,omitempty"`
	Version              string            `json:"version,omitempty"`
	UID                  string            `json:"uid,omitempty"`
	Resolved             string            `json:"resolved,omitempty"`
	Integrity            string            `json:"integrity,omitempty"`
	Registry             string            `json:"registry,omitempty"`
	Dependencies         map[string]string `json:"dependencies,omitempty"`
	OptionalDependencies map[string]string `json:"optionalDependencies,omitempty"`
}

Jump to

Keyboard shortcuts

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