/** * Semver ordering for install-currency decisions ("is the published version * newer than the one running?"). Fjall versions are lerna-minted * `MAJOR.MINOR.PATCH` with an optional prerelease; build metadata is ignored * per the spec. Pure and client-safe — the webapp can compare too. * * Two sibling parsers exist with deliberately different semantics — do not * consolidate onto this one: `util/src/docker/DockerCli.daemon.ts` truncates * prerelease (daemon versions like `24.0.7-ce` gate on the core only), and * `deploy-core` `engineCompat.ts#parseEngineVersion` refuses malformed input * outright so a corrupted constraint cannot vacate the engine gate. This one * compares prerelease per spec §11, which dist-tag currency needs. */ export interface ParsedSemver { readonly core: readonly [number, number, number]; readonly prerelease: readonly string[]; } export declare function parseSemver(version: string): ParsedSemver | undefined; /** Spec §11 precedence; -1 / 0 / 1 like `Array.prototype.sort` comparators. */ export declare function compareSemver(a: ParsedSemver, b: ParsedSemver): number; /** * Whether `candidate` is strictly newer than `current`. Unparseable input on * either side is "not newer" — a currency nudge must never fire on garbage. */ export declare function isNewerVersion(candidate: string, current: string): boolean;