UNPKG

1.42 kBTypeScriptView Raw
1// Type definitions for git-semver-tags 4.1
2// Project: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/git-semver-tags#readme
3// Definitions by: Jason Kwok <https://github.com/JasonHK>
4// Piotr Błażejewicz <https://github.com/peterblazejewicz>
5// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
7/**
8 * Get all git semver tags of your repository in reverse chronological order
9 */
10declare function gitSemverTags(options: gitSemverTags.Options, callback: gitSemverTags.Callback): void;
11declare function gitSemverTags(callback: gitSemverTags.Callback): void;
12
13declare namespace gitSemverTags {
14 type Callback = (error: any, tags: string[]) => void;
15
16 interface Options {
17 /**
18 * Extract lerna style tags (`foo-package@2.0.0`) from the git history, rather
19 * than `v1.0.0` format.
20 */
21 lernaTags?: boolean | undefined;
22
23 /**
24 * What package should lerna style tags be listed for, e.g., `foo-package`.
25 */
26 package?: string | undefined;
27
28 /**
29 * Specify a prefix for the git tag to be ignored from the semver checks.
30 */
31 tagPrefix?: string | undefined;
32
33 /**
34 * If given, unstable tags (e.g. `x.x.x-alpha.1`, `x.x.x-rc.2`) will be skipped.
35 */
36 skipUnstable?: boolean | undefined;
37 }
38}
39
40export = gitSemverTags;