import { SemVer, BumpType } from '../models'; /** * Increments a version based on the bump type. * * @param version - The version to increment * @param type - The type of bump (major, minor, patch, etc.) * @param prereleaseId - Optional prerelease identifier for prerelease bumps * @returns A new incremented SemVer * * @example Increment version by bump type * increment(parseVersion('1.2.3'), 'minor') // 1.3.0 * increment(parseVersion('1.2.3'), 'major') // 2.0.0 * increment(parseVersion('1.2.3'), 'prerelease', 'alpha') // 1.2.4-alpha.0 */ declare function increment(version: SemVer, type: BumpType, prereleaseId?: string): SemVer; /** * Increments the prerelease portion of a version. * * @param version - The version to increment * @param id - Optional prerelease identifier * @returns A new version with incremented prerelease * * @example Increment the prerelease portion of a version * ```typescript * incrementPrerelease(parseVersionStrict('1.0.0')) // => 1.0.1-alpha.0 * incrementPrerelease(parseVersionStrict('1.0.0-alpha.0')) // => 1.0.0-alpha.1 * incrementPrerelease(parseVersionStrict('1.0.0'), 'beta') // => 1.0.1-beta.0 * ``` */ declare function incrementPrerelease(version: SemVer, id?: string): SemVer; /** * Calculates the difference type between two versions. * * @param older - The older version * @param newer - The newer version * @returns The type of difference, or null if versions are equal * * @example Calculate the difference type between two versions * diff(parseVersion('1.0.0'), parseVersion('2.0.0')) // 'major' * diff(parseVersion('1.0.0'), parseVersion('1.1.0')) // 'minor' * diff(parseVersion('1.0.0'), parseVersion('1.0.1')) // 'patch' */ declare function diff(older: SemVer, newer: SemVer): BumpType | null; export { diff, increment, incrementPrerelease };