cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [1/3] cordova-lib git commit: CB-9589 added more warnings and added conversion step to fetch.js
Date Wed, 07 Oct 2015 05:28:04 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master ff0fd6e2e -> 3e3d4c60b


CB-9589 added more warnings and added conversion step to fetch.js


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

Branch: refs/heads/master
Commit: 3e3d4c60be21f893c52ca4ebb895119befcbb658
Parents: 1c0810a
Author: Steve Gill <stevengill97@gmail.com>
Authored: Mon Oct 5 17:17:20 2015 -0700
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Tue Oct 6 17:40:12 2015 -0700

----------------------------------------------------------------------
 cordova-lib/src/plugman/fetch.js     | 7 ++++++-
 cordova-lib/src/plugman/install.js   | 4 ++--
 cordova-lib/src/plugman/uninstall.js | 2 ++
 3 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3e3d4c60/cordova-lib/src/plugman/fetch.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/fetch.js b/cordova-lib/src/plugman/fetch.js
index 33e36ed..9fe0b24 100644
--- a/cordova-lib/src/plugman/fetch.js
+++ b/cordova-lib/src/plugman/fetch.js
@@ -132,6 +132,11 @@ function fetchPlugin(plugin_src, plugins_dir, options) {
                 ));
             }
             // If not found in local search path, fetch from the registry.
+            var newID = pluginMapperotn[plugin_src];
+            if(newID) {
+                events.emit('warn', 'Notice: ' + plugin_src + ' has been automatically converted
to ' + newID + ' and fetched from npm. This is due to our old plugins registry shutting down.');
               
+                plugin_src = newID;
+            } 
             return registry.fetch([plugin_src], options.client)
             .fail(function (error) {
                 var message = 'Failed to fetch plugin ' + plugin_src + ' via registry.' +
@@ -142,7 +147,7 @@ function fetchPlugin(plugin_src, plugins_dir, options) {
             })
             .then(function(dir) {
                 return {
-                    pinfo: pluginInfoProvider.get(dir),
+                        pinfo: pluginInfoProvider.get(dir),
                     fetchJsonSource: {
                         type: 'registry',
                         id: plugin_src

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3e3d4c60/cordova-lib/src/plugman/install.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/install.js b/cordova-lib/src/plugman/install.js
index c8d7e64..ec1fc76 100644
--- a/cordova-lib/src/plugman/install.js
+++ b/cordova-lib/src/plugman/install.js
@@ -86,7 +86,7 @@ module.exports = function installPlugin(platform, project_dir, id, plugins_dir,
     //if it does, convert id to new name id 
     var newId = pluginMapper[splitVersion[0]];
     if(newId) {
-        events.emit('log', 'Notice: ' + id + ' has been automatically converted to ' + newId
+ ' and fetched from npm. This is due to our old plugins registry shutting down.');
+        events.emit('warn', 'Notice: ' + id + ' has been automatically converted to ' + newId
+ ' and fetched from npm. This is due to our old plugins registry shutting down.');
         if(splitVersion[1]) {
             id = newId +'@'+splitVersion[1];
         } else {
@@ -424,7 +424,7 @@ function installDependencies(install, dependencies, options) {
                 //if it does, convert id to new name id 
                 var newId = pluginMapper[splitVersion[0]];
                 if(newId) {
-                    events.emit('log', 'Notice: ' + dep.id + ' has been automatically converted
to ' + newId + ' and fetched from npm. This is due to our old plugins registry shutting down.');
+                    events.emit('warn', 'Notice: ' + dep.id + ' has been automatically converted
to ' + newId + ' and fetched from npm. This is due to our old plugins registry shutting down.');
                     if(splitVersion[1]) {
                         dep.id = newId +'@'+splitVersion[1];
                     } else {

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/3e3d4c60/cordova-lib/src/plugman/uninstall.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/uninstall.js b/cordova-lib/src/plugman/uninstall.js
index 7251d35..e4565fe 100644
--- a/cordova-lib/src/plugman/uninstall.js
+++ b/cordova-lib/src/plugman/uninstall.js
@@ -150,6 +150,7 @@ module.exports.uninstallPlugin = function(id, plugins_dir, options) {
             if (!fs.existsSync(deps_path)) {
                 var newId = pluginMapper[splitVersion[0]];
                 if (newId && toDelete.indexOf(newId) === -1) {
+                   events.emit('verbose', 'Automatically converted ' + d.id + ' to ' + newId
+ 'for uninstallation.');
                    toDelete.push(newId);
                    findDependencies(newId);
                 }
@@ -272,6 +273,7 @@ function runUninstallPlatform(actions, platform, project_dir, plugin_dir,
plugin
                 var newId = pluginMapper[splitVersion[0]];
                 if(newId) {
                     dependent_path = path.join(plugins_dir, newId);
+                    events.emit('verbose', 'Automatically converted ' + dangler + ' to '
+ newId + 'for uninstallation.');
                 }
             }
 


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


Mime
View raw message