Skip to content

Commit

Permalink
export new RELEASE_TYPES constant
Browse files Browse the repository at this point in the history
...Which will help library consumers better integrate semver into their apps.

Possible usecases of consuming this constant:

- Automatically show a dropdown of available release types that conform to the semver spec
- Validate user inputs where a release type is expected
  • Loading branch information
hcharley committed Jul 12, 2019
1 parent 9f5f615 commit 6bc60b7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions semver.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ if (typeof process === 'object' &&
// Note: this is the semver.org version of the spec that it implements
// Not necessarily the package version of this code.
exports.SEMVER_SPEC_VERSION = '2.0.0'
exports.RELEASE_TYPES = [
"major",
"premajor",
"minor",
"preminor",
"patch",
"prepatch",
"prerelease"
];

var MAX_LENGTH = 256
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
Expand Down

0 comments on commit 6bc60b7

Please sign in to comment.