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 /node_modules/semver/README.md | |
parent | 7c1299d00538ea998684a1903a4091eafc63b7f1 (diff) |
semver@4.1.1
Minor documentation changes to sync up with 7c1299d.
Diffstat (limited to 'node_modules/semver/README.md')
-rw-r--r-- | node_modules/semver/README.md | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/node_modules/semver/README.md b/node_modules/semver/README.md index 7e1961d45..5e2862f1a 100644 --- a/node_modules/semver/README.md +++ b/node_modules/semver/README.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 @@ -161,8 +185,6 @@ comparator. Allows minor-level changes if not. `1.2.4-beta.2` would not, because it is a prerelease of a different `[major, minor, patch]` tuple. -Note: this is the same as the `~>` operator in rubygems. - #### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` Allows changes that do not modify the left-most non-zero digit in the |