Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 41f1552

Browse filesBrowse files
author
Audrey Eschright
committed
deps: updating semver docs
1 parent 887e943 commit 41f1552
Copy full SHA for 41f1552

File tree

Expand file treeCollapse file tree

1 file changed

+16
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+16
-5
lines changed

‎doc/misc/semver.md

Copy file name to clipboardExpand all lines: doc/misc/semver.md
+16-5Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ As a command-line utility:
2929
```
3030
$ semver -h
3131

32-
SemVer 5.3.0
33-
3432
A JavaScript implementation of the http://semver.org/ specification
3533
Copyright Isaac Z. Schlueter
3634

@@ -54,6 +52,9 @@ Options:
5452
-l --loose
5553
Interpret versions and ranges loosely
5654

55+
-p --include-prerelease
56+
Always include prerelease versions in range matching
57+
5758
-c --coerce
5859
Coerce a string into SemVer if possible
5960
(does not imply --loose)
@@ -289,9 +290,19 @@ part ::= nr | [-0-9A-Za-z]+
289290

290291
## Functions
291292

292-
All methods and classes take a final `loose` boolean argument that, if
293-
true, will be more forgiving about not-quite-valid semver strings.
294-
The resulting output will always be 100% strict, of course.
293+
All methods and classes take a final `options` object argument. All
294+
options in this object are `false` by default. The options supported
295+
are:
296+
297+
- `loose` Be more forgiving about not-quite-valid semver strings.
298+
(Any resulting output will always be 100% strict compliant, of
299+
course.) For backwards compatibility reasons, if the `options`
300+
argument is a boolean value instead of an object, it is interpreted
301+
to be the `loose` param.
302+
- `includePrerelease` Set to suppress the [default
303+
behavior](https://github.com/npm/node-semver#prerelease-tags) of
304+
excluding prerelease tagged versions from ranges unless they are
305+
explicitly opted into.
295306

296307
Strict-mode Comparators and Ranges will be strict about the SemVer
297308
strings that they parse.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.