/** * Semantic Version Utilities * Issue #1194: Shared 3-way version comparison (D-14 / S3-005) * * Extracted from PreflightChecker so that `commandmate update` and the * preflight dependency checker share a single comparison implementation. * * Note: `src/lib/version-checker.ts` intentionally is NOT reused here. * It imports via the `@/` alias which `tsconfig.cli.json` disables * (`"paths": {}`), so importing it from src/cli breaks `npm run build:cli` * with TS2307 (S1-010). * * @module semver */ /** * Check whether a version string can be compared numerically. * * Prerelease versions (e.g. `0.9.0-rc.1`) are NOT comparable: feeding them to * {@link compareVersions} would produce `NaN` parts and meaningless results. * Callers must treat `false` as "comparison impossible" (D-3). * * @param version - Version string (optionally `v`-prefixed) * @returns true if the version is a plain `X.Y.Z` release version */ export declare function isComparableVersion(version: string): boolean; /** * Compare two version strings numerically. * * Missing parts are treated as 0 (`1.2` === `1.2.0`). * * @param a - Left version (optionally `v`-prefixed) * @param b - Right version (optionally `v`-prefixed) * @returns -1 if a < b, 0 if a === b, 1 if a > b */ export declare function compareVersions(a: string, b: string): number; //# sourceMappingURL=semver.d.ts.map