mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-26 11:02:01 -04:00
BIN_OWNER_OVERRIDES was only used in checkGlobalBinConflicts for global installs. This change applies the same ownership rules in compareCommandsInConflict so that conflict resolution is consistent between global conflict checking and actual bin linking. This ensures packages like npm get priority for bins like npx even in non-global installs. Closes #10850 * test(link-bins): add missing fixture for bin-owner-override test * refactor: extract BIN_OWNER_OVERRIDES to @pnpm/package-bins Move shared logic to avoid code duplication between link-bins and checkGlobalBinConflicts. * fix(link-bins): use regex for Windows path compatibility in test * refactor(link-bins): remove redundant ownName field pkgOwnsBin already handles the binName === pkgName case, making the ownName field and its associated checks redundant. * Change versioning to patch for bins resolver and linker Added BIN_OWNER_OVERRIDES and pkgOwnsBin to @pnpm/bins.resolver for improved conflict resolution in bin linking. * test: remove node_modules from bin-owner-override fixture Move fixture packages to the directory root instead of nesting them inside node_modules, avoiding committing node_modules to the repo. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Zoltan Kochan <z@kochan.io> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>