Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

semver

Package Overview
Dependencies
Maintainers
6
Versions
115
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.7.2
to
7.7.3
+1
-0
classes/range.js

@@ -258,2 +258,3 @@ 'use strict'

const parseComparator = (comp, options) => {
comp = comp.replace(re[t.BUILD], '')
debug('comp', comp, options)

@@ -260,0 +261,0 @@ comp = replaceCarets(comp, options)

+19
-5

@@ -114,7 +114,21 @@ 'use strict'

return (
compareIdentifiers(this.major, other.major) ||
compareIdentifiers(this.minor, other.minor) ||
compareIdentifiers(this.patch, other.patch)
)
if (this.major < other.major) {
return -1
}
if (this.major > other.major) {
return 1
}
if (this.minor < other.minor) {
return -1
}
if (this.minor > other.minor) {
return 1
}
if (this.patch < other.patch) {
return -1
}
if (this.patch > other.patch) {
return 1
}
return 0
}

@@ -121,0 +135,0 @@

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

const compareIdentifiers = (a, b) => {
if (typeof a === 'number' && typeof b === 'number') {
return a === b ? 0 : a < b ? -1 : 1
}
const anum = numeric.test(a)

@@ -7,0 +11,0 @@ const bnum = numeric.test(b)

{
"name": "semver",
"version": "7.7.2",
"version": "7.7.3",
"description": "The semantic version parser used by npm.",

@@ -18,3 +18,3 @@ "main": "index.js",

"@npmcli/eslint-config": "^5.0.0",
"@npmcli/template-oss": "4.24.3",
"@npmcli/template-oss": "4.25.1",
"benchmark": "^2.1.4",

@@ -56,3 +56,3 @@ "tap": "^16.0.0"

"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.24.3",
"version": "4.25.1",
"engines": ">=10",

@@ -59,0 +59,0 @@ "distPaths": [