From 8bfaff0cce8f9fceb32c74f38c466b2ffae9fd04 Mon Sep 17 00:00:00 2001 From: liabru Date: Sun, 21 Nov 2021 16:51:19 +0000 Subject: [PATCH] added support for build metadata in Plugin.versionParse --- src/core/Plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/Plugin.js b/src/core/Plugin.js index d3265c7f..4513cee5 100644 --- a/src/core/Plugin.js +++ b/src/core/Plugin.js @@ -240,7 +240,7 @@ var Common = require('./Common'); */ Plugin.dependencyParse = function(dependency) { if (Common.isString(dependency)) { - var pattern = /^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-]+)?))?$/; + var pattern = /^[\w-]+(@(\*|[\^~]?\d+\.\d+\.\d+(-[0-9A-Za-z-+]+)?))?$/; if (!pattern.test(dependency)) { Common.warn('Plugin.dependencyParse:', dependency, 'is not a valid dependency string.'); @@ -275,7 +275,7 @@ var Common = require('./Common'); * @return {object} The version range parsed into its components. */ Plugin.versionParse = function(range) { - var pattern = /^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-]+)?$/; + var pattern = /^(\*)|(\^|~|>=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/; if (!pattern.test(range)) { Common.warn('Plugin.versionParse:', range, 'is not a valid version or range.');