From e79ccee1685393e4ec73746bac93835cbcf3a809 Mon Sep 17 00:00:00 2001 From: Forrest L Norvell Date: Thu, 8 Jan 2015 14:37:26 -0800 Subject: npm: upgrade to v2.1.18 PR-URL: https://github.com/iojs/io.js/pull/266 Reviewed-By: Ben Noordhuis --- deps/npm/html/doc/misc/semver.html | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'deps/npm/html/doc/misc/semver.html') diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index eeea8fbc40..3b1556041e 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -22,12 +22,12 @@ semver.lt('1.2.3', '9.8.7') // true

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.
@@ -91,6 +91,20 @@ alpha/beta/rc versions.  By including a prerelease tag in the range,
 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:

+
> semver.inc('1.2.3', 'pre', 'beta')
+'1.2.4-beta.0'
+
+

command-line example:

+
$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+
+

Which then can be used to increment further:

+
$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+

Advanced Range Syntax

Advanced range syntax desugars to primitive comparators in deterministic ways.

@@ -145,7 +159,6 @@ equal to beta.2. So, 1.2.3-beta.4 would be allowed, b 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 [major, minor, patch] tuple. In other words, this allows patch and @@ -225,6 +238,9 @@ invalid comparison string is provided. v2 is greater. Sorts in ascending order if passed to Array.sort().

  • rcompare(v1, v2): The reverse of compare. Sorts an array of versions in descending order when passed to Array.sort().
  • +
  • diff(v1, v2): Returns difference between two versions by the release type +(major, premajor, minor, preminor, patch, prepatch, or prerelease), +or null if the versions are the same.
  • Ranges

      @@ -263,5 +279,5 @@ range, use the satisfies(version, range) function.

             - + -- cgit v1.2.1