import type { Nullable } from "../types/index.js"; /** * Gets the current package version from package.json. * @returns The current version string (e.g., "1.0.7"). */ export declare function getPackageVersion(): string; /** * Normalizes a version string by stripping the leading 'v' prefix if present. * @param version - Version string (e.g., "v1.0.7" or "1.0.7"). * @returns Normalized version without 'v' prefix (e.g., "1.0.7"). */ export declare function normalizeVersion(version: string): string; /** * Compares two semver version strings. Returns true if version a is less than version b. Assumes versions are already normalized (no 'v' prefix). * @param a - First version string (e.g., "1.0.7"). * @param b - Second version string (e.g., "1.0.8"). * @returns True if a < b. */ export declare function isVersionLessThan(a: string, b: string): boolean; /** * Fetches the latest version from the npm registry. * @returns The latest version string, or null if the fetch failed. */ export declare function fetchLatestVersion(): Promise>; /** * Checks for updates and caches the results. * @param currentVersion - The currently running version. * @param force - If true, bypasses the debounce check. */ export declare function checkForUpdates(currentVersion: string, force?: boolean): Promise; /** * Gets the cached latest version information. * @param currentVersion - The currently running version. * @returns Object with latest version and whether an update is available. */ export declare function getVersionInfo(currentVersion: string): { latestVersion: Nullable; updateAvailable: boolean; }; /** * Gets the changelog items for a specific version as an array of strings. Uses a two-phase lookup: first checks the cache, then fetches fresh data if the * version isn't found. This handles both cold cache (no data yet) and stale cache (new version not in cached data) scenarios. * @param version - The version to get changelog items for. * @returns Array of changelog items (bullet points), or null if unavailable. */ export declare function getChangelogItems(version: string): Promise>; /** * Starts periodic update checking. * @param currentVersion - The currently running version. */ export declare function startUpdateChecking(currentVersion: string): void; /** * Stops periodic update checking. */ export declare function stopUpdateChecking(): void;