diff options
author | Tieg Zaharia <tieg@tidelift.com> | 2020-12-17 03:50:35 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-12-18 22:46:59 +0300 |
commit | 44d4331058c53909ada62470b23b2185102b2128 (patch) | |
tree | d7824dd3265e3e0ef3f10986e3a45aa974674565 /lib | |
parent | a9b8bf2634c627fbb16ca3a6bb2c2f1058c3e586 (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 'lib')
-rw-r--r-- | lib/deprecate.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/deprecate.js b/lib/deprecate.js index 1a46148e8..e04998645 100644 --- a/lib/deprecate.js +++ b/lib/deprecate.js @@ -58,7 +58,7 @@ const deprecate = async ([pkg, msg]) => { }) Object.keys(packument.versions) - .filter(v => semver.satisfies(v, spec)) + .filter(v => semver.satisfies(v, spec, { includePrerelease: true })) .forEach(v => { packument.versions[v].deprecated = msg }) |