/** * get the latest tag in the repository * @param cwd override the current working directory */ export declare function getLatestTag(cwd?: string | URL): Promise; /** * get hash of the first commit in the repository * @param cwd override the current working directory */ export declare function getFirstCommit(cwd?: string | URL): Promise; /** * get hash of the current commit * @param cwd override the current working directory */ export declare function getCurrentCommit(cwd?: string | URL): Promise; /** * get name of the current branch * @param cwd override the current working directory */ export declare function getCurrentBranch(cwd?: string | URL): Promise; export declare function gitTagExists(tag: string, cwd?: string | URL): Promise; /** * find changed files between two commits * * @returns list of changed files, relative to the repository root */ export declare function findChangedFiles(params: { /** starting point for the diff */ since: string; /** * ending point for the diff * * @default 'HEAD' */ until?: string; /** override the current working directory */ cwd?: string | URL; }): Promise; /** information about a commit */ export interface CommitInfo { /** full hash of the commit */ hash: string; /** author of the commit */ author: { /** name of the author */ name: string; /** email of the author */ email: string; /** date of the commit */ date: Date; }; /** committer of the commit */ committer: { /** name of the committer */ name: string; /** email of the committer */ email: string; /** date of the commit */ date: Date; }; /** commit message */ message: string; /** commit description */ description: string; } /** * get information about commits between two commits (both ends inclusive) * * @returns list of commits, in reverse chronological order */ export declare function getCommitsBetween(params: { /** starting point for the diff */ since?: string; /** only include commits that modified these files */ files?: string[]; /** * ending point for the diff * @default 'HEAD' */ until?: string; /** override the current working directory */ cwd?: string | URL; }): Promise; /** information about a conventional commit */ export interface ConventionalCommit { /** type of the commit (e.g. `feat`, `fix`, etc) */ type: string; /** scope of the commit (i.e. "scope" in `feat(scope): subject`) */ scope?: string; /** whether the commit is marked as breaking with an exclamation mark */ breaking: boolean; /** subject of the commit */ subject: string; } /** parse a conventional commit message */ export declare function parseConventionalCommit(msg: string): ConventionalCommit | null;