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/docs
diff options
context:
space:
mode:
authorTieg Zaharia <tieg@tidelift.com>2020-12-17 03:50:35 +0300
committerisaacs <i@izs.me>2020-12-18 22:46:59 +0300
commit44d4331058c53909ada62470b23b2185102b2128 (patch)
treed7824dd3265e3e0ef3f10986e3a45aa974674565 /docs
parenta9b8bf2634c627fbb16ca3a6bb2c2f1058c3e586 (diff)
Include prerelease versions when deprecating
PR-URL: https://github.com/npm/cli/pull/2366 Credit: @tiegz Close: #2366 Reviewed-by: @isaacs EDIT(@isaacs): updated to make _all_ deprecation ranges include prereleases. If `foo@*` would be expected to deprecate `foo@1.0.0-beta`, then presumably `foo@1.x` has the same expectation.
Diffstat (limited to 'docs')
-rw-r--r--docs/content/commands/npm-deprecate.md15
1 files changed, 12 insertions, 3 deletions
diff --git a/docs/content/commands/npm-deprecate.md b/docs/content/commands/npm-deprecate.md
index d0440efe8..139441856 100644
--- a/docs/content/commands/npm-deprecate.md
+++ b/docs/content/commands/npm-deprecate.md
@@ -7,7 +7,7 @@ description: Deprecate a version of a package
### Synopsis
```bash
-npm deprecate <pkg>[@<version>] <message>
+npm deprecate <pkg>[@<version range>] <message>
```
### Description
@@ -22,8 +22,17 @@ versions, so you can do something like this:
npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
```
-Note that you must be the package owner to deprecate something. See the
-`owner` and `adduser` help topics.
+SemVer ranges passed to this command are interpreted such that they *do*
+include prerelease versions. For example:
+
+```bash
+npm deprecate my-thing@1.x "1.x is no longer supported"
+```
+
+In this case, a version `my-thing@1.0.0-beta.0` will also be deprecated.
+
+You must be the package owner to deprecate something. See the `owner` and
+`adduser` help topics.
To un-deprecate a package, specify an empty string (`""`) for the `message`
argument. Note that you must use double quotes with no space between them to