mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-26 07:27:20 -04:00
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>
@pnpm/resolver-base
Types for pnpm-compatible resolvers
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