pnpm

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachPnpmLockPositions

func AttachPnpmLockPositions(g *model.Graph, projectDir string)

AttachPnpmLockPositions wires pnpm-lock.yaml line numbers.

Types

type Detector added in v0.22.0

type Detector struct {
	Logger     *zap.Logger
	WorkingDir string
	Config     node.StrategyConfig
}

Detector is the merged pnpm detector. It owns an internal ordered strategy (lockfile parse first, pnpm CLI resolution as fallback) that used to be two separately registered detectors chained through Fallback fields.

func (Detector) Applicable added in v0.22.0

func (d Detector) Applicable(ctx context.Context, req plugin.DetectionRequest) (bool, error)

Applicable reports whether any configured strategy applies to the request.

func (Detector) Descriptor added in v0.22.0

func (d Detector) Descriptor() plugin.DetectorDescriptor

Descriptor describes the merged pnpm detector.

func (Detector) Install added in v0.22.0

func (d Detector) Install(ctx context.Context, req plugin.DetectionRequest) error

Install prepares pnpm dependencies before graph resolution, unless the detector's configuration opted out of install-first execution.

func (Detector) PackageManagerSupport added in v0.22.0

func (d Detector) PackageManagerSupport() []plugin.PackageManagerSupport

PackageManagerSupport returns pnpm package-manager discovery metadata for every internal strategy: lockfile evidence plus the manifest the CLI strategy can resolve from.

func (Detector) Ready added in v0.22.0

Ready reports whether any configured strategy can run.

func (Detector) RemediationHints added in v0.22.0

RemediationHints provides pnpm-specific remediation guidance.

func (Detector) ResolveGraph added in v0.22.0

ResolveGraph runs the configured strategies in order and returns the first successful graph.

type LockfileDetector

type LockfileDetector struct {
	Logger     *zap.Logger
	WorkingDir string
}

LockfileDetector resolves dependency graphs with pnpm.

func (LockfileDetector) Applicable

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

Applicable reports whether a pnpm lockfile is present.

func (LockfileDetector) Descriptor

Descriptor describes the pnpm detector.

func (LockfileDetector) PackageManagerSupport

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

PackageManagerSupport returns pnpm package-manager discovery metadata.

func (LockfileDetector) Ready

Ready reports whether pnpm is available.

func (LockfileDetector) RemediationHints added in v0.20.1

RemediationHints provides pnpm-specific remediation guidance.

func (LockfileDetector) ResolveGraph

ResolveGraph resolves a pnpm dependency graph from pnpm-lock.yaml. A workspace lockfile yields one manifest entry per workspace importer (the member's package.json plus its reachable dependency subtree) alongside the root entry.

type NativeDetector

type NativeDetector struct {
	Logger     *zap.Logger
	WorkingDir string
}

NativeDetector resolves dependency graphs with pnpm CLI commands.

func (NativeDetector) Applicable

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

Applicable reports whether pnpm manifests are present.

func (NativeDetector) Descriptor

func (d NativeDetector) Descriptor() plugin.DetectorDescriptor

Descriptor describes the pnpm CLI fallback detector.

func (NativeDetector) Install

Install prepares pnpm dependencies before graph resolution.

func (NativeDetector) PackageManagerSupport

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

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

func (NativeDetector) Ready

Ready reports whether pnpm is available.

func (NativeDetector) RemediationHints added in v0.20.1

RemediationHints provides pnpm-specific remediation guidance.

func (NativeDetector) ResolveGraph

ResolveGraph resolves a pnpm dependency graph via pnpm list.

Jump to

Keyboard shortcuts

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