import type { Argv } from "yargs"; import { type Logger } from "../logger.js"; /** Exported for tests. */ export declare function pickLatest(versions: string[], includePrerelease: boolean): string | null; interface ImportUpgrade { packagePath: string; from: string; to: string; } interface UpgradeResult { changed: boolean; upgrades: ImportUpgrade[]; /** Imports already at the latest version that were newly pinned (integrity * hash added without a version change). */ pinned: number; unchanged: number; skipped: number; errors: number; } /** * Pure string-in / string-out core of the upgrade command. No filesystem * access — `upgradeOne` is the disk-backed wrapper. Exported so tests can * exercise the parse / fetch / decision pipeline without a tmpdir. * * The returned `content` is the rewritten YAML when `result.changed === true`, * and the original `content` (byte-identical) when nothing matched. */ export declare function upgradeManifest(args: { content: string; registryUrl: string; includePrerelease: boolean; log: Logger; /** Optional label printed in the "Upgrading " header. */ displayName?: string; /** When set, local sibling imports are followed by the caller — so they are * neither counted nor reported as skipped here. */ recursive?: boolean; }): Promise<{ content: string; result: UpgradeResult; relativeImports: string[]; }>; export declare function upgradeOne(inputPath: string, registryUrl: string, includePrerelease: boolean, dryRun: boolean, log: Logger, recursive?: boolean, visited?: Set): Promise; export declare function upgrade(argv: { paths: string[]; registryUrl?: string; includePrerelease: boolean; dryRun: boolean; recursive?: boolean; }): Promise; export declare function upgradeCommand(yargs: Argv): Argv; export {}; //# sourceMappingURL=upgrade.d.ts.map