diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-12-19 16:03:37 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2014-12-19 16:03:37 +0300 |
commit | 7dfdcc6debd8ef1fc52a2b508997d15887aad824 (patch) | |
tree | 161f1b4264a74e0b4c4136142e7e84e42ea084ec /doc | |
parent | 7c1299d00538ea998684a1903a4091eafc63b7f1 (diff) |
semver@4.1.1
Minor documentation changes to sync up with 7c1299d.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/misc/semver.md | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/doc/misc/semver.md b/doc/misc/semver.md index 909b0cf66..7bfc1cb16 100644 --- a/doc/misc/semver.md +++ b/doc/misc/semver.md @@ -16,12 +16,12 @@ As a command-line utility: $ semver -h - Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | -d <dec>] + Usage: semver <version> [<version> [...]] [-r <range> | -i <inc> | --preid <identifier> | -l | -rv] Test if version(s) satisfy the supplied range(s), and sort them. Multiple versions or ranges may be supplied, unless increment - or decrement options are specified. In that case, only a single - version may be used, and it is incremented by the specified level + option is specified. In that case, only a single version may + be used, and it is incremented by the specified level Program exits successfully if any valid version satisfies all supplied ranges, and prints all satisfying versions. @@ -101,6 +101,30 @@ the user is indicating that they are aware of the risk. However, it is still not appropriate to assume that they have opted into taking a similar risk on the *next* set of prerelease versions. +#### Prerelease Identifiers + +The method `.inc` takes an additional `identifier` string argument that +will append the value of the string as a prerelease identifier: + +````javascript +> semver.inc('1.2.3', 'pre', 'beta') +'1.2.4-beta.0' +``` + +command-line example: + +```shell +$ semver 1.2.3 -i prerelease --preid beta +1.2.4-beta.0 +``` + +Which then can be used to increment further: + +```shell +$ semver 1.2.4-beta.0 -i prerelease +1.2.4-beta.1 +``` + ### Advanced Range Syntax Advanced range syntax desugars to primitive comparators in |