Socket
Socket
Sign inDemoInstall

semver

Package Overview
Dependencies
Maintainers
1
Versions
108
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 1.1.2 to 1.1.3

2

package.json
{
"name": "semver",
"version": "1.1.2",
"version": "1.1.3",
"description": "The semantic version parser used by npm.",

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

@@ -87,3 +87,3 @@ ;(function (exports) { // nothing in here is node-specific.

, starReplace = ""
, compTrimExpression = new RegExp("((<|>)?=?)\\s*("
, compTrimExpression = new RegExp("((<|>)?=|<|>)\\s*("
+semver+"|"+xRangePlain+")", "g")

@@ -153,3 +153,2 @@ , compTrimReplace = "$1$3"

}
//console.error("parseXRange", [].slice.call(arguments), ret)
return ret

@@ -156,0 +155,0 @@ })

@@ -20,2 +20,4 @@ var tap = require("tap")

test("\ncomparison tests", function (t) {
// [version1, version2]
// version1 should be greater than version2
; [ ["0.0.0", "0.0.0foo"]

@@ -65,2 +67,4 @@ , ["0.0.1", "0.0.0"]

test("\nequality tests", function (t) {
// [version1, version2]
// version1 should be equivalent to version2
; [ ["1.2.3", "v1.2.3"]

@@ -117,2 +121,4 @@ , ["1.2.3", "=1.2.3"]

test("\nrange tests", function (t) {
// [range, version]
// version should be included by range
; [ ["1.0.0 - 2.0.0", "1.2.3"]

@@ -183,2 +189,12 @@ , ["1.0.0", "1.0.0"]

, ["<=0.7.x", "0.6.2"]
, ["~1.2.1 >=1.2.3", "1.2.3"]
, ["~1.2.1 =1.2.3", "1.2.3"]
, ["~1.2.1 1.2.3", "1.2.3"]
, ['~1.2.1 >=1.2.3 1.2.3', '1.2.3']
, ['~1.2.1 1.2.3 >=1.2.3', '1.2.3']
, ['~1.2.1 1.2.3', '1.2.3']
, ['>=1.2.1 1.2.3', '1.2.3']
, ['1.2.3 >=1.2.1', '1.2.3']
, ['>=1.2.3 >=1.2.1', '1.2.3']
, ['>=1.2.1 >=1.2.3', '1.2.3']
].forEach(function (v) {

@@ -191,2 +207,4 @@ t.ok(satisfies(v[1], v[0]), v[0]+" satisfied by "+v[1])

test("\nnegative range tests", function (t) {
// [range, version]
// version should not be included by range
; [ ["1.0.0 - 2.0.0", "2.2.3"]

@@ -244,2 +262,4 @@ , ["1.0.0", "1.0.1"]

test("\nincrement versions test", function (t) {
// [version, inc, result]
// inc(version, inc) -> result
; [ [ "1.2.3", "major", "2.0.0" ]

@@ -266,2 +286,3 @@ , [ "1.2.3", "minor", "1.3.0" ]

test("\nreplace stars test", function (t) {
// replace stars with ""
; [ [ "", "" ]

@@ -281,2 +302,5 @@ , [ "*", "" ]

test("\nvalid range test", function (t) {
// [range, result]
// validRange(range) -> result
// translate ranges into their canonical form
; [ ["1.0.0 - 2.0.0", ">=1.0.0 <=2.0.0"]

@@ -348,2 +372,4 @@ , ["1.0.0", "1.0.0"]

test("\ncomparators test", function (t) {
// [range, comparators]
// turn range into a set of individual comparators
; [ ["1.0.0 - 2.0.0", [[">=1.0.0", "<=2.0.0"]] ]

@@ -410,2 +436,3 @@ , ["1.0.0", [["1.0.0"]] ]

, ["1", [[">=1.0.0-", "<2.0.0-"]] ]
, ["1 2", [[">=1.0.0-", "<2.0.0-", ">=2.0.0-", "<3.0.0-"]] ]
].forEach(function (v) {

@@ -412,0 +439,0 @@ t.equivalent(toComparators(v[0]), v[1], "toComparators("+v[0]+") === "+JSON.stringify(v[1]))

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc