/** * Semver bump for `--bump-version`. * * The CLI had a `--bump-version` flag on both publish commands that only logged * "auto-bump wiring is tracked in R17" and then published the file's version * unchanged. That is the flag the whole auto-publish design depends on, so the * gap was not cosmetic: without a real bump, a content change under an * unbumped version has nowhere to go. * * Pure and separate from the publish flow so the arithmetic — where an off-by- * one silently publishes under a colliding version — is testable on its own. */ export type BumpLevel = 'patch' | 'minor' | 'major'; /** * Increment a semver string by one level. * * Returns null for anything that is not exactly `X.Y.Z` with non-negative * integers. Guessing at a version is worse than declining: a wrong guess * publishes under a version nobody chose, and `0.1` or `1.0` are not versions * this pipeline path can reason about. Callers surface the null rather than * substituting a default, so the author finds out their header is malformed * instead of discovering a mystery version in the marketplace. */ export declare function bumpSemver(version: string, level: BumpLevel): string | null; /** * Compare two semver strings: -1 if a < b, 0 if equal, 1 if a > b. * * Used to answer "is the copy on this machine older than the published one?" * — a string comparison would say "1.10.0" < "1.9.0", which is the opposite * of the truth. A version that is not semver sorts as the smallest, so a file * with a broken version never claims to be newer than what is published. */ export declare function compareSemver(a: string | null | undefined, b: string | null | undefined): number;