/** * Structured migration doc frontmatter parsing for `outfitter upgrade`. * * @packageDocumentation */ /** Classification of a change within a migration. */ type MigrationChangeType = "renamed" | "removed" | "signature-changed" | "moved" | "deprecated" | "added"; /** A single structured change entry from migration frontmatter. */ interface MigrationChange { /** Path to codemod script relative to the codemods directory. */ readonly codemod?: string; readonly detail?: string; readonly export?: string; readonly from?: string; readonly path?: string; readonly to?: string; readonly type: MigrationChangeType; } /** Parsed frontmatter from a migration doc. */ interface MigrationFrontmatter { readonly breaking: boolean; readonly changes?: readonly MigrationChange[]; readonly package: string; readonly version: string; } /** * Strip a YAML frontmatter block from migration doc content. */ declare function stripMigrationFrontmatter(content: string): string; /** * Parse the full frontmatter from a migration doc, including the `changes` array. * * Returns `null` if the content has no valid frontmatter or is missing * required fields (`package`, `version`, `breaking`). */ declare function parseMigrationFrontmatter(content: string): MigrationFrontmatter | null; export { MigrationChangeType, MigrationChange, MigrationFrontmatter, stripMigrationFrontmatter, parseMigrationFrontmatter };