yarn

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachYarnLockPositions

func AttachYarnLockPositions(g *sdk.Graph, projectDir string)

AttachYarnLockPositions wires yarn.lock line numbers.

Types

type LockfileDetector

type LockfileDetector struct {
	Logger     *zap.Logger
	WorkingDir string
	Fallback   sdk.Detector
}

LockfileDetector resolves dependency graphs with Yarn.

func (LockfileDetector) Applicable

func (d LockfileDetector) Applicable(ctx context.Context, req sdk.DetectionRequest) (bool, error)

Applicable reports whether a Yarn lockfile is present.

func (LockfileDetector) Descriptor

func (d LockfileDetector) Descriptor() sdk.DetectorDescriptor

Descriptor describes the Yarn detector.

func (LockfileDetector) FallbackDetector

func (d LockfileDetector) FallbackDetector() sdk.Detector

FallbackDetector returns the configured fallback detector.

func (LockfileDetector) Install

Install prepares Yarn dependencies before graph resolution.

func (LockfileDetector) PackageManagerSupport

func (d LockfileDetector) PackageManagerSupport() []sdk.PackageManagerSupport

PackageManagerSupport returns Yarn package-manager discovery metadata.

func (LockfileDetector) Ready

Ready reports whether Yarn is available.

func (LockfileDetector) ResolveGraph

ResolveGraph resolves a Yarn dependency graph from yarn.lock.

type NativeDetector

type NativeDetector struct {
	Logger     *zap.Logger
	WorkingDir string
	Fallback   sdk.Detector
}

NativeDetector resolves dependency graphs with Yarn CLI commands.

func (NativeDetector) Applicable

func (d NativeDetector) Applicable(ctx context.Context, req sdk.DetectionRequest) (bool, error)

Applicable reports whether Yarn manifests are present.

func (NativeDetector) Descriptor

func (d NativeDetector) Descriptor() sdk.DetectorDescriptor

Descriptor describes the Yarn CLI fallback detector.

func (NativeDetector) FallbackDetector

func (d NativeDetector) FallbackDetector() sdk.Detector

FallbackDetector returns the configured fallback detector.

func (NativeDetector) Install

Install prepares Yarn dependencies before graph resolution.

func (NativeDetector) PackageManagerSupport

func (d NativeDetector) PackageManagerSupport() []sdk.PackageManagerSupport

PackageManagerSupport returns discovery metadata for the internal Yarn CLI fallback detector.

func (NativeDetector) Ready

Ready reports whether Yarn is available.

func (NativeDetector) ResolveGraph

ResolveGraph resolves a Yarn dependency graph via yarn list.

Jump to

Keyboard shortcuts

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