import * as ConventionalCommit from '../lib/conventional-commit'; import * as Git from '../lib/git'; import * as Semver from '../lib/semver'; export declare type Release = { bumpType: Semver.MajMinPat; version: Semver.Ver; }; export declare function shortSha(c: Commit): string; /** * Get the previous stable and commits since then. If there is no previous * stable then commits are counted from start of history. */ export declare function getCurrentSeries(input: { cwd: string; }): Promise; /** * Like `getLog` but works on the given data. Useful for unit testing with mock * log data. */ export declare function fromLogs(entries: Git.LogEntry[]): Series; /** * Get the current commit. */ export declare function getCurrentCommit(): Promise; declare type CommitBase = { message: { raw: string; parsed: null | ConventionalCommit.ConventionalCommit; }; sha: string; nonReleaseTags: string[]; }; export declare type Commit = CommitBase & { releases: { stable: null | Semver.StableVer; preview: null | Semver.PreviewVer; }; }; export declare type StableCommit = CommitBase & { releases: { stable: Semver.StableVer; preview: null; }; }; export declare type PreviewCommit = CommitBase & { releases: { stable: null; preview: Semver.PreviewVer; }; }; export declare type MaybePreviewCommit = CommitBase & { releases: { stable: null; preview: null | Semver.PreviewVer; }; }; export declare type UnreleasedCommit = CommitBase & { releases: { stable: null; preview: null; }; }; export declare type Series = { previousStable: null | StableCommit; commitsInNextStable: MaybePreviewCommit[]; previousPreview: null | PreviewCommit; commitsInNextPreview: UnreleasedCommit[]; current: Commit; hasBreakingChange: boolean; isInitialDevelopment: boolean; }; export declare type SeriesLog = [null | Git.LogEntry, Git.LogEntry[]]; /** * Build structured series data from a raw series log. */ export declare function buildSeries([previousStableLogEntry, commitsSincePrevStable]: SeriesLog): Series; export declare type NoReleaseReason = 'empty_series' | 'no_meaningful_change'; export declare function isNoReleaseReason(x: unknown): x is NoReleaseReason; /** * Get the next stable from a given series. If a release cannot be made for the * given series then a code indicating why will be returned. */ export declare function getNextStable(series: Series): NoReleaseReason | Release; /** * Calculate the preview release for the given series. */ export declare function getNextPreview(series: Series): NoReleaseReason | Release; export {}; /** * Get the releases at the given commit. */ //# sourceMappingURL=release.d.ts.map