You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ra...@apache.org on 2019/10/14 14:25:23 UTC

[cordova-lib] branch master updated: Minor code cleanup (#802)

This is an automated email from the ASF dual-hosted git repository.

raphinesse pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-lib.git


The following commit(s) were added to refs/heads/master by this push:
     new a1c6039  Minor code cleanup (#802)
a1c6039 is described below

commit a1c6039268be7f51cb8e6a75772612a9f8733df2
Author: Raphael von der GrĂ¼n <ra...@gmail.com>
AuthorDate: Mon Oct 14 16:25:16 2019 +0200

    Minor code cleanup (#802)
    
    * Simplify require path
    
    * Break up overly long comment line
    
    * Remove some mentions of --fetch in comments
    
    * Remove commented out code
---
 integration-tests/pkgJson.spec.js | 4 ++--
 src/cordova/plugin/add.js         | 4 +++-
 src/cordova/plugin/list.js        | 2 --
 src/plugman/install.js            | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/integration-tests/pkgJson.spec.js b/integration-tests/pkgJson.spec.js
index 65b5674..dd3bdcb 100644
--- a/integration-tests/pkgJson.spec.js
+++ b/integration-tests/pkgJson.spec.js
@@ -237,7 +237,7 @@ describe('pkgJson', function () {
         });
 
         // Test #023 : if pkg.json and config.xml have no platforms/plugins/spec.
-        // and --save --fetch is called, use the pinned version or plugin pkg.json version.
+        // and --save is called, use the pinned version or plugin pkg.json version.
         it('Test#023 : use pinned/lastest version if there is no platform/plugin version passed in and no platform/plugin versions in pkg.json or config.xml', function () {
             const PLATFORM = 'ios';
             const PLUGIN = 'cordova-plugin-geolocation';
@@ -349,7 +349,7 @@ describe('pkgJson', function () {
                 });
         });
 
-        it('Test#010 : two platforms are added and removed correctly with --save --fetch', function () {
+        it('Test#010 : two platforms are added and removed correctly with --save', function () {
             // No platforms installed nor saved in config or pkg.json yet.
             expect(getPkgJson('cordova')).toBeUndefined();
             expect(getCfg().getEngines()).toEqual([]);
diff --git a/src/cordova/plugin/add.js b/src/cordova/plugin/add.js
index 2ef25da..13c5332 100644
--- a/src/cordova/plugin/add.js
+++ b/src/cordova/plugin/add.js
@@ -279,7 +279,9 @@ function determinePluginTarget (projectRoot, cfg, target, fetchOptions) {
         events.emit('verbose', 'Not checking npm info for ' + parsedSpec.package + ' because searchpath or noregistry flag was given');
     }
     // if noregistry or searchpath are true, then shouldUseNpmInfo is false. Just return target
-    // else run `npm info` on the target via registry.info so we could get engines elemenent in package.json. Pass that info to getFetchVersion which determines the correct plugin to fetch based on engines element.
+    // else run `npm info` on the target via registry.info so we could get
+    // engines elemenent in package.json. Pass that info to getFetchVersion
+    // which determines the correct plugin to fetch based on engines element.
     return (shouldUseNpmInfo ? plugin_util.info([id])
         .then(function (pluginInfo) {
             return module.exports.getFetchVersion(projectRoot, pluginInfo, cordovaVersion);
diff --git a/src/cordova/plugin/list.js b/src/cordova/plugin/list.js
index ab634e0..03b201f 100644
--- a/src/cordova/plugin/list.js
+++ b/src/cordova/plugin/list.js
@@ -49,8 +49,6 @@ function list (projectRoot, hooksRunner, opts) {
                 p = pluginsDict[id];
                 for (var depId in p.deps) {
                     var dep = pluginsDict[depId];
-                    // events.emit('results', p.deps[depId].version);
-                    // events.emit('results', dep != null);
                     if (!dep) {
                         txt = 'WARNING, missing dependency: plugin ' + id +
                               ' depends on ' + depId +
diff --git a/src/plugman/install.js b/src/plugman/install.js
index 0fccf24..c6813ec 100644
--- a/src/plugman/install.js
+++ b/src/plugman/install.js
@@ -35,7 +35,7 @@ var cordovaUtil = require('../cordova/util');
 var superspawn = require('cordova-common').superspawn;
 var PluginInfo = require('cordova-common').PluginInfo;
 var PluginInfoProvider = require('cordova-common').PluginInfoProvider;
-var variableMerge = require('../plugman/variable-merge');
+var variableMerge = require('./variable-merge');
 
 /* INSTALL FLOW
    ------------


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