import { ReleaseType } from 'semver'; import { WorkspacePackage } from '../package-json/collect-package-jsons.js'; import { VersioningOptions } from './types.js'; export interface BumpVersionPackage { /** info about the package */ package: WorkspacePackage; /** version before the bump */ prevVersion: string; /** * if the package was not changed by itself, * but the bump is required because of another package * that was changed depending on it, name of that package */ because?: string[]; } export interface BumpVersionResult { /** max version of all packages */ maxVersion: string; /** next version */ nextVersions: Record; /** changed packages which will be bumped to `nextVersion` */ changedPackages: BumpVersionPackage[]; /** detected release type */ releaseType: ReleaseType; /** * whether there are breaking changes * (note: will be false if release type is explicitly provided) */ hasBreakingChanges: boolean; /** * whether there are new features * (note: will be false if release type is explicitly provided) */ hasFeatures: boolean; } export declare function bumpVersion(params: { /** packages for which to generate the changelog */ workspace: WorkspacePackage[]; /** whether to bump version of all packages, not just changed ones */ all?: boolean; type?: ReleaseType; /** root of the git repo */ cwd?: string | URL; /** starting point for the changelog (defaults to latest tag) */ since: string; /** versioning params */ params?: VersioningOptions; /** whether to not actually write the files */ dryRun?: boolean; /** whether to also bump version of the root package.json */ withRoot?: boolean; }): Promise;