You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2019/10/31 02:43:15 UTC

[cordova-fetch] branch master updated: Work around npm bug when uninstalling old cordova platforms (#78)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6e78b1a  Work around npm bug when uninstalling old cordova platforms (#78)
6e78b1a is described below

commit 6e78b1a21e3970aaae6aa67d9e3f5ec1df1a3294
Author: Raphael von der GrĂ¼n <ra...@gmail.com>
AuthorDate: Thu Oct 31 03:43:05 2019 +0100

    Work around npm bug when uninstalling old cordova platforms (#78)
    
    When using `npm@>=6.11.0` on Windows, `npm uninstall`
    of `cordova-android@5.1.1` will leave an empty folder
    `node_modules/cordova-android/node_modules` behind. This causes one of
    our tests to fail but it is very likely an issue with npm. Furthermore
    this is very unlikely to affect users of `cordova-fetch` in production.
---
 spec/fetch.spec.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/spec/fetch.spec.js b/spec/fetch.spec.js
index 61f309d..2dfa087 100644
--- a/spec/fetch.spec.js
+++ b/spec/fetch.spec.js
@@ -89,21 +89,21 @@ describe('fetch/uninstall with --save', function () {
     it('should fetch and uninstall a cordova platform via npm & git tags/branches', function () {
         return Promise.resolve()
             // npm tag
-            .then(_ => fetchAndMatch('cordova-android@5.1.1', {
+            .then(_ => fetchAndMatch('cordova-android@8.1.0', {
                 name: 'cordova-android',
-                version: '5.1.1'
+                version: '8.1.0'
             }))
-            .then(_ => expectDependenciesToBe({ 'cordova-android': '^5.1.1' }))
+            .then(_ => expectDependenciesToBe({ 'cordova-android': '^8.1.0' }))
             .then(_ => uninstall('cordova-android', tmpDir, opts))
             .then(_ => expectDependenciesToBe({}))
             .then(_ => expectNotToBeInstalled('cordova-android'))
 
             // git tag
-            .then(_ => fetchAndMatch('https://github.com/apache/cordova-ios.git#rel/4.1.1', {
+            .then(_ => fetchAndMatch('https://github.com/apache/cordova-ios.git#rel/5.0.1', {
                 name: 'cordova-ios',
-                version: '4.1.1'
+                version: '5.0.1'
             }))
-            .then(_ => expectDependenciesToBe({ 'cordova-ios': 'git+https://github.com/apache/cordova-ios.git#rel/4.1.1' }))
+            .then(_ => expectDependenciesToBe({ 'cordova-ios': 'git+https://github.com/apache/cordova-ios.git#rel/5.0.1' }))
             .then(_ => uninstall('cordova-ios', tmpDir, opts))
             .then(_ => expectDependenciesToBe({}))
             .then(_ => expectNotToBeInstalled('cordova-ios'))


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