mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #46908 update(git-semver-tags): v4.1 update and other minor changes by @peterblazejewicz
* update(git-semver-tags): v4.1 update and other minor changes - `skipUnstable` option - definition cleanup - configuration cleanup - version bump - maintainer added https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/git-semver-tags/CHANGELOG.md Thanks! * Update types/git-semver-tags/index.d.ts thx to @JasonHK Co-authored-by: Jason Kwok <4410086+JasonHK@users.noreply.github.com> * Update types/git-semver-tags/git-semver-tags-tests.ts thx to @JasonHK Co-authored-by: Jason Kwok <4410086+JasonHK@users.noreply.github.com> Co-authored-by: Jason Kwok <4410086+JasonHK@users.noreply.github.com>
This commit is contained in:
parent
6a64372459
commit
bd4e80d5a3
@ -1,6 +1,4 @@
|
||||
"use strict";
|
||||
|
||||
import gitSemverTags from "git-semver-tags";
|
||||
import * as gitSemverTags from "git-semver-tags";
|
||||
|
||||
declare const callback: gitSemverTags.Callback;
|
||||
declare const options: gitSemverTags.Options;
|
||||
@ -8,6 +6,12 @@ declare const options: gitSemverTags.Options;
|
||||
// $ExpectType void
|
||||
gitSemverTags(callback);
|
||||
|
||||
gitSemverTags({ tagPrefix: 'skip/', skipUnstable: true }, (err, tags) => {
|
||||
if (err) {
|
||||
//
|
||||
}
|
||||
});
|
||||
|
||||
// $ExpectType void
|
||||
gitSemverTags(options, callback);
|
||||
|
||||
|
||||
14
types/git-semver-tags/index.d.ts
vendored
14
types/git-semver-tags/index.d.ts
vendored
@ -1,11 +1,14 @@
|
||||
// Type definitions for git-semver-tags 3.0
|
||||
// Type definitions for git-semver-tags 4.1
|
||||
// Project: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/git-semver-tags#readme
|
||||
// Definitions by: Jason Kwok <https://github.com/JasonHK>
|
||||
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
declare function gitSemverTags(callback: gitSemverTags.Callback): void;
|
||||
/**
|
||||
* Get all git semver tags of your repository in reverse chronological order
|
||||
*/
|
||||
declare function gitSemverTags(options: gitSemverTags.Options, callback: gitSemverTags.Callback): void;
|
||||
declare function gitSemverTags(callback: gitSemverTags.Callback): void;
|
||||
|
||||
declare namespace gitSemverTags {
|
||||
type Callback = (error: any, tags: string[]) => void;
|
||||
@ -26,6 +29,11 @@ declare namespace gitSemverTags {
|
||||
* Specify a prefix for the git tag to be ignored from the semver checks.
|
||||
*/
|
||||
tagPrefix?: string;
|
||||
|
||||
/**
|
||||
* If given, unstable tags (e.g. `x.x.x-alpha.1`, `x.x.x-rc.2`) will be skipped.
|
||||
*/
|
||||
skipUnstable?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"esModuleInterop": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user