mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-27 11:31:45 -04:00
* fix(core): decouple shouldForceResolve from canResolve in custom resolvers shouldForceResolve is now called for every package in the lockfile without gating on canResolve, since it runs before resolution where the original specifier is not available. Resolvers should handle their own filtering within shouldForceResolve (e.g. by inspecting depPath or pkgSnapshot.resolution). * refactor: shouldForceResolve=>shouldRefreshResolution * docs: remove changeset We don't need a new changeset, we just updated the existing changeset * refactor(core): use Promise.any for early exit in checkCustomResolverForceResolve Replace Promise.all + .some(Boolean) with Promise.any so that the check short-circuits as soon as any shouldRefreshResolution hook returns true, instead of waiting for every hook to complete. Real errors thrown by hooks are re-thrown instead of being silently swallowed. * refactor(core): replace Promise.any with custom anyTrue helper Handle sync boolean returns from shouldRefreshResolution without creating unnecessary promises. Only async results go through the anyTrue helper, which short-circuits on the first true value. --------- Co-authored-by: Zoltan Kochan <z@kochan.io>