🤖 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:
Piotr Błażejewicz (Peter Blazejewicz) 2020-09-03 23:03:23 +02:00 committed by GitHub
parent 6a64372459
commit bd4e80d5a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 7 deletions

View File

@ -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);

View File

@ -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;
}
}

View File

@ -8,7 +8,6 @@
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"esModuleInterop": true,
"baseUrl": "../",
"typeRoots": [
"../"