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

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

brodybits closed pull request #30: [CB-14145] npm audit in CI TEST WIP - DO NOT 
MERGE
URL: https://github.com/apache/cordova-common/pull/30
 
 
   

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/.eslintrc.yml b/.eslintrc.yml
index 7701c82..21a8e7b 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -8,4 +8,6 @@ rules:
   padded-blocks: off
   operator-linebreak: off
   no-throw-literal: off
-  
\ No newline at end of file
+  no-unused-vars:
+    - error
+    - args: after-used
diff --git a/.travis.yml b/.travis.yml
index 459273a..d647b88 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,25 @@
 language: node_js
 sudo: false
+
 git:
   depth: 10
+
 node_js:
-  - "4"
   - "6"
+  - "8"
+  - "10"
+
 install:
   - npm install
   - npm install -g codecov
+  - node --version
+  - npm --version
+
 script:
   - npm test
   - npm run cover
+  - npm install npm@latest
+  - npm audit
+
 after_script:
   - codecov
diff --git a/README.md b/README.md
index 5659c57..422c98b 100644
--- a/README.md
+++ b/README.md
@@ -24,11 +24,11 @@
 
[![NPM](https://nodei.co/npm/cordova-common.png)](https://nodei.co/npm/cordova-common/)
 
 # cordova-common
-Expoeses shared functionality used by 
[cordova-lib](https://github.com/apache/cordova-lib/) and Cordova platforms.
+Exposes shared functionality used by 
[cordova-lib](https://github.com/apache/cordova-lib/) and Cordova platforms.
 ## Exposed APIs
 
 ### `events`
-  
+
 Represents special instance of NodeJS EventEmitter which is intended to be 
used to post events to cordova-lib and cordova-cli
 
 Usage:
@@ -122,7 +122,7 @@ superspawn.spawn('adb', ['devices'])
 
 ### `xmlHelpers`
 
-A set of utility methods for dealing with xml files.
+A set of utility methods for dealing with XML files.
 
 Usage:
 ```js
@@ -148,10 +148,8 @@ mungeUtil
 
 ## Setup
 * Clone this repository onto your local machine
-    `git clone https://git-wip-us.apache.org/repos/asf/cordova-lib.git`
-* In terminal, navigate to the inner cordova-common directory
-    `cd cordova-lib/cordova-common`
-* Install dependencies and npm-link
-    `npm install && npm link`
+    `git clone https://github.com/apache/cordova-common.git`
+* Navigate to cordova-common directory, install dependencies and npm-link
+    `cd cordova-common && npm install && npm link`
 * Navigate to cordova-lib directory and link cordova-common
-    `cd ../cordova-lib && npm link cordova-common && npm install`
+    `cd <cordova-lib directory> && npm link cordova-common && npm install`
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 89593ea..5dda362 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -20,6 +20,13 @@
 -->
 # Cordova-common Release Notes
 
+### 2.2.1 (Dec 14, 2017)
+* [CB-13674](https://issues.apache.org/jira/browse/CB-13674): updated 
dependencies
+
+### 2.2.0 (Nov 22, 2017)
+* [CB-13471](https://issues.apache.org/jira/browse/CB-13471) File Provider fix 
belongs in cordova-common 
+* [CB-11244](https://issues.apache.org/jira/browse/CB-11244) Spot fix for 
upcoming `cordova-android@7` changes. 
https://github.com/apache/cordova-android/pull/389
+
 ### 2.1.1 (Oct 04, 2017)
 * [CB-13145](https://issues.apache.org/jira/browse/CB-13145) added 
`getFrameworks` to unit tests
 * [CB-13145](https://issues.apache.org/jira/browse/CB-13145) added variable 
replacing to framework tag
diff --git a/appveyor.yml b/appveyor.yml
index 94714f2..f34dfbd 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -3,9 +3,10 @@
 
 environment:
   matrix:
-  - nodejs_version: "4"
   - nodejs_version: "6"
-  
+  - nodejs_version: "8"
+  - nodejs_version: "10"
+
 install:
   - ps: Install-Product node $env:nodejs_version
   - npm install
diff --git a/package.json b/package.json
index cd5fa09..7e0b096 100644
--- a/package.json
+++ b/package.json
@@ -3,10 +3,10 @@
   "name": "cordova-common",
   "description": "Apache Cordova tools and platforms shared routines",
   "license": "Apache-2.0",
-  "version": "2.1.1",
+  "version": "2.2.2-dev",
   "repository": {
     "type": "git",
-    "url": "https://github.com/apache/cordova-lib";
+    "url": "https://github.com/apache/cordova-common";
   },
   "bugs": {
     "url": "https://issues.apache.org/jira/browse/CB";,
@@ -18,7 +18,7 @@
   },
   "scripts": {
     "test": "npm run eslint && npm run jasmine",
-    "eslint": "eslint src && eslint spec",
+    "eslint": "eslint src spec",
     "jasmine": "jasmine JASMINE_CONFIG_PATH=spec/support/jasmine.json",
     "cover": "istanbul cover --root src --print detail jasmine"
   },
diff --git a/spec/ConfigChanges/ConfigChanges.spec.js 
b/spec/ConfigChanges/ConfigChanges.spec.js
index ec7f250..a0abe5c 100644
--- a/spec/ConfigChanges/ConfigChanges.spec.js
+++ b/spec/ConfigChanges/ConfigChanges.spec.js
@@ -34,6 +34,7 @@ var editconfigplugin = path.join(__dirname, 
'../fixtures/plugins/org.test.editco
 var editconfigplugin_two = path.join(__dirname, 
'../fixtures/plugins/org.test.editconfigtest_two');
 var varplugin = path.join(__dirname, '../fixtures/plugins/com.adobe.vars');
 var plistplugin = path.join(__dirname, '../fixtures/plugins/org.apache.plist');
+var bplistplugin = path.join(__dirname, 
'../fixtures/plugins/org.apache.bplist');
 var android_two_project = path.join(__dirname, 
'../fixtures/projects/android_two/*');
 var android_two_no_perms_project = path.join(__dirname, 
'../fixtures/projects/android_two_no_perms', '*');
 var ios_config_xml = path.join(__dirname, 
'../fixtures/projects/ios-config-xml/*');
@@ -56,7 +57,7 @@ function innerXML (xmltext) {
     return xmltext.replace(/^<[\w\s\-=\/"\.]+>/, 
'').replace(/<\/[\w\s\-=\/"\.]+>$/, ''); /* eslint no-useless-escape : 0 */
 }
 
-function get_munge_change (munge, keys) {
+function get_munge_change () {
     return mungeutil.deep_find.apply(null, arguments);
 }
 
@@ -425,6 +426,19 @@ describe('config-changes module', function () {
                     expect(fs.readFileSync(path.join(temp, 'SampleApp', 
'SampleApp-Info.plist'), 
'utf-8')).not.toMatch(/(<string>schema-a<\/string>[^]*){2,}/);
                 });
             });
+            describe('of binary plist config files', function () {
+                it('should merge dictionaries and arrays, removing 
duplicates', function () {
+                    shell.cp('-rf', ios_config_xml, temp);
+                    shell.cp('-rf', bplistplugin, plugins_dir);
+                    var platformJson = PlatformJson.load(plugins_dir, 'ios');
+                    
platformJson.addInstalledPluginToPrepareQueue('org.apache.bplist', {});
+                    configChanges.process(plugins_dir, temp, 'ios', 
platformJson, pluginInfoProvider);
+                    var edited_plist = fs.readFileSync(path.join(temp, 
'SampleApp', 'SampleApp-binary.plist'), 'utf-8');
+                    
expect(edited_plist).toMatch(/<key>UINewsstandIcon<\/key>[\s\S]*<key>CFBundlePrimaryIcon<\/key>/);
+                    expect(fs.readFileSync(path.join(temp, 'SampleApp', 
'SampleApp-binary.plist'), 'utf-8')).toMatch(/<string>schema-b<\/string>/);
+                    expect(fs.readFileSync(path.join(temp, 'SampleApp', 
'SampleApp-binary.plist'), 
'utf-8')).not.toMatch(/(<string>schema-a<\/string>[^]*){2,}/);
+                });
+            });
             it('Test 025 : should resolve wildcard config-file targets to the 
project, if applicable', function () {
                 shell.cp('-rf', ios_config_xml, temp);
                 shell.cp('-rf', cbplugin, plugins_dir);
diff --git a/spec/ConfigChanges/ConfigFile.spec.js 
b/spec/ConfigChanges/ConfigFile.spec.js
new file mode 100644
index 0000000..2da5ee8
--- /dev/null
+++ b/spec/ConfigChanges/ConfigFile.spec.js
@@ -0,0 +1,91 @@
+/**
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    http://www.apache.org/licenses/LICENSE-2.0
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/
+
+var rewire = require('rewire');
+var configFile = rewire('../../src/ConfigChanges/ConfigFile');
+var fs = require('fs');
+var path = require('path');
+var projectDir = path.join('project_dir', 'app', 'src', 'main');
+
+describe('ConfigFile tests', function () {
+
+    beforeEach(function () {
+        spyOn(configFile, 'isBinaryPlist').and.callThrough();
+    });
+
+    it('ConfigFile_save/ConfigFile.prototype.save', function () {
+        spyOn(fs, 'writeFileSync');
+        configFile.prototype.save();
+        expect(fs.writeFileSync).toHaveBeenCalled();
+    });
+
+    it('isBinaryPlist should return false if not binary', function () {
+        spyOn(fs, 'readFileSync').and.returnValue('not bplist');
+        expect(configFile.isBinaryPlist('someFile')).toBe(false);
+    });
+    it('isBinaryPlist should return true if binary', function () {
+        spyOn(fs, 'readFileSync').and.returnValue('bplist');
+        expect(configFile.isBinaryPlist('someFile')).toBe(true);
+    });
+
+    it('getIOSProjectname should throw error', function () {
+        expect(function () { 
configFile.getIOSProjectname('some/project/name'); }).toThrow();
+    });
+
+    it('resolveConfigFilePath should return file path', function () {
+        var filePath = path.join('project_dir', 'file');
+        expect(configFile.resolveConfigFilePath('project_dir', 'platform', 
'file')).toBe(filePath);
+    });
+
+    it('resolveConfigFilePath should return file path', function () {
+        var androidManifestPath = path.join(projectDir, 'AndroidManifest.xml');
+        expect(configFile.resolveConfigFilePath('project_dir', 'android', 
'AndroidManifest.xml')).toBe(androidManifestPath);
+    });
+
+    it('resolveConfigFilePath should return file path', function () {
+        var configPath = path.join(projectDir, 'res', 'xml', 'config.xml');
+        expect(configFile.resolveConfigFilePath('project_dir', 'android', 
'config.xml')).toBe(configPath);
+    });
+
+    it('resolveConfigFilePath should return file path', function () {
+        var stringsPath = path.join(projectDir, 'res', 'values', 
'strings.xml');
+        expect(configFile.resolveConfigFilePath('project_dir', 'android', 
'strings.xml')).toBe(stringsPath);
+    });
+
+    it('resolveConfigFilePath should return file path', function () {
+        spyOn(configFile, 'getIOSProjectname').and.returnValue('iospath');
+        var configPath = path.join('project_dir', 'iospath', 'config.xml');
+        expect(configFile.resolveConfigFilePath('project_dir', 'ios', 
'config.xml')).toBe(configPath);
+    });
+
+    it('resolveConfigFilePath should return file path', function () {
+        var configPath = path.join('project_dir', 'config.xml');
+        expect(configFile.resolveConfigFilePath('project_dir', 'ubuntu', 
'config.xml')).toBe(configPath);
+    });
+
+    it('resolveConfigFilePath should return file path', function () {
+        var file = path.join('res', 'xml');
+        var configPath = path.join('project_dir', 'app', 'src', 'main', file, 
'xml');
+        expect(configFile.resolveConfigFilePath('project_dir', 'android', 
file)).toBe(configPath);
+    });
+
+    it('resolveConfigFilePath should return file path', function () {
+        var file = 'res/xml';
+        var configPath = path.join('project_dir', 'app', 'src', 'main', file, 
'xml');
+        expect(configFile.resolveConfigFilePath('project_dir', 'android', 
file)).toBe(configPath);
+    });
+});
diff --git a/spec/FileUpdater.spec.js b/spec/FileUpdater.spec.js
index 0dccc01..8370b97 100644
--- a/spec/FileUpdater.spec.js
+++ b/spec/FileUpdater.spec.js
@@ -118,7 +118,7 @@ var testDirStats = mockDirStats();
 var testFileStats = mockFileStats(now);
 var testFileStats2 = mockFileStats(now);
 var testFileStats3 = mockFileStats(now);
-var nullLogger = function (message) {};
+var nullLogger = function () {};
 
 describe('FileUpdater class', function () {
 
diff --git a/spec/PlatformJson.spec.js b/spec/PlatformJson.spec.js
index a92be65..fbf7746 100644
--- a/spec/PlatformJson.spec.js
+++ b/spec/PlatformJson.spec.js
@@ -123,7 +123,7 @@ describe('PlatformJson class', function () {
 describe('ModuleMetadata class', function () {
     it('Test 010 : should be constructable', function () {
         var meta;
-        expect(function name (params) {
+        expect(function () {
             meta = new ModuleMetadata('fakePlugin', {src: 
'www/fakeModule.js'});
         }).not.toThrow();
         expect(meta instanceof ModuleMetadata).toBeTruthy();
diff --git a/spec/fixtures/plugins/org.apache.bplist/plugin.xml 
b/spec/fixtures/plugins/org.apache.bplist/plugin.xml
new file mode 100644
index 0000000..ea6f1f9
--- /dev/null
+++ b/spec/fixtures/plugins/org.apache.bplist/plugin.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0";
+    xmlns:android="http://schemas.android.com/apk/res/android";
+    id="org.apache.bplist"
+    version="3.0.0">
+
+    <name>Binary PList updates</name>
+
+    <!-- ios -->
+    <platform name="ios">
+        <config-file target="*-binary.plist" parent="CFBundleIcons">
+            <dict>
+                <key>UINewsstandIcon</key>
+                <dict>
+                    <key>CFBundleIconFiles</key>
+                    <array>
+                        <string>Newsstand-Cover-Icon.png</string>
+                        <string>[email protected]</string>
+                    </array>
+                    <key>UINewsstandBindingType</key>
+                    <string>UINewsstandBindingTypeMagazine</string>
+                    <key>UINewsstandBindingEdge</key>
+                    <string>UINewsstandBindingEdgeLeft</string>
+                </dict>
+            </dict>
+        </config-file>
+
+        <config-file target="*-binary.plist" parent="CFValidSchemas">
+            <array>
+                <string>schema-a</string>
+                <string>schema-b</string>
+            </array>
+        </config-file>
+    </platform>
+</plugin>
diff --git 
a/spec/fixtures/projects/ios-config-xml/SampleApp/SampleApp-binary.plist 
b/spec/fixtures/projects/ios-config-xml/SampleApp/SampleApp-binary.plist
new file mode 100644
index 0000000..67a5811
Binary files /dev/null and 
b/spec/fixtures/projects/ios-config-xml/SampleApp/SampleApp-binary.plist differ
diff --git a/src/ConfigChanges/ConfigChanges.js 
b/src/ConfigChanges/ConfigChanges.js
index e0af8a9..e7ad0e2 100644
--- a/src/ConfigChanges/ConfigChanges.js
+++ b/src/ConfigChanges/ConfigChanges.js
@@ -32,7 +32,7 @@
 var path = require('path');
 var et = require('elementtree');
 var ConfigKeeper = require('./ConfigKeeper');
-var CordovaLogger = require('../CordovaLogger');
+var events = require('../events');
 
 var mungeutil = require('./munge-util');
 var xml_helpers = require('../util/xml-helpers');
@@ -79,6 +79,8 @@ function PlatformMunger_apply_file_munge (file, munge, 
remove) {
             if (config_file.exists) {
                 if (remove) config_file.prune_child(selector, 
munge.parents[selector][xml_child]);
                 else config_file.graft_child(selector, 
munge.parents[selector][xml_child]);
+            } else {
+                events.emit('warn', 'config file ' + file + ' requested for 
changes not found at ' + config_file.filepath + ', ignoring');
             }
         }
     }
@@ -134,7 +136,7 @@ function add_plugin_changes (pluginInfo, plugin_vars, 
is_top_level, should_incre
                 ' cannot be added. <edit-config> changes in this plugin 
conflicts with <edit-config> changes in config.xml. Conflicts must be resolved 
before plugin can be added.');
         }
         if (plugin_force) {
-            CordovaLogger.get().log(CordovaLogger.WARN, '--force is used. 
edit-config will overwrite conflicts if any. Conflicting plugins may not work 
as expected.');
+            events.emit('warn', '--force is used. edit-config will overwrite 
conflicts if any. Conflicting plugins may not work as expected.');
 
             // remove conflicting munges
             var conflict_munge = 
mungeutil.decrement_munge(platform_config.config_munge, 
isConflictingInfo.conflictingMunge);
@@ -198,7 +200,7 @@ function add_config_changes (config, should_increment) {
                 }
             }
             if (Object.keys(isConflictingInfo.conflictingMunge.files).length 
!== 0) {
-                CordovaLogger.get().log(CordovaLogger.WARN, 'Conflict found, 
edit-config changes from config.xml will overwrite plugin.xml changes');
+                events.emit('warn', 'Conflict found, edit-config changes from 
config.xml will overwrite plugin.xml changes');
 
                 // remove conflicting plugin.xml munges
                 conflict_munge = 
mungeutil.decrement_munge(platform_config.config_munge, 
isConflictingInfo.conflictingMunge);
diff --git a/src/ConfigChanges/ConfigFile.js b/src/ConfigChanges/ConfigFile.js
index a4a7331..2e5ed5f 100644
--- a/src/ConfigChanges/ConfigFile.js
+++ b/src/ConfigChanges/ConfigFile.js
@@ -71,7 +71,7 @@ function ConfigFile_load () {
     var ext = path.extname(filepath);
     // Windows8 uses an appxmanifest, and wp8 will likely use
     // the same in a future release
-    if (ext === '.xml' || ext === '.appxmanifest') {
+    if (ext === '.xml' || ext === '.appxmanifest' || ext === '.storyboard') {
         self.type = 'xml';
         self.data = modules.xml_helpers.parseElementtreeSync(filepath);
     } else {
@@ -82,7 +82,7 @@ function ConfigFile_load () {
         //       Do we still need to support binary plist?
         //       If yes, use plist.parseStringSync() and read the file once.
         self.data = isBinaryPlist(filepath) ?
-            modules.bplist.parseBuffer(fs.readFileSync(filepath)) :
+            modules.bplist.parseBuffer(fs.readFileSync(filepath))[0] :
             modules.plist.parse(fs.readFileSync(filepath, 'utf8'));
     }
 }
@@ -166,6 +166,8 @@ function resolveConfigFilePath (project_dir, platform, 
file) {
     var filepath = path.join(project_dir, file);
     var matches;
 
+    file = path.normalize(file);
+
     if (file.indexOf('*') > -1) {
         // handle wildcards in targets using glob.
         matches = modules.glob.sync(path.join(project_dir, '**', file));
@@ -184,16 +186,34 @@ function resolveConfigFilePath (project_dir, platform, 
file) {
         return filepath;
     }
 
-    // special-case config.xml target that is just "config.xml". This should 
be resolved to the real location of the file.
-    // TODO: move the logic that contains the locations of config.xml from 
cordova CLI into plugman.
+    // XXX this checks for android studio projects
+    // only if none of the options above are satisfied does this get called
+    // TODO: Move this out of cordova-common and into the platforms somehow
+    if (platform === 'android' && !fs.existsSync(filepath)) {
+        if (file === 'AndroidManifest.xml') {
+            filepath = path.join(project_dir, 'app', 'src', 'main', 
'AndroidManifest.xml');
+        } else if (file.endsWith('config.xml')) {
+            filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 
'xml', 'config.xml');
+        } else if (file.endsWith('strings.xml')) {
+            // Plugins really shouldn't mess with strings.xml, since it's able 
to be localized
+            filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 
'values', 'strings.xml');
+        } else if (file.includes(path.join('res', 'xml'))) {
+            // Catch-all for all other stored XML configuration in legacy 
plugins
+            var config_file = path.basename(file);
+            filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 
'xml', config_file);
+        }
+        return filepath;
+    }
+
+    // special-case config.xml target that is just "config.xml" for other 
platforms. This should
+    // be resolved to the real location of the file.
+    // TODO: Move this out of cordova-common into platforms
     if (file === 'config.xml') {
         if (platform === 'ubuntu') {
             filepath = path.join(project_dir, 'config.xml');
         } else if (platform === 'ios') {
-            var iospath = getIOSProjectname(project_dir);
+            var iospath = module.exports.getIOSProjectname(project_dir);
             filepath = path.join(project_dir, iospath, 'config.xml');
-        } else if (platform === 'android') {
-            filepath = path.join(project_dir, 'res', 'xml', 'config.xml');
         } else {
             matches = modules.glob.sync(path.join(project_dir, '**', 
'config.xml'));
             if (matches.length) filepath = matches[0];
@@ -201,12 +221,6 @@ function resolveConfigFilePath (project_dir, platform, 
file) {
         return filepath;
     }
 
-    // XXX this checks for android studio projects
-    // only if none of the options above are satisfied does this get called
-    if (platform === 'android' && !fs.existsSync(filepath)) {
-        filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 'xml', 
'config.xml');
-    }
-
     // None of the special cases matched, returning project_dir/file.
     return filepath;
 }
@@ -240,3 +254,6 @@ function isBinaryPlist (filename) {
 }
 
 module.exports = ConfigFile;
+module.exports.isBinaryPlist = isBinaryPlist;
+module.exports.getIOSProjectname = getIOSProjectname;
+module.exports.resolveConfigFilePath = resolveConfigFilePath;
diff --git a/src/ConfigParser/ConfigParser.js b/src/ConfigParser/ConfigParser.js
index 9c3943e..4f1cc39 100644
--- a/src/ConfigParser/ConfigParser.js
+++ b/src/ConfigParser/ConfigParser.js
@@ -31,7 +31,7 @@ function ConfigParser (path) {
         this.cdvNamespacePrefix = getCordovaNamespacePrefix(this.doc);
         et.register_namespace(this.cdvNamespacePrefix, 
'http://cordova.apache.org/ns/1.0');
     } catch (e) {
-        console.error('Parsing ' + path + ' failed');
+        events.emit('error', 'Parsing ' + path + ' failed');
         throw e;
     }
     var r = this.doc.getroot();
@@ -91,7 +91,7 @@ ConfigParser.prototype = {
         return this.doc.getroot().attrib[attr];
     },
 
-    packageName: function (id) {
+    packageName: function () {
         return this.getAttribute('id');
     },
     setPackageName: function (id) {
diff --git a/src/ConfigParser/README.md b/src/ConfigParser/README.md
deleted file mode 100644
index e5cd1bf..0000000
--- a/src/ConfigParser/README.md
+++ /dev/null
@@ -1,86 +0,0 @@
-<!--
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
--->
-
-# Cordova-Lib
-
-## ConfigParser
-
-wraps a valid cordova config.xml file 
-
-### Usage
-
-### Include the ConfigParser module in a projet
-
-    var ConfigParser = require('cordova-lib').configparser;
-
-### Create a new ConfigParser
-
-    var config = new ConfigParser('path/to/config/xml/');
-    
-### Utility Functions
-
-#### packageName(id)
-returns document root 'id' attribute value
-#### Usage
-
-    config.packageName: function(id) 
-
-/*
- * sets document root element 'id' attribute to @id
- *
- * @id - new id value
- *
- */
-#### setPackageName(id)
-set document root 'id' attribute to 
- function(id) {
-        this.doc.getroot().attrib['id'] = id;
-    },
-
-### 
-    name: function() {
-        return getNodeTextSafe(this.doc.find('name'));
-    },
-    setName: function(name) {
-        var el = findOrCreate(this.doc, 'name');
-        el.text = name;
-    },
-
-### read the description element
-    
-    config.description()
-
-    var text = "New and improved description of App"
-    setDescription(text)
-    
-### version management
-    version()
-    android_versionCode()
-    ios_CFBundleVersion()
-    setVersion()
-    
-### read author element
-
-   config.author();
-
-### read preference
-
-    config.getPreference(name);
diff --git a/src/FileUpdater.js b/src/FileUpdater.js
index c4eeb97..ea5d9e2 100644
--- a/src/FileUpdater.js
+++ b/src/FileUpdater.js
@@ -186,7 +186,7 @@ function updatePath (sourcePath, targetPath, options, log) {
         throw new Error('A target path is required.');
     }
 
-    log = log || function (message) { };
+    log = log || function () { };
 
     return updatePathInternal(sourcePath, targetPath, options, log);
 }
@@ -213,7 +213,7 @@ function updatePaths (pathMap, options, log) {
         throw new Error('An object mapping from target paths to source paths 
is required.');
     }
 
-    log = log || function (message) { };
+    log = log || function () { };
 
     var updated = false;
 
@@ -266,7 +266,7 @@ function mergeAndUpdateDir (sourceDirs, targetDir, options, 
log) {
         throw new Error('A target directory path is required.');
     }
 
-    log = log || function (message) { };
+    log = log || function () { };
 
     var rootDir = (options && options.rootDir) || '';
 
diff --git a/src/util/xml-helpers.js b/src/util/xml-helpers.js
index e2c8fd3..6b5d70f 100644
--- a/src/util/xml-helpers.js
+++ b/src/util/xml-helpers.js
@@ -328,7 +328,7 @@ function mergeXml (src, dest, platform, clobber) {
         });
 
         // write new preferences
-        Object.keys(prefHash).forEach(function (key, index) {
+        Object.keys(prefHash).forEach(function (key) {
             var element = et.SubElement(xml, 'preference');
             element.set('name', key);
             element.set('value', this[key]);


 

----------------------------------------------------------------
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:
[email protected]


> Resolve npm audit issues
> ------------------------
>
>                 Key: CB-14145
>                 URL: https://issues.apache.org/jira/browse/CB-14145
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-android, cordova-app-hello-world, 
> cordova-browser, cordova-cli, cordova-coho, cordova-common, cordova-fetch, 
> cordova-ios, cordova-js, cordova-lib, cordova-osx, cordova-windows
>            Reporter: Chris Brody
>            Assignee: Chris Brody
>            Priority: Major
>
> From private discussions I discovered that running {{npm audit}} on a number 
> of components would report dependencies with security issues. While we could 
> not see any {{npm audit}} issues that may affect applications built using 
> Cordova I think it is extremely important to resolve these issues as soon as 
> possible. Most affect devDependencies used for testing of Cordova itself; a 
> minority seem to affect Cordova scripts that may be run by Cordova 
> application developers. Better safe than sorry!
> I would like to resolve this issue as follows:
> * patch release of common library components such as {{cordova-common}}, 
> {{cordova-lib}}, etc. (fixed in minor release branch)
> * patch or minor release of other affected components such as CLI, Cordova 
> platform implementations, major plugins, etc. (expected to be fixed in minor 
> release branch; do not want to pollute the master branch with extra reverts, 
> updated node_modules committed, etc.)
> * {{npm audit}} issues resolved in master branch for next major release, 
> which should NOT be shipped with any {{npm audit}} issues lurking
> * {{npm audit}} step added to CI for both patch release and next major release



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to