From 0ee7ffb5e5d64cc7ccd0e841a456dab34a61cfcc Mon Sep 17 00:00:00 2001 From: mw75 Date: Mon, 15 May 2017 14:57:35 +0200 Subject: [PATCH] Version check no meta (#1243) * Version check on module loading - remove all metadata information bevor comparing the versions. * refined regex --- red/runtime/nodes/registry/loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/red/runtime/nodes/registry/loader.js b/red/runtime/nodes/registry/loader.js index 124fd8e2e..817b18668 100644 --- a/red/runtime/nodes/registry/loader.js +++ b/red/runtime/nodes/registry/loader.js @@ -116,7 +116,7 @@ function loadNodeFiles(nodeFiles) { /* istanbul ignore else */ if (nodeFiles.hasOwnProperty(module)) { if (nodeFiles[module].redVersion && - !semver.satisfies(runtime.version().replace("-git",""), nodeFiles[module].redVersion)) { + !semver.satisfies(runtime.version().replace(/(\-[1-9A-Za-z-][0-9A-Za-z-\.]*)?(\+[0-9A-Za-z-\.]+)?$/,""), nodeFiles[module].redVersion)) { //TODO: log it runtime.log.warn("["+module+"] "+runtime.log._("server.node-version-mismatch",{version:nodeFiles[module].redVersion})); continue;