Files
pnpm/resolving/resolver-base
Zoltan Kochan 3fda443beb feat: inject DYLD_LIBRARY_PATH/LD_LIBRARY_PATH in broop bin wrappers
Native binaries from Homebrew bottles (e.g., wget) are dynamically linked
against shared libraries with hardcoded absolute paths like
/opt/homebrew/opt/openssl@3/lib/libssl.dylib. When installed via pnpm,
these paths don't exist.

This change:
- Adds nativeLibraryDeps to BinaryResolution to carry library dependency
  info through the resolution/fetch pipeline
- Stores nativeLibraryDeps in the fetched package manifest
- Resolves sibling dependency lib/ directories in the store
- Injects DYLD_LIBRARY_PATH (macOS) / LD_LIBRARY_PATH (Linux) into the
  shell wrapper scripts generated by @zkochan/cmd-shim
- Handles Homebrew versioned formula names (e.g., openssl@3) by
  sanitizing @ to -v for valid npm package names and fixing GHCR
  token scope resolution
- Allows broop subdeps through the exotic subdep filter

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 00:40:01 +01:00
..
2025-10-21 15:30:20 +02:00
2026-02-18 14:54:09 +01:00

@pnpm/resolver-base

Types for pnpm-compatible resolvers

npm version

Installation

pnpm add @pnpm/resolver-base

Usage

Here's a template of a resolver using types from @pnpm/resolver-base:

import {
  ResolveOptions,
  ResolveResult,
  WantedDependency,
} from '@pnpm/resolver-base'

export async function testResolver (
  wantedDependency: WantedDependency,
  opts: ResolveOptions,
): Promise<ResolveResult> {
  // ...
  return {
    id,
    resolution,
    package,
    latest,
    normalizedBareSpecifier,
  }
}

License

MIT