Files
Zoltan Kochan 16f51b11f7 feat(npm-resolver): synthesize native bin dependencies into platform variants
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.
2026-06-18 23:18:08 +02:00
..