You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/03/19 01:56:49 UTC

[02/37] cordova-lib git commit: CB-10550 Fix plugin id mapper not enforced when a version is specified

CB-10550 Fix plugin id mapper not enforced when a version is specified


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

Branch: refs/heads/common-1.1.x
Commit: 87d8e171a1f0eaa252d6d2510190b51bd56d48ae
Parents: 69178cf
Author: Byoungro So <by...@intel.com>
Authored: Sun Feb 14 12:52:10 2016 -0800
Committer: Tim Barham <ti...@microsoft.com>
Committed: Wed Feb 17 13:48:14 2016 +1000

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


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/87d8e171/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
index dc8e28c..8a48626 100644
--- a/cordova-lib/src/plugman/fetch.js
+++ b/cordova-lib/src/plugman/fetch.js
@@ -132,10 +132,14 @@ function fetchPlugin(plugin_src, plugins_dir, options) {
                 ));
             }
             // If not found in local search path, fetch from the registry.
-            var newID = pluginMapperotn[plugin_src];
+            var splitVersion = plugin_src.split('@');
+            var newID = pluginMapperotn[splitVersion[0]];
             if(newID) {
-                events.emit('warn', 'Notice: ' + plugin_src + ' has been automatically converted to ' + newID + ' to be fetched from npm. This is due to our old plugins registry shutting down.');                
+                events.emit('warn', 'Notice: ' + splitVersion[0] + ' has been automatically converted to ' + newID + ' to be fetched from npm. This is due to our old plugins registry shutting down.');
                 plugin_src = newID;
+                if (splitVersion[1]) {
+                    plugin_src += '@'+splitVersion[1];
+                }
             } 
             return registry.fetch([plugin_src])
             .fail(function (error) {


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