/** * Baseline format migrations. * * This module handles upgrading baselines from older CLI versions to the current version. * Migrations are triggered when the CLI major version changes. * * Migration Strategy: * - Migrations are keyed by their TARGET major version * - Each migration upgrades from the previous major version * - Migrations are applied sequentially in version order * - Downgrading is not supported */ import type { BehavioralBaseline } from './types.js'; /** * Check if a baseline can be migrated to the current CLI version. * * Migration is possible if: * - Source version has a different major version than current * - A migration path exists * * @param fromVersion - Source version (string, number, or undefined) * @returns true if migration is possible */ export declare function canMigrate(fromVersion: string | number | undefined): boolean; /** * Get the list of migrations that would be applied. * * @param fromVersion - Source version * @returns Array of major version strings for migrations that would be applied */ export declare function getMigrationsToApply(fromVersion: string | number | undefined): string[]; /** * Migrate a baseline to the current CLI version format. * * @param baseline - The baseline object to migrate (can be any version) * @returns Migrated baseline conforming to BehavioralBaseline interface * @throws Error if migration is not possible (e.g., downgrade attempt) */ export declare function migrateBaseline(baseline: Record): BehavioralBaseline; /** * Check if a baseline needs migration. * * @param baseline - The baseline to check * @returns true if the baseline major version differs from current CLI major version */ export declare function needsMigration(baseline: Record): boolean; /** * Get information about what migrations would be applied. * * @param baseline - The baseline to analyze * @returns Object with migration details */ export declare function getMigrationInfo(baseline: Record): { currentVersion: string; targetVersion: string; needsMigration: boolean; migrationsToApply: string[]; canMigrate: boolean; }; //# sourceMappingURL=migrations.d.ts.map