🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

semver

Package Overview
Dependencies
Maintainers
4
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

semver - npm Package Compare versions

Comparing version
7.8.4
to
7.8.5
+6
-2
classes/range.js

@@ -302,2 +302,6 @@ 'use strict'

const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
// if we're including prereleases in the match, then the lower bound is
// -0, the lowest possible prerelease value, just like x-ranges and carets.
// this keeps `~1.2` equivalent to the `1.2.x` x-range it's documented as.
const z = options.includePrerelease ? '-0' : ''
return comp.replace(r, (_, M, m, p, pr) => {

@@ -310,6 +314,6 @@ debug('tilde', comp, _, M, m, p, pr)

} else if (isX(m)) {
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
} else if (isX(p)) {
// ~1.2 == >=1.2.0 <1.3.0-0
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
} else if (pr) {

@@ -316,0 +320,0 @@ debug('replaceTilde pr', pr)

{
"name": "semver",
"version": "7.8.4",
"version": "7.8.5",
"description": "The semantic version parser used by npm.",

@@ -5,0 +5,0 @@ "main": "index.js",