You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by dp...@apache.org on 2018/11/03 20:58:12 UTC

[cordova-common] branch master updated (1b4c649 -> 193c9f3)

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

dpogue pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-common.git.


    from 1b4c649  Use `cross-spawn` for platform-independent spawning
     new c2f83b0  Update fs-extra and eslint dependencies
     new 193c9f3  Fix eslint object-curly-spacing complaints

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 package.json                             | 16 ++++++++--------
 spec/ConfigChanges/ConfigChanges.spec.js | 33 ++++++++++++++++----------------
 spec/ConfigParser/ConfigParser.spec.js   |  6 +++---
 spec/CordovaLogger.spec.js               |  6 +++---
 spec/PlatformJson.spec.js                | 20 +++++++++----------
 spec/PluginInfo/PluginInfo.spec.js       |  2 +-
 spec/PluginManager.spec.js               |  2 +-
 spec/superspawn.spec.js                  |  8 ++++----
 spec/util/xml-helpers.spec.js            | 10 +++++-----
 src/ConfigChanges/ConfigChanges.js       |  8 ++++----
 src/ConfigChanges/ConfigFile.js          |  2 +-
 src/ConfigParser/ConfigParser.js         |  4 ++--
 src/FileUpdater.js                       |  2 +-
 src/PlatformJson.js                      | 10 +++++-----
 src/PluginInfo/PluginInfo.js             | 10 +++++-----
 src/superspawn.js                        |  4 ++--
 16 files changed, 72 insertions(+), 71 deletions(-)


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


[cordova-common] 02/02: Fix eslint object-curly-spacing complaints

Posted by dp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 193c9f3e2bf003292d12782f2d182a08c1b562b8
Author: Darryl Pogue <da...@dpogue.ca>
AuthorDate: Sat Nov 3 13:51:39 2018 -0700

    Fix eslint object-curly-spacing complaints
---
 spec/ConfigChanges/ConfigChanges.spec.js | 33 ++++++++++++++++----------------
 spec/ConfigParser/ConfigParser.spec.js   |  6 +++---
 spec/CordovaLogger.spec.js               |  6 +++---
 spec/PlatformJson.spec.js                | 20 +++++++++----------
 spec/PluginInfo/PluginInfo.spec.js       |  2 +-
 spec/PluginManager.spec.js               |  2 +-
 spec/superspawn.spec.js                  |  8 ++++----
 spec/util/xml-helpers.spec.js            | 10 +++++-----
 src/ConfigChanges/ConfigChanges.js       |  8 ++++----
 src/ConfigChanges/ConfigFile.js          |  2 +-
 src/ConfigParser/ConfigParser.js         |  4 ++--
 src/FileUpdater.js                       |  2 +-
 src/PlatformJson.js                      | 10 +++++-----
 src/PluginInfo/PluginInfo.js             | 10 +++++-----
 src/superspawn.js                        |  4 ++--
 15 files changed, 64 insertions(+), 63 deletions(-)

diff --git a/spec/ConfigChanges/ConfigChanges.spec.js b/spec/ConfigChanges/ConfigChanges.spec.js
index 7f792d2..657ccf8 100644
--- a/spec/ConfigChanges/ConfigChanges.spec.js
+++ b/spec/ConfigChanges/ConfigChanges.spec.js
@@ -87,10 +87,10 @@ describe('config-changes module', function () {
             });
             it('Test 002 : should append specified plugin with any variables to platform.json', function () {
                 var platformJson = new PlatformJson(null, 'android', null);
-                platformJson.addInstalledPluginToPrepareQueue('org.test.plugins.dummyplugin', {'dude': 'man'});
+                platformJson.addInstalledPluginToPrepareQueue('org.test.plugins.dummyplugin', { 'dude': 'man' });
                 var json = platformJson.root;
                 expect(json.prepare_queue.installed[0].plugin).toEqual('org.test.plugins.dummyplugin');
-                expect(json.prepare_queue.installed[0].vars).toEqual({'dude': 'man'});
+                expect(json.prepare_queue.installed[0].vars).toEqual({ 'dude': 'man' });
             });
         });
 
