go more uniform in the way the smartversion class is structured
This commit is contained in:
parent
54c9f34c33
commit
8bd800ae3f
8
dist/index.d.ts
vendored
8
dist/index.d.ts
vendored
@ -11,6 +11,14 @@ export declare class SmartVersion {
|
||||
readonly major: number;
|
||||
readonly minor: number;
|
||||
readonly patch: number;
|
||||
greaterThan(smartVersionArg: SmartVersion): boolean;
|
||||
/**
|
||||
* compares the version of this against a string
|
||||
*/
|
||||
greaterThanString(versionStringArg: any): boolean;
|
||||
lessThan(smartVersionArg: SmartVersion): boolean;
|
||||
/**
|
||||
* compares the version of this against a string
|
||||
*/
|
||||
lessThanString(versionStringArg: any): boolean;
|
||||
}
|
||||
|
14
dist/index.js
vendored
14
dist/index.js
vendored
@ -26,12 +26,24 @@ class SmartVersion {
|
||||
get patch() {
|
||||
return this.semver.patch;
|
||||
}
|
||||
greaterThan(smartVersionArg) {
|
||||
return this.greaterThanString(smartVersionArg.versionString);
|
||||
}
|
||||
/**
|
||||
* compares the version of this against a string
|
||||
*/
|
||||
greaterThanString(versionStringArg) {
|
||||
return plugins.semver.gt(this.versionString, versionStringArg);
|
||||
}
|
||||
lessThan(smartVersionArg) {
|
||||
return this.lessThanString(smartVersionArg.versionString);
|
||||
}
|
||||
/**
|
||||
* compares the version of this against a string
|
||||
*/
|
||||
lessThanString(versionStringArg) {
|
||||
return plugins.semver.lt(this.versionString, versionStringArg);
|
||||
}
|
||||
}
|
||||
exports.SmartVersion = SmartVersion;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLGtEQUFpRDtBQUlqRDtJQWVFLFlBQWEsZUFBdUI7UUFacEMsV0FBTSxHQUFHO1lBQ1AsS0FBSyxFQUFFO2dCQUNMLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxHQUFHLEl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UIsQ0FBQztJQUVELElBQUksS0FBSztRQUNQLE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQTtJQUMxQixDQUFDO0lBRUQsSUFBSSxLQUFLO1FBQ1AsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFBO0lBQzFCLENBQUM7SUFFRCxXQUFXLENBQUUsZUFBNkI7UUFDeEMsTUFBTSxDQUFDLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxlQUFlLENBQUMsYUFBYSxDQUFDLENBQUE7SUFDOUQsQ0FBQztJQUVEOztPQUVHO0lBQ0gsaUJBQWlCLENBQUUsZ0JBQWdCO1FBQ2pDLE1BQU0sQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsYUFBYSxFQUFFLGdCQUFnQixDQUFDLENBQUE7SUFDaEUsQ0FBQztJQUVELFFBQVEsQ0FBRSxlQUE2QjtRQUNyQyxNQUFNLENBQUMsSUFBSSxDQUFDLGNBQWMsQ0FBQyxlQUFlLENBQUMsYUFBYSxDQUFDLENBQUE7SUFDM0QsQ0FBQztJQUVEOztPQUVHO0lBQ0gsY0FBYyxDQUFFLGdCQUFnQjtRQUM5QixNQUFNLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLGFBQWEsRUFBRSxnQkFBZ0IsQ0FBQyxDQUFBO0lBQ2hFLENBQUM7Q0FFRjtBQXRERCxvQ0FzREMifQ==
|
14
ts/index.ts
14
ts/index.ts
@ -34,10 +34,24 @@ export class SmartVersion {
|
||||
return this.semver.patch
|
||||
}
|
||||
|
||||
greaterThan (smartVersionArg: SmartVersion) {
|
||||
return this.greaterThanString(smartVersionArg.versionString)
|
||||
}
|
||||
|
||||
/**
|
||||
* compares the version of this against a string
|
||||
*/
|
||||
greaterThanString (versionStringArg) {
|
||||
return plugins.semver.gt(this.versionString, versionStringArg)
|
||||
}
|
||||
|
||||
lessThan (smartVersionArg: SmartVersion) {
|
||||
return this.lessThanString(smartVersionArg.versionString)
|
||||
}
|
||||
|
||||
/**
|
||||
* compares the version of this against a string
|
||||
*/
|
||||
lessThanString (versionStringArg) {
|
||||
return plugins.semver.lt(this.versionString, versionStringArg)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user