keep-a-changelog
Version:
Parse and generate changelogs following the [keepachangelog](https://keepachangelog.com/) format.
30 lines (29 loc) • 1.17 kB
TypeScript
import type Change from "./Change.d.ts";
import type Changelog from "./Changelog.d.ts";
import type { SemVer } from "./deps.d.ts";
export default class Release {
changelog?: Changelog;
parsedVersion?: SemVer;
date?: Date;
yanked: boolean;
description: string;
changes: Map<string, Change[]>;
constructor(version?: string | SemVer, date?: string | Date, description?: string);
get version(): string | undefined;
compare(release: Release): number;
combineChanges(changes: Map<string, Change[]>): this;
isEmpty(): boolean;
setVersion(version?: string | SemVer): void;
setDate(date?: Date | string): void;
setYanked(yanked?: boolean): this;
addChange(type: string, change: Change | string): this;
added(change: Change | string): this;
changed(change: Change | string): this;
deprecated(change: Change | string): this;
removed(change: Change | string): this;
fixed(change: Change | string): this;
security(change: Change | string): this;
toString(changelog?: Changelog): string;
getCompareLink(changelog?: Changelog): string | undefined;
getLinks(changelog: Changelog): string[];
}