@@ -115,10 +115,11 @@ describe('config-changes module', function () {
         it('Test 005 : should return the json file if it exists', function () {
             var filepath = path.join(plugins_dir, 'android.json');
             var json = {
-                prepare_queue: {installed: [], uninstalled: []},
-                config_munge: {files: {'some_file': {parents: {'some_parent': [{'xml': 'some_change', 'count': 1}]}}}},
+                prepare_queue: { installed: [], uninstalled: [] },
+                config_munge: { files: { 'some_file': { parents: { 'some_parent': [{ 'xml': 'some_change', 'count': 1 }] } } } },
                 installed_plugins: {},
-                dependent_plugins: {}};
+                dependent_plugins: {}
+            };
             fs.writeFileSync(filepath, JSON.stringify(json), 'utf-8');
             var platformJson = PlatformJson.load(plugins_dir, 'android');
             expect(JSON.stringify(json)).toEqual(JSON.stringify(platformJson.root));
@@ -128,7 +129,7 @@ describe('config-changes module', function () {
     describe('save method', function () {
         it('Test 006 : should write out specified json', function () {
             var filepath = path.join(plugins_dir, 'android.json');
-            var platformJson = new PlatformJson(filepath, 'android', {foo: true});
+            var platformJson = new PlatformJson(filepath, 'android', { foo: true });
             platformJson.save();
             expect(JSON.parse(fs.readFileSync(filepath, 'utf-8'))).toEqual(platformJson.root);
         });
@@ -146,23 +147,23 @@ describe('config-changes module', function () {
                 var munge = munger.generate_plugin_config_munge(pluginInfoProvider.get(dummyplugin), {});
                 expect(munge.files['AndroidManifest.xml']).toBeDefined();
                 expect(munge.files['AndroidManifest.xml'].parents['/manifest/application']).toBeDefined();
-                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="AndroidManifest.xml"]'))).write({xml_declaration: false});
+                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="AndroidManifest.xml"]'))).write({ xml_declaration: false });
                 xml = innerXML(xml);
                 expect(get_munge_change(munge, 'AndroidManifest.xml', '/manifest/application', xml).count).toEqual(1);
                 expect(munge.files['res/xml/plugins.xml']).toBeDefined();
                 expect(munge.files['res/xml/plugins.xml'].parents['/plugins']).toBeDefined();
-                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="res/xml/plugins.xml"]'))).write({xml_declaration: false});
+                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="res/xml/plugins.xml"]'))).write({ xml_declaration: false });
                 xml = innerXML(xml);
                 expect(get_munge_change(munge, 'res/xml/plugins.xml', '/plugins', xml).count).toEqual(1);
                 expect(munge.files['res/xml/config.xml']).toBeDefined();
                 expect(munge.files['res/xml/config.xml'].parents['/cordova/plugins']).toBeDefined();
-                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="res/xml/config.xml"]'))).write({xml_declaration: false});
+                xml = (new et.ElementTree(dummy_xml.find('./platform[@name="android"]/config-file[@target="res/xml/config.xml"]'))).write({ xml_declaration: false });
                 xml = innerXML(xml);
                 expect(get_munge_change(munge, 'res/xml/config.xml', '/cordova/plugins', xml).count).toEqual(1);
             });
             it('Test 008 : should split out multiple children of config-file elements into individual leaves', function () {
                 var munger = new configChanges.PlatformMunger('android', temp, 'unused', null, pluginInfoProvider);
-                var munge = munger.generate_plugin_config_munge(pluginInfoProvider.get(childrenplugin), {PACKAGE_NAME: 'com.alunny.childapp'});
+                var munge = munger.generate_plugin_config_munge(pluginInfoProvider.get(childrenplugin), { PACKAGE_NAME: 'com.alunny.childapp' });
                 expect(munge.files['AndroidManifest.xml']).toBeDefined();
                 expect(munge.files['AndroidManifest.xml'].parents['/manifest']).toBeDefined();
                 expect(get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />')).toBeDefined();
@@ -188,7 +189,7 @@ describe('config-changes module', function () {
             });
             it('Test 011 : should take into account interpolation variables', function () {
                 var munger = new configChanges.PlatformMunger('android', temp, 'unused', null, pluginInfoProvider);
-                var munge = munger.generate_plugin_config_munge(pluginInfoProvider.get(childrenplugin), {PACKAGE_NAME: 'ca.filmaj.plugins'});
+                var munge = munger.generate_plugin_config_munge(pluginInfoProvider.get(childrenplugin), { PACKAGE_NAME: 'ca.filmaj.plugins' });
                 expect(get_munge_change(munge, 'AndroidManifest.xml', '/manifest', '<uses-permission android:name="ca.filmaj.plugins.permission.C2D_MESSAGE" />')).toBeDefined();
             });
             it('Test 012 : should create munges for platform-agnostic config.xml changes', function () {
@@ -207,7 +208,7 @@ describe('config-changes module', function () {
         it('Test 014 : should generate config munges for queued plugins', function () {
             fs.copySync(android_two_project, temp);
             var platformJson = PlatformJson.load(plugins_dir, 'android');
-            platformJson.root.prepare_queue.installed = [{'plugin': 'org.test.plugins.dummyplugin', 'vars': {}}];
+            platformJson.root.prepare_queue.installed = [{ 'plugin': 'org.test.plugins.dummyplugin', 'vars': {} }];
             var munger = new configChanges.PlatformMunger('android', temp, platformJson, pluginInfoProvider);
             var spy = spyOn(munger, 'generate_plugin_config_munge').and.returnValue({});
             munger.process(plugins_dir);
@@ -220,7 +221,7 @@ describe('config-changes module', function () {
                 });
                 it('Test 015 : should call graftXML for every new config munge it introduces (every leaf in config munge that does not exist)', function () {
                     var platformJson = PlatformJson.load(plugins_dir, 'android');
-                    platformJson.root.prepare_queue.installed = [{'plugin': 'org.test.plugins.dummyplugin', 'vars': {}}];
+                    platformJson.root.prepare_queue.installed = [{ 'plugin': 'org.test.plugins.dummyplugin', 'vars': {} }];
 
                     var spy = spyOn(xml_helpers, 'graftXML').and.returnValue(true);
 
@@ -557,7 +558,7 @@ describe('config-changes module', function () {
                 install_plugin(varplugin);
 
                 var platformJson = PlatformJson.load(plugins_dir, 'android');
-                platformJson.addInstalledPluginToPrepareQueue('com.adobe.vars', {'API_KEY': 'hi'}, true);
+                platformJson.addInstalledPluginToPrepareQueue('com.adobe.vars', { 'API_KEY': 'hi' }, true);
 
                 var munger = new configChanges.PlatformMunger('android', temp, platformJson, pluginInfoProvider);
                 munger.process(plugins_dir);
@@ -594,7 +595,7 @@ describe('config-changes module', function () {
 
                 // Run through an "install"
                 var platformJson = PlatformJson.load(plugins_dir, 'android');
-                platformJson.addInstalledPluginToPrepareQueue('com.adobe.vars', {'API_KEY': 'canucks'});
+                platformJson.addInstalledPluginToPrepareQueue('com.adobe.vars', { 'API_KEY': 'canucks' });
                 var munger = new configChanges.PlatformMunger('android', temp, platformJson, pluginInfoProvider);
                 munger.process(plugins_dir);
 
@@ -650,7 +651,7 @@ describe('config-changes module', function () {
 
                 // install the var plugin
                 var platformJson = PlatformJson.load(plugins_dir, 'android');
-                platformJson.addInstalledPluginToPrepareQueue('com.adobe.vars', {'API_KEY': 'eat my shorts'});
+                platformJson.addInstalledPluginToPrepareQueue('com.adobe.vars', { 'API_KEY': 'eat my shorts' });
                 var munger = new configChanges.PlatformMunger('android', temp, platformJson, pluginInfoProvider);
                 munger.process(plugins_dir);
 
diff --git a/spec/ConfigParser/ConfigParser.spec.js b/spec/ConfigParser/ConfigParser.spec.js
index 9416863..e78f39b 100644
--- a/spec/ConfigParser/ConfigParser.spec.js
+++ b/spec/ConfigParser/ConfigParser.spec.js
@@ -175,7 +175,7 @@ describe('config.xml parser', function () {
                 expect(plugin.variables.var).toEqual('varvalue');
             });
             it('Test 025 : should allow adding a new plugin', function () {
-                cfg.addPlugin({name: 'myplugin'});
+                cfg.addPlugin({ name: 'myplugin' });
                 var plugins = cfg.doc.findall('plugin');
                 var pluginNames = plugins.map(function (plugin) {
                     return plugin.attrib.name;
@@ -183,9 +183,9 @@ describe('config.xml parser', function () {
                 expect(pluginNames).toContain('myplugin');
             });
             it('Test 026 : should allow adding features with params', function () {
-                cfg.addPlugin({name: 'aplugin'}, [{name: 'paraname', value: 'paravalue'}]);
+                cfg.addPlugin({ name: 'aplugin' }, [{ name: 'paraname', value: 'paravalue' }]);
                 // Additional check for new parameters syntax
-                cfg.addPlugin({name: 'bplugin'}, {paraname: 'paravalue'});
+                cfg.addPlugin({ name: 'bplugin' }, { paraname: 'paravalue' });
                 var plugins = cfg.doc.findall('plugin')
                     .filter(function (plugin) {
                         return plugin.attrib.name === 'aplugin' || plugin.attrib.name === 'bplugin';
diff --git a/spec/CordovaLogger.spec.js b/spec/CordovaLogger.spec.js
index 388dad9..4d6ce4b 100644
--- a/spec/CordovaLogger.spec.js
+++ b/spec/CordovaLogger.spec.js
@@ -168,19 +168,19 @@ describe('CordovaLogger class', function () {
                 };
 
                 resetLogLevel();
-                expect(logger.adjustLevel({verbose: true}).logLevel).toEqual('verbose');
+                expect(logger.adjustLevel({ verbose: true }).logLevel).toEqual('verbose');
 
                 resetLogLevel();
                 expect(logger.adjustLevel(['--verbose']).logLevel).toEqual('verbose');
 
                 resetLogLevel();
-                expect(logger.adjustLevel({silent: true}).logLevel).toEqual('error');
+                expect(logger.adjustLevel({ silent: true }).logLevel).toEqual('error');
 
                 resetLogLevel();
                 expect(logger.adjustLevel(['--silent']).logLevel).toEqual('error');
 
                 resetLogLevel();
-                expect(logger.adjustLevel({verbose: true, silent: true}).logLevel).toEqual('verbose');
+                expect(logger.adjustLevel({ verbose: true, silent: true }).logLevel).toEqual('verbose');
 
                 resetLogLevel();
                 expect(logger.adjustLevel(['--verbose', '--silent']).logLevel).toEqual('verbose');
diff --git a/spec/PlatformJson.spec.js b/spec/PlatformJson.spec.js
index f6845bd..cac5a68 100644
--- a/spec/PlatformJson.spec.js
+++ b/spec/PlatformJson.spec.js
@@ -24,8 +24,8 @@ var ModuleMetadata = PlatformJson.__get__('ModuleMetadata');
 var FAKE_MODULE = {
     name: 'fakeModule',
     src: 'www/fakeModule.js',
-    clobbers: [{target: 'window.fakeClobber'}],
-    merges: [{target: 'window.fakeMerge'}],
+    clobbers: [{ target: 'window.fakeClobber' }],
+    merges: [{ target: 'window.fakeMerge' }],
     runs: true
 };
 
@@ -91,7 +91,7 @@ describe('PlatformJson class', function () {
                     'plugins/otherPlugin/www/module1.js'
                 ];
 
-                platformJson.root.modules = pluginPaths.map(function (p) { return {file: p}; });
+                platformJson.root.modules = pluginPaths.map(function (p) { return { file: p }; });
                 platformJson.removePluginMetadata(fakePlugin);
                 var resultantPaths = platformJson.root.modules
                     .map(function (p) { return p.file; })
@@ -111,7 +111,7 @@ describe('PlatformJson class', function () {
         function evaluateCordovaDefineStatement (str) {
             expect(typeof str).toBe('string');
             const fnString = str.replace(/^\s*cordova\.define\('cordova\/plugin_list',\s*([\s\S]+)\);\s*$/, '($1)');
-            const mod = {exports: {}};
+            const mod = { exports: {} };
             global.eval(fnString)(null, mod.exports, mod); // eslint-disable-line no-eval
             return mod;
         }
@@ -154,7 +154,7 @@ describe('ModuleMetadata class', function () {
     it('Test 010 : should be constructable', function () {
         var meta;
         expect(function () {
-            meta = new ModuleMetadata('fakePlugin', {src: 'www/fakeModule.js'});
+            meta = new ModuleMetadata('fakePlugin', { src: 'www/fakeModule.js' });
         }).not.toThrow();
         expect(meta instanceof ModuleMetadata).toBeTruthy();
     });
@@ -165,26 +165,26 @@ describe('ModuleMetadata class', function () {
     });
 
     it('Test 012 : should guess module id either from name property of from module src', function () {
-        expect(new ModuleMetadata('fakePlugin', {name: 'fakeModule'}).id).toMatch(/fakeModule$/);
-        expect(new ModuleMetadata('fakePlugin', {src: 'www/fakeModule.js'}).id).toMatch(/fakeModule$/);
+        expect(new ModuleMetadata('fakePlugin', { name: 'fakeModule' }).id).toMatch(/fakeModule$/);
+        expect(new ModuleMetadata('fakePlugin', { src: 'www/fakeModule.js' }).id).toMatch(/fakeModule$/);
     });
 
     it('Test 013 : should read "clobbers" property from module', function () {
-        expect(new ModuleMetadata('fakePlugin', {name: 'fakeModule'}).clobbers).not.toBeDefined();
+        expect(new ModuleMetadata('fakePlugin', { name: 'fakeModule' }).clobbers).not.toBeDefined();
         var metadata = new ModuleMetadata('fakePlugin', FAKE_MODULE);
         expect(metadata.clobbers).toEqual(jasmine.any(Array));
         expect(metadata.clobbers[0]).toBe(FAKE_MODULE.clobbers[0].target);
     });
 
     it('Test 014 : should read "merges" property from module', function () {
-        expect(new ModuleMetadata('fakePlugin', {name: 'fakeModule'}).merges).not.toBeDefined();
+        expect(new ModuleMetadata('fakePlugin', { name: 'fakeModule' }).merges).not.toBeDefined();
         var metadata = new ModuleMetadata('fakePlugin', FAKE_MODULE);
         expect(metadata.merges).toEqual(jasmine.any(Array));
         expect(metadata.merges[0]).toBe(FAKE_MODULE.merges[0].target);
     });
 
     it('Test 015 : should read "runs" property from module', function () {
-        expect(new ModuleMetadata('fakePlugin', {name: 'fakeModule'}).runs).not.toBeDefined();
+        expect(new ModuleMetadata('fakePlugin', { name: 'fakeModule' }).runs).not.toBeDefined();
         expect(new ModuleMetadata('fakePlugin', FAKE_MODULE).runs).toBe(true);
     });
 });
diff --git a/spec/PluginInfo/PluginInfo.spec.js b/spec/PluginInfo/PluginInfo.spec.js
index ba20526..98c617a 100644
--- a/spec/PluginInfo/PluginInfo.spec.js
+++ b/spec/PluginInfo/PluginInfo.spec.js
@@ -61,7 +61,7 @@ describe('PluginInfo', function () {
 
     it('Test 003: replace framework src', function () {
         var p = new PluginInfo(path.join(pluginsDir, 'org.test.src'));
-        var result = p.getFrameworks('android', {cli_variables: { FCM_VERSION: '9.0.0' }});
+        var result = p.getFrameworks('android', { cli_variables: { FCM_VERSION: '9.0.0' } });
         expect(result[2].src).toBe('com.google.firebase:firebase-messaging:9.0.0');
     });
 
diff --git a/spec/PluginManager.spec.js b/spec/PluginManager.spec.js
index b606286..b54133a 100644
--- a/spec/PluginManager.spec.js
+++ b/spec/PluginManager.spec.js
@@ -121,7 +121,7 @@ describe('PluginManager class', function () {
                 var metadataPath = path.join(manager.locations.www, 'cordova_plugins.js');
                 var platformWwwMetadataPath = path.join(manager.locations.platformWww, 'cordova_plugins.js');
 
-                manager.addPlugin(new PluginInfo(DUMMY_PLUGIN), {usePlatformWww: true})
+                manager.addPlugin(new PluginInfo(DUMMY_PLUGIN), { usePlatformWww: true })
                     .then(function () {
                         expect(fs.writeFileSync).toHaveBeenCalledWith(metadataPath, jasmine.any(String), 'utf-8');
                         expect(fs.writeFileSync).toHaveBeenCalledWith(platformWwwMetadataPath, jasmine.any(String), 'utf-8');
diff --git a/spec/superspawn.spec.js b/spec/superspawn.spec.js
index bfe2dd7..2b354b1 100644
--- a/spec/superspawn.spec.js
+++ b/spec/superspawn.spec.js
@@ -37,19 +37,19 @@ describe('spawn method', function () {
     });
 
     it('Test 002 : should notify about stdout "data" events', function (done) {
-        superspawn.spawn(LS, [], {stdio: 'pipe'})
+        superspawn.spawn(LS, [], { stdio: 'pipe' })
             .progress(progressSpy)
             .fin(function () {
-                expect(progressSpy).toHaveBeenCalledWith({'stdout': jasmine.any(String)});
+                expect(progressSpy).toHaveBeenCalledWith({ 'stdout': jasmine.any(String) });
                 done();
             });
     });
 
     it('Test 003 : should notify about stderr "data" events', function (done) {
-        superspawn.spawn(LS, ['doesnt-exist'], {stdio: 'pipe'})
+        superspawn.spawn(LS, ['doesnt-exist'], { stdio: 'pipe' })
             .progress(progressSpy)
             .fin(function () {
-                expect(progressSpy).toHaveBeenCalledWith({'stderr': jasmine.any(String)});
+                expect(progressSpy).toHaveBeenCalledWith({ 'stderr': jasmine.any(String) });
                 done();
             });
     });
diff --git a/spec/util/xml-helpers.spec.js b/spec/util/xml-helpers.spec.js
index e117139..b629c96 100644
--- a/spec/util/xml-helpers.spec.js
+++ b/spec/util/xml-helpers.spec.js
@@ -141,7 +141,7 @@ describe('xml-helpers', function () {
         });
         it('Test 013 : should restore attributes at the specified selector', function () {
             var xml = {
-                oldAttrib: {'android:icon': '@drawable/icon', 'android:label': '@string/app_name', 'android:debuggable': 'false'}
+                oldAttrib: { 'android:icon': '@drawable/icon', 'android:label': '@string/app_name', 'android:debuggable': 'false' }
             };
             xml_helpers.pruneXMLRestore(android_manifest_xml, 'application', xml);
             var applicationAttr = android_manifest_xml.find('application').attrib;
@@ -150,7 +150,7 @@ describe('xml-helpers', function () {
         });
         it('Test 014 : should do nothing if the old attributes cannot be found', function () {
             var xml = {
-                notOldAttrib: {'android:icon': '@drawable/icon', 'android:label': '@string/app_name', 'android:debuggable': 'false'}
+                notOldAttrib: { 'android:icon': '@drawable/icon', 'android:label': '@string/app_name', 'android:debuggable': 'false' }
             };
             xml_helpers.pruneXMLRestore(android_manifest_xml, 'application', xml);
             var applicationAttr = android_manifest_xml.find('application').attrib;
@@ -159,7 +159,7 @@ describe('xml-helpers', function () {
         });
         it('Test 015 : should be able to handle absolute selectors', function () {
             var xml = {
-                oldAttrib: {'android:icon': '@drawable/icon', 'android:label': '@string/app_name', 'android:debuggable': 'false'}
+                oldAttrib: { 'android:icon': '@drawable/icon', 'android:label': '@string/app_name', 'android:debuggable': 'false' }
             };
             xml_helpers.pruneXMLRestore(android_manifest_xml, '/manifest/application', xml);
             var applicationAttr = android_manifest_xml.find('application').attrib;
@@ -168,7 +168,7 @@ describe('xml-helpers', function () {
         });
         it('Test 016 : should be able to handle absolute selectors with wildcards', function () {
             var xml = {
-                oldAttrib: {'android:name': 'ChildApp', 'android:label': '@string/app_name', 'android:configChanges': 'orientation|keyboardHidden', 'android:enabled': 'true'}
+                oldAttrib: { 'android:name': 'ChildApp', 'android:label': '@string/app_name', 'android:configChanges': 'orientation|keyboardHidden', 'android:enabled': 'true' }
             };
             xml_helpers.pruneXMLRestore(android_manifest_xml, '/*/*/activity', xml);
             var activityAttr = android_manifest_xml.find('application/activity').attrib;
@@ -177,7 +177,7 @@ describe('xml-helpers', function () {
         });
         it('Test 017 : should be able to handle xpath selectors', function () {
             var xml = {
-                oldAttrib: {'android:name': 'com.phonegap.DroidGap', 'android:label': '@string/app_name', 'android:configChanges': 'orientation|keyboardHidden', 'android:enabled': 'true'}
+                oldAttrib: { 'android:name': 'com.phonegap.DroidGap', 'android:label': '@string/app_name', 'android:configChanges': 'orientation|keyboardHidden', 'android:enabled': 'true' }
             };
             xml_helpers.pruneXMLRestore(android_manifest_xml, 'application/activity[@android:name=\"com.phonegap.DroidGap\"]', xml);
             var activityAttr = android_manifest_xml.find('application/activity[@android:name=\"com.phonegap.DroidGap\"]').attrib;
diff --git a/src/ConfigChanges/ConfigChanges.js b/src/ConfigChanges/ConfigChanges.js
index 87107e5..a695c59 100644
--- a/src/ConfigChanges/ConfigChanges.js
+++ b/src/ConfigChanges/ConfigChanges.js
@@ -291,7 +291,7 @@ function generate_config_xml_munge (config, config_changes, type) {
     config_changes.forEach(function (change) {
         change.xmls.forEach(function (xml) {
             // 1. stringify each xml
-            var stringified = (new et.ElementTree(xml)).write({xml_declaration: false});
+            var stringified = (new et.ElementTree(xml)).write({ xml_declaration: false });
             // 2. add into munge
             if (change.mode) {
                 mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, id: id });
@@ -320,7 +320,7 @@ function generate_plugin_config_munge (pluginInfo, vars, edit_config_changes) {
     changes.forEach(function (change) {
         change.xmls.forEach(function (xml) {
             // 1. stringify each xml
-            var stringified = (new et.ElementTree(xml)).write({xml_declaration: false});
+            var stringified = (new et.ElementTree(xml)).write({ xml_declaration: false });
             // interp vars
             if (vars) {
                 Object.keys(vars).forEach(function (key) {
@@ -454,7 +454,7 @@ function is_conflicting (editchanges, config_munge, self, force) {
         }
     });
 
-    return {conflictFound: conflictFound,
+    return { conflictFound: conflictFound,
         conflictingPlugin: conflictingPlugin,
         conflictingMunge: conflictingMunge,
         configxmlMunge: configxmlMunge,
@@ -466,7 +466,7 @@ function is_conflicting (editchanges, config_munge, self, force) {
 function changedXmlStrList (editchange) {
     var xmlStrList = [];
     editchange.xmls.forEach(function (xml) {
-        var stringified = (new et.ElementTree(xml)).write({xml_declaration: false});
+        var stringified = (new et.ElementTree(xml)).write({ xml_declaration: false });
         xmlStrList.push(stringified);
     });
     return xmlStrList;
diff --git a/src/ConfigChanges/ConfigFile.js b/src/ConfigChanges/ConfigFile.js
index 1dd86d8..151e9b0 100644
--- a/src/ConfigChanges/ConfigFile.js
+++ b/src/ConfigChanges/ConfigFile.js
@@ -90,7 +90,7 @@ function ConfigFile_load () {
 ConfigFile.prototype.save = function ConfigFile_save () {
     var self = this;
     if (self.type === 'xml') {
-        fs.writeFileSync(self.filepath, self.data.write({indent: 4}), 'utf-8');
+        fs.writeFileSync(self.filepath, self.data.write({ indent: 4 }), 'utf-8');
     } else {
         // plist
         var regExp = new RegExp('<string>[ \t\r\n]+?</string>', 'g');
diff --git a/src/ConfigParser/ConfigParser.js b/src/ConfigParser/ConfigParser.js
index 9d6aeec..7f3f7fe 100644
--- a/src/ConfigParser/ConfigParser.js
+++ b/src/ConfigParser/ConfigParser.js
@@ -376,7 +376,7 @@ ConfigParser.prototype = {
         if (variables && typeof variables === 'object' && !Array.isArray(variables)) {
             variables = Object.keys(variables)
                 .map(function (variableName) {
-                    return {name: variableName, value: variables[variableName]};
+                    return { name: variableName, value: variables[variableName] };
                 });
         }
 
@@ -570,7 +570,7 @@ ConfigParser.prototype = {
     },
 
     write: function () {
-        fs.writeFileSync(this.path, this.doc.write({indent: 4}), 'utf-8');
+        fs.writeFileSync(this.path, this.doc.write({ indent: 4 }), 'utf-8');
     }
 };
 
diff --git a/src/FileUpdater.js b/src/FileUpdater.js
index accf63f..fcbb205 100644
--- a/src/FileUpdater.js
+++ b/src/FileUpdater.js
@@ -350,7 +350,7 @@ function mapDirectory (rootDir, subDir, include, exclude) {
 
     function matchGlobArray (path, globs) {
         return globs.some(function (elem) {
-            return minimatch(path, elem, {dot: true});
+            return minimatch(path, elem, { dot: true });
         });
     }
 }
diff --git a/src/PlatformJson.js b/src/PlatformJson.js
index 206093e..4060d68 100644
--- a/src/PlatformJson.js
+++ b/src/PlatformJson.js
@@ -35,7 +35,7 @@ PlatformJson.load = function (plugins_dir, platform) {
 };
 
 PlatformJson.prototype.save = function () {
-    fs.outputJsonSync(this.filePath, this.root, {spaces: 2});
+    fs.outputJsonSync(this.filePath, this.root, { spaces: 2 });
 };
 
 /**
@@ -153,11 +153,11 @@ PlatformJson.prototype.removePluginMetadata = function (pluginInfo) {
 };
 
 PlatformJson.prototype.addInstalledPluginToPrepareQueue = function (pluginDirName, vars, is_top_level, force) {
-    this.root.prepare_queue.installed.push({'plugin': pluginDirName, 'vars': vars, 'topLevel': is_top_level, 'force': force});
+    this.root.prepare_queue.installed.push({ 'plugin': pluginDirName, 'vars': vars, 'topLevel': is_top_level, 'force': force });
 };
 
 PlatformJson.prototype.addUninstalledPluginToPrepareQueue = function (pluginId, is_top_level) {
-    this.root.prepare_queue.uninstalled.push({'plugin': pluginId, 'id': pluginId, 'topLevel': is_top_level});
+    this.root.prepare_queue.uninstalled.push({ 'plugin': pluginId, 'id': pluginId, 'topLevel': is_top_level });
 };
 
 /**
@@ -207,8 +207,8 @@ PlatformJson.prototype.generateAndSaveMetadata = function (destination) {
 
 // convert a munge from the old format ([file][parent][xml] = count) to the current one
 function fix_munge (root) {
-    root.prepare_queue = root.prepare_queue || {installed: [], uninstalled: []};
-    root.config_munge = root.config_munge || {files: {}};
+    root.prepare_queue = root.prepare_queue || { installed: [], uninstalled: [] };
+    root.config_munge = root.config_munge || { files: {} };
     root.installed_plugins = root.installed_plugins || {};
     root.dependent_plugins = root.dependent_plugins || {};
 
diff --git a/src/PluginInfo/PluginInfo.js b/src/PluginInfo/PluginInfo.js
index 0550cb1..afc8809 100644
--- a/src/PluginInfo/PluginInfo.js
+++ b/src/PluginInfo/PluginInfo.js
@@ -52,7 +52,7 @@ function PluginInfo (dirname) {
     function _parsePreference (prefTag) {
         var name = prefTag.attrib.name.toUpperCase();
         var def = prefTag.attrib.default || null;
-        return {preference: name, default: def};
+        return { preference: name, default: def };
     }
 
     // <asset>
@@ -276,19 +276,19 @@ function PluginInfo (dirname) {
                         url: t.attrib.url
                     };
                 }).reduce(function (acc, val) {
-                    return Object.assign({}, acc, {[val.url]: { source: val.url }});
+                    return Object.assign({}, acc, { [val.url]: { source: val.url } });
                 }, {});
             }
             if (pods != null) {
                 declarations = Object.keys(pods.attrib).reduce(function (acc, key) {
-                    return pods.attrib[key] === undefined ? acc : Object.assign({}, acc, {[key]: pods.attrib[key]});
+                    return pods.attrib[key] === undefined ? acc : Object.assign({}, acc, { [key]: pods.attrib[key] });
                 }, {});
                 libraries = pods.findall('pod').map(function (t) {
                     return Object.keys(t.attrib).reduce(function (acc, key) {
-                        return t.attrib[key] === undefined ? acc : Object.assign({}, acc, {[key]: t.attrib[key]});
+                        return t.attrib[key] === undefined ? acc : Object.assign({}, acc, { [key]: t.attrib[key] });
                     }, {});
                 }).reduce(function (acc, val) {
-                    return Object.assign({}, acc, {[val.name]: val});
+                    return Object.assign({}, acc, { [val.name]: val });
                 }, {});
             }
             return {
diff --git a/src/superspawn.js b/src/superspawn.js
index 7ddb89c..22daf88 100644
--- a/src/superspawn.js
+++ b/src/superspawn.js
@@ -95,7 +95,7 @@ exports.spawn = function (cmd, args, opts) {
         child.stdout.setEncoding('utf8');
         child.stdout.on('data', function (data) {
             capturedOut += data;
-            d.notify({'stdout': data});
+            d.notify({ 'stdout': data });
         });
     }
 
@@ -103,7 +103,7 @@ exports.spawn = function (cmd, args, opts) {
         child.stderr.setEncoding('utf8');
         child.stderr.on('data', function (data) {
             capturedErr += data;
-            d.notify({'stderr': data});
+            d.notify({ 'stderr': data });
         });
     }
 


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


[cordova-common] 01/02: Update fs-extra and eslint dependencies

Posted by dp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c2f83b0f3272894892c8eee9939bb4d5e0e89b28
Author: Darryl Pogue <da...@dpogue.ca>
AuthorDate: Sat Nov 3 13:50:26 2018 -0700

    Update fs-extra and eslint dependencies
---
 package.json | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/package.json b/package.json
index 1a1bcbb..fe151d0 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
     "cross-spawn": "^6.0.5",
     "elementtree": "0.1.7",
     "endent": "^1.1.1",
-    "fs-extra": "^6.0.1",
+    "fs-extra": "^7.0.0",
     "glob": "^7.1.2",
     "minimatch": "^3.0.0",
     "plist": "^3.0.1",
@@ -38,13 +38,13 @@
     "which": "^1.3.0"
   },
   "devDependencies": {
-    "eslint": "^4.0.0",
-    "eslint-config-semistandard": "^12.0.1",
-    "eslint-config-standard": "^11.0.0",
-    "eslint-plugin-import": "^2.3.0",
-    "eslint-plugin-node": "^6.0.1",
-    "eslint-plugin-promise": "^3.5.0",
-    "eslint-plugin-standard": "^3.0.1",
+    "eslint": "^5.0.0",
+    "eslint-config-semistandard": "^13.0.0",
+    "eslint-config-standard": "^12.0.0",
+    "eslint-plugin-import": "^2.14.0",
+    "eslint-plugin-node": "^8.0.0",
+    "eslint-plugin-promise": "^4.0.0",
+    "eslint-plugin-standard": "^4.0.0",
     "istanbul": "^0.4.5",
     "jasmine": "~3.1.0",
     "osenv": "^0.1.3",


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