cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-14102) "cordova plugin add" removes other plugins installed from Github
Date Fri, 01 Jun 2018 08:32:00 GMT

    [ https://issues.apache.org/jira/browse/CB-14102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16497722#comment-16497722
] 

ASF GitHub Bot commented on CB-14102:
-------------------------------------

knight9999 closed pull request #614: CB-14102: Fix tests use specified npm version
URL: https://github.com/apache/cordova-lib/pull/614
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index dc58f6990..a4ad2c2a6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,5 +16,8 @@ install:
   #- "(cd cordova-common && npm install)"
   #- (cd cordova-fetch && npm install && npm link ../cordova-common)
 
+before_install:
+  - npm -v | awk '/^5\.6\./ { system("npm install xml2js@0.4.19") }'
+
 script:
   - "npm test"
diff --git a/integration-tests/pkgJson.spec.js b/integration-tests/pkgJson.spec.js
index 1a4168b5e..7951c1ede 100644
--- a/integration-tests/pkgJson.spec.js
+++ b/integration-tests/pkgJson.spec.js
@@ -840,7 +840,7 @@ describe('During add, if add specifies a platform spec, use that one regardless
         expect(engines).toEqual([ { name: 'ios', spec: '~4.2.1' } ]);
         emptyPlatformList().then(function () {
             // Add ios with --save and --fetch.
-            return cordova.platform('add', ['ios@4.3.0'], {'save': true, 'fetch': true});
+            return cordova.platform('add', ['ios@4.5.4'], {'save': true, 'fetch': true});
         }).then(function () {
             // Delete any previous caches of require(package.json).
             pkgJson = cordova_util.requireNoCache(pkgJsonPath);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> "cordova plugin add" removes other plugins installed from Github 
> -----------------------------------------------------------------
>
>                 Key: CB-14102
>                 URL: https://issues.apache.org/jira/browse/CB-14102
>             Project: Apache Cordova
>          Issue Type: Wish
>          Components: cordova-fetch
>    Affects Versions: 8.0.0
>            Reporter: Ken Naito
>            Priority: Minor
>             Fix For: 8.0.0
>
>
> The cordova platform/plugin add commands use cordova-fetch to get the relevant files.
It does this by using npm.
> However, npm@5.6.x has an issue when installing modules from Github.
> npm modules installed from a Github URL will be removed after installing other npm modules.
> The issue is on npm’s Github: https://github.com/npm/npm/issues/17379
> For example, using node v9.5.0, npm v5.6.0 and cordova 8.0, run
> $ cordova plugin add https://github.com/knight9999/HelloWorldPlugin.git
> This adds helloworldplugin into the node_modules directory, as shown below:
> $ ls node_modules/
> fs-extra        helloworldplugin    jsonfile        universalify
> graceful-fs        install            npm
> If we add further plugins like so:
> $ cordova plugin add cordova-plugin-camera
> The previous modules in node_modules directory disappear.
> $ ls node_modules/
> cordova-plugin-camera
> This is fixed in npm@5.7.1, as mentioned in the issue link above.
> It is possible that the user cannot update their global npm version due to some other
dependencies. I suggest that we add a way for the user to override the npm executable which
is used by Cordova. For example, we could add an environment variable as below, which would
be used instead of the global npm:
> CORDOVA_NPM=/home/user/bin/npm



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message