mirror of
https://github.com/pnpm/pnpm.git
synced 2026-02-15 01:24:07 -05:00
* fix: force re-fetch when resolution integrity changes When a resolver returns a resolution with a different integrity than the current package's resolution, automatically force re-fetching the package. This allows custom resolvers to trigger re-fetches by simply returning the updated integrity, without needing to explicitly set a forceFetch flag. Closes #10451 * refactor: remove forceFetch * test: fix --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
@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