fix: support semver.inc() with 3 args (#38130)

fix: support semver.inc() with 3 args

fix: support semver.inc() with 3 args
This commit is contained in:
Valerii Vasin
2019-09-05 11:08:35 -07:00
committed by Andrew Casey
parent aff2133a93
commit ac9feceeb3
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -31,6 +31,11 @@ export function clean(version: string, optionsOrLoose?: boolean | Options): stri
* Return the version incremented by the release type (major, minor, patch, or prerelease), or null if it's not valid.
*/
export function inc(v: string | SemVer, release: ReleaseType, optionsOrLoose?: boolean | Options, identifier?: string): string | null;
export function inc(
v: string | SemVer,
release: ReleaseType,
identifier?: string,
): string | null;
/**
* Return the major version number.
*/
+1
View File
@@ -38,6 +38,7 @@ strn = semver.inc(str, "patch", loose);
strn = semver.inc(str, "prepatch", loose);
strn = semver.inc(str, "prerelease", loose);
strn = semver.inc(str, "prerelease", loose, "alpha");
strn = semver.inc(str, 'prerelease', 'beta');
num = semver.major(str, loose);
num = semver.minor(str, loose);
num = semver.patch(str, loose);