Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAudrey Eschright <audrey@npmjs.com>2019-01-09 04:06:22 +0300
committerAudrey Eschright <audrey@npmjs.com>2019-01-09 04:06:22 +0300
commit41f15524c58c59d206c4b1d25ae9e0f22745213b (patch)
tree24b9952d7eb1225c00a05d3bbdc035655b21d84f /doc
parent887e94386f42cb59a5628e7762b3662d084b23c8 (diff)
deps: updating semver docs
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/semver.md21
1 files changed, 16 insertions, 5 deletions
diff --git a/doc/misc/semver.md b/doc/misc/semver.md
index 1c2dbf55b..2c856d800 100644
--- a/doc/misc/semver.md
+++ b/doc/misc/semver.md
@@ -29,8 +29,6 @@ As a command-line utility:
```
$ semver -h
-SemVer 5.3.0
-
A JavaScript implementation of the http://semver.org/ specification
Copyright Isaac Z. Schlueter
@@ -54,6 +52,9 @@ Options:
-l --loose
Interpret versions and ranges loosely
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
-c --coerce
Coerce a string into SemVer if possible
(does not imply --loose)
@@ -289,9 +290,19 @@ part ::= nr | [-0-9A-Za-z]+
## Functions
-All methods and classes take a final `loose` boolean argument that, if
-true, will be more forgiving about not-quite-valid semver strings.
-The resulting output will always be 100% strict, of course.
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose` Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease` Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
Strict-mode Comparators and Ranges will be strict about the SemVer
strings that they parse.