semantic-version/lib/VersionResult.js
Paul Hatcherian 31f4e3fdf0 Rewrite/refactor for v5, migrate to TypeScript (MAJOR)
Set Jest config file in package script

Include module path

Include tests in project folders

Remove index module exports

Hardcode configuration parameters

Move parameter binding into main run function

Use alias imports

Run test sequentially

Remove cleanup (async conflict)

Revert Jest option

Increase test timeout to 15 seconds
2022-04-03 20:28:28 -04:00

30 lines
1.3 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VersionResult = void 0;
/** Represents the total output for the action */
class VersionResult {
/**
* Creates a new result instance
* @param major - The major version number
* @param minor - The minor version number
* @param patch - The patch version number
* @param increment - The number of commits for this version (usually used to create version suffix)
* @param formattedVersion - The formatted semantic version
* @param versionTag - The string to be used as a Git tag
* @param changed - True if the version was changed, otherwise false
* @param authors - Authors formatted according to the format mode (e.g. JSON, CSV, YAML, etc.)
* @param currentCommit - The current commit hash
*/
constructor(major, minor, patch, increment, formattedVersion, versionTag, changed, authors, currentCommit) {
this.major = major;
this.minor = minor;
this.patch = patch;
this.increment = increment;
this.formattedVersion = formattedVersion;
this.versionTag = versionTag;
this.changed = changed;
this.authors = authors;
this.currentCommit = currentCommit;
}
}
exports.VersionResult = VersionResult;