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/03/12 15:16:50 UTC

[cordova-lib] branch master updated: Remove handling of legacy .fetch.json files (#748)

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-lib.git


The following commit(s) were added to refs/heads/master by this push:
     new 65ca227  Remove handling of legacy .fetch.json files (#748)
65ca227 is described below

commit 65ca22776634ab4b20f5ffd7e5dc371cf4b23965
Author: Raphael von der GrĂ¼n <ra...@gmail.com>
AuthorDate: Tue Mar 12 16:16:45 2019 +0100

    Remove handling of legacy .fetch.json files (#748)
    
    The files in question have last been used in Cordova 4.3.0 and have been
    removed by commit c49eaa86c92b.
---
 src/plugman/util/metadata.js | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/plugman/util/metadata.js b/src/plugman/util/metadata.js
index 75bc080..d7105a4 100644
--- a/src/plugman/util/metadata.js
+++ b/src/plugman/util/metadata.js
@@ -39,17 +39,7 @@ exports.get_fetch_metadata = function (plugin_dir) {
     var pluginId = path.basename(plugin_dir);
 
     var metadataJson = getJson(pluginsDir);
-    if (metadataJson[pluginId]) {
-        return metadataJson[pluginId];
-    }
-    var legacyPath = path.join(plugin_dir, '.fetch.json');
-    if (fs.existsSync(legacyPath)) {
-        var ret = JSON.parse(fs.readFileSync(legacyPath, 'utf-8'));
-        exports.save_fetch_metadata(pluginsDir, pluginId, ret);
-        fs.unlinkSync(legacyPath);
-        return ret;
-    }
-    return {};
+    return metadataJson[pluginId] || {};
 };
 
 exports.save_fetch_metadata = function (pluginsDir, pluginId, data) {


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