import { Project, ResolveOptions, Resolver, Descriptor, Package, Report, Cache } from '@yarnpkg/core'; import { Fetcher, FetchOptions } from '@yarnpkg/core'; export type PackageUpdate = { descriptor: Descriptor; currentPackage: Package; updatedPackage: Package; resolvedPackage: Package; }; export type Algorithm = (project: Project, patterns: Array, opts: { resolver: Resolver; resolveOptions: ResolveOptions; fetcher: Fetcher; fetchOptions: FetchOptions; }) => Promise>>; export declare enum Strategy { /** * This strategy dedupes a locator to the best candidate already installed in the project. * * Because of this, it's guaranteed that: * - it never takes more than a single pass to dedupe all dependencies * - dependencies are never downgraded */ HIGHEST = "highest" } export declare const acceptedStrategies: Set; export type DedupeOptions = { strategy: Strategy; patterns: Array; cache: Cache; report: Report; }; export declare function dedupe(project: Project, { strategy, patterns, cache, report }: DedupeOptions): Promise;