Constructor
new Semver(preReleaseVersion, releaseIncrementTypeopt, postReleaseIncrementTypeopt)
Calculate release and post-release versions from the current
pre-release version.
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
preReleaseVersion |
String
|
current pre-release version, e.g. 1.2.3-pre.0 | ||
releaseIncrementType |
String
|
<optional> |
minor | major, minor, or patch, where patch releases the current version without incrementing it |
postReleaseIncrementType |
String
|
<optional> |
patch | major, minor, or patch increment applied to the release version to get the next pre-release version |
Methods
getPostReleaseVersion() → {String}
Get post-release version, i.e. the next pre-release version.
- Source:
Returns:
- Type:
-
String
post-release version, e.g. 1.3.1-pre.0
getReleaseVersion() → {String}
Get release version.
- Source:
Returns:
- Type:
-
String
release version, e.g. 1.3.0