From 9f3dbc8d22ab93a0d56568b95b79257d58a58545 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 8 Oct 2018 22:14:16 -0600 Subject: [PATCH] v1.1.4: tighten matching that was too relaxed in v1.1.3 --- package.json | 2 +- semver-utils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 25b6558..3630557 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "semver-utils", - "version": "1.1.3", + "version": "1.1.4", "description": "Tools for manipulating semver strings and objects", "homepage": "https://git.coolaj86.com/coolaj86/semver-utils.js", "main": "semver-utils.js", diff --git a/semver-utils.js b/semver-utils.js index e7a3a1f..ec502ce 100644 --- a/semver-utils.js +++ b/semver-utils.js @@ -8,7 +8,7 @@ // | | | |optional build prefixed by '+' var reSemver = /^v?((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?$/ //, reSemverRange = /\s*((\|\||\-)|(([<>~]?=?)\s*(v)?([0-9]+)(\.(x|[0-9]+))?(\.(x|[0-9]+))?(([\-+])([a-zA-Z0-9\.]+))?))\s*/g - , reSemverRange = /\s*((\|\||\-)|(([<>~^]*=?)\s*(v)?([0-9]+)(\.(x|\*|[0-9]+))?(\.(x|\*|[0-9]+))?(([\-+])([a-zA-Z0-9\.-]+))?))\s*/g + , reSemverRange = /\s*((\|\||\-)|(((?:(?:~?[<>]?)|\^?)=?)\s*(v)?([0-9]+)(\.(x|\*|[0-9]+))?(\.(x|\*|[0-9]+))?(([\-+])([a-zA-Z0-9\.-]+))?))\s*/g ; // Returns a new object with all of the undefined properties removed from the given object