mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-21 13:12:46 -04:00
A package that ships a JS launcher shim plus per-platform native binaries as optionalDependencies (e.g. `pacquet`) otherwise installs the wrapper + every optional dep and links a Node launcher shim that re-spawns the real binary. When such a package is a native bin dependency, the npm resolver now returns a `variations` resolution over its platform packages instead of the wrapper tarball, so only the host's binary is fetched and linked directly — no launcher shim, no lifecycle scripts. The whole downstream variants pipeline (selection, BinaryFetcher, bin-linking) is reused. The set of native bin dependencies is the hardcoded default list (`pacquet`, `@pnpm/pacquet`) plus the new `nativeBinDependencies` setting. Adds the `nativeBinDependencies` config setting and the synthesis in `resolveNativeBinVariations`, gated so a wrapper with no platform-tagged optional dependency falls back to its normal tarball resolution.