cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cordova-lib git commit: enhance version -dev stripping code
Date Tue, 25 Apr 2017 05:53:33 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master 7b2d35f0d -> 8408e7090


enhance version -dev stripping code


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/8408e709
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/8408e709
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/8408e709

Branch: refs/heads/master
Commit: 8408e709046364896909efbd5f3fd10bd00b75f2
Parents: 7b2d35f
Author: Steve Gill <stevengill97@gmail.com>
Authored: Mon Apr 24 22:50:00 2017 -0700
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Mon Apr 24 22:50:00 2017 -0700

----------------------------------------------------------------------
 cordova-lib/src/plugman/install.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/8408e709/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js
index e924381..fca77c6 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -556,11 +556,13 @@ function installDependency(dep, install, options) {
         }
         //strip -dev from the installed plugin version so it properly passes
         //semver.satisfies 
+        var stripped_version;
         if(version_installed.includes('-dev')) {
-            version_installed = semver.inc(version_installed, 'patch');
+            stripped_version = semver.inc(version_installed, 'patch');
         }
         if (options.force || 
-            semver.satisfies(version_installed, version_required, /*loose=*/true) || 
+            semver.satisfies(version_installed, version_required, /*loose=*/true) ||
+            semver.satisfies(stripped_version, version_required, /*loose=*/true) ||
             version_required === null || 
             version_required === undefined ||
             version_required === '' ) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message