[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

raphinesse commented on issue #22: CB-12397 Package .gitignore when publishing 
to npm
URL: 
https://github.com/apache/cordova-app-hello-world/pull/22#issuecomment-390313156
 
 
   @brodybits I also ran some tests with the following script (run as `node 
foo.js dest template`):
   ```js
   var CordovaLogger = require('cordova-common').CordovaLogger;
   CordovaLogger.get().setLevel(CordovaLogger.VERBOSE);
   
   require('cordova-create')(process.argv[2], null, null, { lib: { www: {
   template: true,
   url: process.argv[3]
   }}}).catch(function (err) {
   console.error(err);
   process.exitCode = 1;
   });
   ```
   Unfortunately I can confirm your results:
   - Works as intended for local templates (files are simply copied by 
`cordova-create`)
   - Renames `.gitignore` to `.npmignore` for templates fetched by 
`cordova-fetch`
   
   What a bummer!


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-13979) getEditConfigs() and getConfigFiles() only work for the first tag

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13979:
-

dpogue closed pull request #19: CB-13979: More consistency for config.xml 
lookups
URL: https://github.com/apache/cordova-common/pull/19
 
 
   

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/spec/fixtures/test-config.xml b/spec/fixtures/test-config.xml
index 5dd79e6..58928f6 100644
--- a/spec/fixtures/test-config.xml
+++ b/spec/fixtures/test-config.xml
@@ -82,6 +82,7 @@
 
 
 
+
 
 
 
diff --git a/src/ConfigParser/ConfigParser.js b/src/ConfigParser/ConfigParser.js
index 095ccf2..f6638b7 100644
--- a/src/ConfigParser/ConfigParser.js
+++ b/src/ConfigParser/ConfigParser.js
@@ -161,7 +161,7 @@ ConfigParser.prototype = {
 pref.attrib.value = value;
 },
 getPlatformPreference: function (name, platform) {
-return findElementAttributeValue(name, 
this.doc.findall('platform[@name=\'' + platform + '\']/preference'));
+return findElementAttributeValue(name, 
this.doc.findall('./platform[@name="' + platform + '"]/preference'));
 },
 getPreference: function (name, platform) {
 
@@ -185,7 +185,7 @@ ConfigParser.prototype = {
 var ret = [];
 var staticResources = [];
 if (platform) { // platform specific icons
-this.doc.findall('platform[@name=\'' + platform + '\']/' + 
resourceName).forEach(function (elt) {
+this.doc.findall('./platform[@name="' + platform + '"]/' + 
resourceName).forEach(function (elt) {
 elt.platform = platform; // mark as platform specific resource
 staticResources.push(elt);
 });
@@ -274,7 +274,7 @@ ConfigParser.prototype = {
 var fileResources = [];
 
 if (platform) { // platform specific resources
-fileResources = this.doc.findall('platform[@name=\'' + platform + 
'\']/resource-file').map(function (tag) {
+fileResources = this.doc.findall('./platform[@name="' + platform + 
'"]/resource-file').map(function (tag) {
 return {
 platform: platform,
 src: tag.attrib.src,
@@ -539,9 +539,7 @@ ConfigParser.prototype = {
 },
 /* Get all edit-config tags */
 getEditConfigs: function (platform) {
-var platform_tag = this.doc.find('./platform[@name="' + platform + 
'"]');
-var platform_edit_configs = platform_tag ? 
platform_tag.findall('edit-config') : [];
-
+var platform_edit_configs = this.doc.findall('./platform[@name="' + 
platform + '"]/edit-config');
 var edit_configs = 
this.doc.findall('edit-config').concat(platform_edit_configs);
 
 return edit_configs.map(function (tag) {
@@ -559,9 +557,7 @@ ConfigParser.prototype = {
 
 /* Get all config-file tags */
 getConfigFiles: function (platform) {
-var platform_tag = this.doc.find('./platform[@name="' + platform + 
'"]');
-var platform_config_files = platform_tag ? 
platform_tag.findall('config-file') : [];
-
+var platform_config_files = this.doc.findall('./platform[@name="' + 
platform + '"]/config-file');
 var config_files = 
this.doc.findall('config-file').concat(platform_config_files);
 
 return config_files.map(function (tag) {


 


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:
us...@infra.apache.org


> getEditConfigs() and getConfigFiles() only work for the first  tag
> 
>
> Key: CB-13979
> URL: https://issues.apache.org/jira/browse/CB-13979
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
>Affects Versions: Master
>Reporter: Kevin Christopher Henry
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> I ran into something strange - my configuration would change based on the 
> ordering of elements in config.xml.
> Looking at the source code, the culprit is getEditConfigs() and 
> getConfigFiles() in ConfigParser.js. Unlike the rest of the code they only 
> look in the first platform tag for config directives:
> {{var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');}}
> {{var platform_edit_configs = platform_tag ? 
> 

[jira] [Resolved] (CB-13979) getEditConfigs() and getConfigFiles() only work for the first tag

2018-05-18 Thread Darryl Pogue (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-13979?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Darryl Pogue resolved CB-13979.
---
Resolution: Fixed

> getEditConfigs() and getConfigFiles() only work for the first  tag
> 
>
> Key: CB-13979
> URL: https://issues.apache.org/jira/browse/CB-13979
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
>Affects Versions: Master
>Reporter: Kevin Christopher Henry
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> I ran into something strange - my configuration would change based on the 
> ordering of elements in config.xml.
> Looking at the source code, the culprit is getEditConfigs() and 
> getConfigFiles() in ConfigParser.js. Unlike the rest of the code they only 
> look in the first platform tag for config directives:
> {{var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');}}
> {{var platform_edit_configs = platform_tag ? 
> platform_tag.findall('edit-config') : [];}}
> This should probably be something like this instead (untested):
> {{var platform_edit_configs = this.doc.findall('./platform[@name="' + 
> platform + '"]/edit-config');}}
> And similarly for getConfigFiles().



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

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



[jira] [Commented] (CB-13979) getEditConfigs() and getConfigFiles() only work for the first tag

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-13979:
--

Commit c700a5d6830fe7401551c4b4ce65c1cccbb85f17 in cordova-common's branch 
refs/heads/master from [~dpogue]
[ https://gitbox.apache.org/repos/asf?p=cordova-common.git;h=c700a5d ]

CB-13979: More consistency for config.xml lookups


> getEditConfigs() and getConfigFiles() only work for the first  tag
> 
>
> Key: CB-13979
> URL: https://issues.apache.org/jira/browse/CB-13979
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
>Affects Versions: Master
>Reporter: Kevin Christopher Henry
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> I ran into something strange - my configuration would change based on the 
> ordering of elements in config.xml.
> Looking at the source code, the culprit is getEditConfigs() and 
> getConfigFiles() in ConfigParser.js. Unlike the rest of the code they only 
> look in the first platform tag for config directives:
> {{var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');}}
> {{var platform_edit_configs = platform_tag ? 
> platform_tag.findall('edit-config') : [];}}
> This should probably be something like this instead (untested):
> {{var platform_edit_configs = this.doc.findall('./platform[@name="' + 
> platform + '"]/edit-config');}}
> And similarly for getConfigFiles().



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

raphinesse commented on issue #22: CB-12397 Package .gitignore when publishing 
to npm
URL: 
https://github.com/apache/cordova-app-hello-world/pull/22#issuecomment-390313156
 
 
   I also ran some tests with the following script (run as `node foo.js dest 
template`):
   ```js
   var CordovaLogger = require('cordova-common').CordovaLogger;
   CordovaLogger.get().setLevel(CordovaLogger.VERBOSE);
   
   require('cordova-create')(process.argv[2], null, null, { lib: { www: {
   template: true,
   url: process.argv[3]
   }}}).catch(function (err) {
   console.error(err);
   process.exitCode = 1;
   });
   ```
   Unfortunately I can confirm your results:
   - Works as intended for local templates (files are simply copied by 
`cordova-create`)
   - Renames `.gitignore` to `.npmignore` for templates fetched by 
`cordova-fetch`
   
   What a bummer!


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-13979) getEditConfigs() and getConfigFiles() only work for the first tag

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13979:
-

stevengill commented on a change in pull request #19: CB-13979: More 
consistency for config.xml lookups
URL: https://github.com/apache/cordova-common/pull/19#discussion_r189374877
 
 

 ##
 File path: spec/fixtures/test-config.xml
 ##
 @@ -82,6 +82,7 @@
 
 
 
+
 
 Review comment:
   Sounds good. Feel free to merge if you feel good about it!


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:
us...@infra.apache.org


> getEditConfigs() and getConfigFiles() only work for the first  tag
> 
>
> Key: CB-13979
> URL: https://issues.apache.org/jira/browse/CB-13979
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
>Affects Versions: Master
>Reporter: Kevin Christopher Henry
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> I ran into something strange - my configuration would change based on the 
> ordering of elements in config.xml.
> Looking at the source code, the culprit is getEditConfigs() and 
> getConfigFiles() in ConfigParser.js. Unlike the rest of the code they only 
> look in the first platform tag for config directives:
> {{var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');}}
> {{var platform_edit_configs = platform_tag ? 
> platform_tag.findall('edit-config') : [];}}
> This should probably be something like this instead (untested):
> {{var platform_edit_configs = this.doc.findall('./platform[@name="' + 
> platform + '"]/edit-config');}}
> And similarly for getConfigFiles().



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

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



[jira] [Commented] (CB-13979) getEditConfigs() and getConfigFiles() only work for the first tag

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13979:
-

dpogue commented on a change in pull request #19: CB-13979: More consistency 
for config.xml lookups
URL: https://github.com/apache/cordova-common/pull/19#discussion_r189370987
 
 

 ##
 File path: spec/fixtures/test-config.xml
 ##
 @@ -82,6 +82,7 @@
 
 
 
+
 
 Review comment:
   All tests pass with the empty platform tag removed.
   
   With these changes, all tests also pass with the empty platform tag added.


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:
us...@infra.apache.org


> getEditConfigs() and getConfigFiles() only work for the first  tag
> 
>
> Key: CB-13979
> URL: https://issues.apache.org/jira/browse/CB-13979
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
>Affects Versions: Master
>Reporter: Kevin Christopher Henry
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> I ran into something strange - my configuration would change based on the 
> ordering of elements in config.xml.
> Looking at the source code, the culprit is getEditConfigs() and 
> getConfigFiles() in ConfigParser.js. Unlike the rest of the code they only 
> look in the first platform tag for config directives:
> {{var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');}}
> {{var platform_edit_configs = platform_tag ? 
> platform_tag.findall('edit-config') : [];}}
> This should probably be something like this instead (untested):
> {{var platform_edit_configs = this.doc.findall('./platform[@name="' + 
> platform + '"]/edit-config');}}
> And similarly for getConfigFiles().



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

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



[jira] [Commented] (CB-13979) getEditConfigs() and getConfigFiles() only work for the first tag

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13979:
-

stevengill commented on a change in pull request #19: CB-13979: More 
consistency for config.xml lookups
URL: https://github.com/apache/cordova-common/pull/19#discussion_r189370745
 
 

 ##
 File path: spec/fixtures/test-config.xml
 ##
 @@ -82,6 +82,7 @@
 
 
 
+
 
 Review comment:
   hmm, so if you remove the empty platform tag, the rest of the tests fail? 
Does that mean this might break for people who don't have two platform tags?


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:
us...@infra.apache.org


> getEditConfigs() and getConfigFiles() only work for the first  tag
> 
>
> Key: CB-13979
> URL: https://issues.apache.org/jira/browse/CB-13979
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
>Affects Versions: Master
>Reporter: Kevin Christopher Henry
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> I ran into something strange - my configuration would change based on the 
> ordering of elements in config.xml.
> Looking at the source code, the culprit is getEditConfigs() and 
> getConfigFiles() in ConfigParser.js. Unlike the rest of the code they only 
> look in the first platform tag for config directives:
> {{var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');}}
> {{var platform_edit_configs = platform_tag ? 
> platform_tag.findall('edit-config') : [];}}
> This should probably be something like this instead (untested):
> {{var platform_edit_configs = this.doc.findall('./platform[@name="' + 
> platform + '"]/edit-config');}}
> And similarly for getConfigFiles().



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

raphinesse commented on issue #22: CB-12397 Package .gitignore when publishing 
to npm
URL: 
https://github.com/apache/cordova-app-hello-world/pull/22#issuecomment-390286241
 
 
   Thanks for the testing, I will take another look at this.


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

brodybits commented on issue #8: CB-12397 fix .gitignore for plugins & 
platforms (cordova-create part)
URL: https://github.com/apache/cordova-create/pull/8#issuecomment-390278226
 
 
   As I said in 

 I think we still need a workaround solution like this one due to NPM behavior, 
reopening for discussion.
   
   I am about to take a long weekend, will be back next Tuesday.


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

brodybits commented on issue #8: CB-12397 fix .gitignore for plugins & 
platforms (cordova-create part)
URL: https://github.com/apache/cordova-create/pull/8#issuecomment-390278226
 
 
   As I said in 

 I think we still need a workaround solution like this one due to NPM behavior, 
reopening for discussion.
   
   I am about to take a long weekend, will be back next Tuesday.
   
   _P.S. I would be happy to rebase and retest sometime next week._


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

brodybits opened a new pull request #8: CB-12397 fix .gitignore for plugins & 
platforms (cordova-create part)
URL: https://github.com/apache/cordova-create/pull/8
 
 
   
   
   ### Platforms affected
   
   All
   
   ### What does this PR do?
   
   Workaround for [Apache Cordova 
CB-12397](https://issues.apache.org/jira/browse/CB-12397): include .gitignore 
from `template_src` subdirectory of `cordova-app-hello-world`, needed due to 
the npm .gitignore/.npmignore behavior discussed in:
   - npm/npm#1862
   - npm/npm#3763
   - npm/npm#7252
   
   NOTE: Another part of the fix for  [Apache Cordova 
CB-12397](https://issues.apache.org/jira/browse/CB-12397) is in 
, to be 
raised after this PR.
   
   Additional commits:
   - cleanup: remove trailing whitespace
   - general updates to test suite
   
   ### What testing has been done on this change?
   
    Unit test
   
   Test suite updated to verify that `.gitignore` is included in the generated 
app when the standard `cordova-app-hello-world` template is used.
   
    Cordova CLI test
   
   - Using `cordova-cli` test version in 
 which uses 
local test installation of `cordova-lib` from 
 due to 
limitations discussed in npm/npm#2974.
   - `cordova-lib` in 
 references 
`cordova-create` in 
 which 
includes this fix.
   - `cordova-create` in 
 references 
`cordova-app-hello-world` in 
 
which includes the `cordova-app-hello-world` fix in 
.
   
   **Testing with results and other output on Windows:**
   
   ```
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ npm install -g https://github.com/brodybits/cordova-cli#cb-12397-devtest1
   npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
   C:\Users\Chris\nvs\node\7.10.0\x64\cordova -> 
C:\Users\Chris\nvs\node\7.10.0\x64\node_modules\cordova\bin\cordova
   C:\Users\Chris\nvs\node\7.10.0\x64
   `-- cordova@7.0.2-cb-12397-devtest1  
(git+https://github.com/brodybits/cordova-cli.git#9f4648d5565b098434187aa3da251beca8d68dae)
   [...]
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ cordova --version
   7.0.2-cb-12397-devtest1
   
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ cordova create cb-12397-testapp1
   Creating a new cordova project.
   
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ ls -a !$
   History expansion: ls -a cb-12397-testapp1
   ./  ../  .gitignore  .npmignore  config.xml  hooks/  package.json  
platforms/  plugins/  res/  www/
   
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ cat cb-12397-testapp1\.gitignore
   # macOS
   .DS_Store
   
   # Generated by Cordova
   plugins
   platforms
   
   C:\Users\Chris\Documents\chris-work\cb-12397-dev
   λ
   ```
   
   `.gitignore` is now present in the generated app, with `plugins` and 
`platforms` as needed
   
   ### Checklist
   - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
   - [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
   - [x] Added automated test coverage as appropriate for this change.
   
   


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with 

[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

brodybits commented on issue #22: CB-12397 Package .gitignore when publishing 
to npm
URL: 
https://github.com/apache/cordova-app-hello-world/pull/22#issuecomment-390277676
 
 
   I tested as follows:
   - 
 
branch on GitHub that includes the change in 
`github:raphinesse/cordova-app-hello-world#package-gitignore`
   -  
branch that includes 
`github:brodybits/cordova-create#cb-package-gitignore-test1` (cordova-create 
test branch above)
   -  
branch that includes `github:brodybits/cordova-lib#cb-package-gitignore-test1` 
(cordova-lib test branch above)
   
   If I would try using my test version of cordova-cli to create a new project 
I would get a new project with `.npmignore`, NOT with `.gitignore`. I would not 
expect a different result if we would publish this change and update the 
upstream packages on NPM.
   
   I think we still need a workaround solution like I proposed in 
apache/cordova-create#8 to resolve the issue, will reopen for discussion.


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Resolved] (CB-14064) Remove Node 4 from CI - cordova-common

2018-05-18 Thread Darryl Pogue (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-14064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Darryl Pogue resolved CB-14064.
---
Resolution: Fixed

> Remove Node 4 from CI - cordova-common
> --
>
> Key: CB-14064
> URL: https://issues.apache.org/jira/browse/CB-14064
> Project: Apache Cordova
>  Issue Type: Sub-task
>  Components: cordova-common
>Reporter: Darryl Pogue
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: CI, pull-request-available
>




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

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



[jira] [Resolved] (CB-11691) Plugin can't modify binary plists

2018-05-18 Thread Darryl Pogue (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-11691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Darryl Pogue resolved CB-11691.
---
Resolution: Fixed
  Assignee: Darryl Pogue

> Plugin  can't modify binary plists
> ---
>
> Key: CB-11691
> URL: https://issues.apache.org/jira/browse/CB-11691
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
> Environment: Mac OS X version: 10.11.6
> Node version: v0.12.7
> Cordova version: 6.3.0
>Reporter: Sky Kelsey
>Assignee: Darryl Pogue
>Priority: Major
>
> https://github.com/apache/cordova-lib/blob/master/cordova-common/src/util/plist-helpers.js#L27
> Cordova expects plists to be in XML format, and not binary. However, it fails 
> to apply changes silently, masking the problem. Can you please log failures 
> to modify config files, and ideally also add support for binary plists? All 
> plists are generated as binary in xcode projects by default, so anyone who 
> develops a plugin and needs to modify a plist is going to hit this issue.



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

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



[jira] [Commented] (CB-13532) Cordova fails to find platform/plugin versions in package.json devDependencies

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13532:
-

dpogue closed pull request #609: CB-13532: Find plugins in devDependencies
URL: https://github.com/apache/cordova-lib/pull/609
 
 
   

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/spec/cordova/plugin/add.spec.js b/spec/cordova/plugin/add.spec.js
index 4164f9c5b..eb07adce4 100644
--- a/spec/cordova/plugin/add.spec.js
+++ b/spec/cordova/plugin/add.spec.js
@@ -65,9 +65,10 @@ describe('cordova/plugin/add', function () {
 plugin_info_provider_revert_mock = add.__set__('PluginInfoProvider', 
plugin_info_provider_mock);
 spyOn(fs, 'existsSync').and.returnValue(false);
 spyOn(fs, 'writeFileSync').and.returnValue(false);
-package_json_mock = jasmine.createSpyObj('package json mock', 
['cordova', 'dependencies']);
+package_json_mock = jasmine.createSpyObj('package json mock', 
['cordova', 'dependencies', 'devDependencies']);
 package_json_mock.cordova = {};
 package_json_mock.dependencies = {};
+package_json_mock.devDependencies = {};
 // requireNoCache is used to require package.json
 spyOn(cordova_util, 
'requireNoCache').and.returnValue(package_json_mock);
 spyOn(events, 'emit');
@@ -168,7 +169,7 @@ describe('cordova/plugin/add', function () {
 
 spyOn(fs, 'readFileSync').and.returnValue('file');
 add(projectRoot, hook_mock, {plugins: 
['cordova-plugin-device'], cli_variables: cli_plugin_variables, save: 
'true'}).then(function () {
-
expect(fs.writeFileSync).toHaveBeenCalledWith(jasmine.any(String), 
JSON.stringify({'cordova': {'plugins': {'cordova-plugin-device': 
cli_plugin_variables}}, 'dependencies': {}}, null, 2), 'utf8');
+
expect(fs.writeFileSync).toHaveBeenCalledWith(jasmine.any(String), 
JSON.stringify({'cordova': {'plugins': {'cordova-plugin-device': 
cli_plugin_variables}}, 'dependencies': {}, 'devDependencies': {}}, null, 2), 
'utf8');
 }).fail(function (e) {
 fail('fail handler unexpectedly invoked');
 console.log(e);
@@ -259,6 +260,24 @@ describe('cordova/plugin/add', function () {
 console.log(e);
 }).done(done);
 });
+it('should retrieve plugin version from package.json devDependencies 
(if exists)', function (done) {
+fs.existsSync.and.callFake(function (file_path) {
+if (path.basename(file_path) === 'package.json') {
+return true;
+} else {
+return false;
+}
+});
+
+package_json_mock.devDependencies['cordova-plugin-device'] = 
'^1.0.0';
+
+add.determinePluginTarget(projectRoot, Cfg_parser_mock, 
'cordova-plugin-device', {}).then(function (target) {
+expect(target).toEqual('cordova-plugin-device@^1.0.0');
+}).fail(function (e) {
+fail('fail handler unexpectedly invoked');
+console.log(e);
+}).done(done);
+});
 it('should retrieve plugin version from config.xml as a last resort', 
function (done) {
 add.getVersionFromConfigFile.and.returnValue('~1.0.0');
 add.determinePluginTarget(projectRoot, Cfg_parser_mock, 
'cordova-plugin-device', {}).then(function (target) {
diff --git a/src/cordova/plugin/add.js b/src/cordova/plugin/add.js
index 65a75812c..8aea7f0a7 100644
--- a/src/cordova/plugin/add.js
+++ b/src/cordova/plugin/add.js
@@ -177,6 +177,8 @@ function add (projectRoot, hooksRunner, opts) {
 var parsedSpec = pluginSpec.parse(target);
 if (pkgJson && pkgJson.dependencies && 
pkgJson.dependencies[pluginInfo.id]) {
 attributes.spec = 
pkgJson.dependencies[pluginInfo.id];
+} else if (pkgJson && pkgJson.devDependencies && 
pkgJson.devDependencies[pluginInfo.id]) {
+attributes.spec = 
pkgJson.devDependencies[pluginInfo.id];
 } else {
 if (parsedSpec.scope) {
 attributes.spec = parsedSpec.package + '@' 
+ ver;
@@ -232,6 +234,9 @@ function determinePluginTarget (projectRoot, cfg, target, 
fetchOptions) {
 if (pkgJson && pkgJson.dependencies && pkgJson.dependencies[id]) {
 events.emit('verbose', 'No version specified for ' + id + ', 
retrieving version from package.json');

[jira] [Commented] (CB-13532) Cordova fails to find platform/plugin versions in package.json devDependencies

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-13532:
--

Commit 52f9ac05ed30f24ec95fe1ea93a8753f0bda7beb in cordova-lib's branch 
refs/heads/master from [~dpogue]
[ https://gitbox.apache.org/repos/asf?p=cordova-lib.git;h=52f9ac0 ]

CB-13532: Find plugins in devDependencies


> Cordova fails to find platform/plugin versions in package.json devDependencies
> --
>
> Key: CB-13532
> URL: https://issues.apache.org/jira/browse/CB-13532
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-lib
>Reporter: Darryl Pogue
>Assignee: Audrey So
>Priority: Major
>  Labels: tools-next
>
> Cordova only looks at the {{dependencies}} section of package.json, and 
> ignores anything specified in {{devDependencies}}. This results in the 
> default pinned versions for platforms/plugins being used.
> Code in question: 
> https://github.com/apache/cordova-lib/blob/da8ebf6cb81dd84c22e24fdf0baff9837a544b2d/src/cordova/platform/addHelper.js#L109-L113
> This is wrong because Cordova (and its related bits) is not a dependency of 
> my application code, it is a build tool that belongs in devDependencies.



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

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



[jira] [Commented] (CB-14064) Remove Node 4 from CI - cordova-common

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-14064:
--

Commit adf90039c1a42bf1664dba91dbadaac504b82f5a in cordova-common's branch 
refs/heads/master from [~dpogue]
[ https://gitbox.apache.org/repos/asf?p=cordova-common.git;h=adf9003 ]

CB-14064: Remove Node 4 from CI matrix


> Remove Node 4 from CI - cordova-common
> --
>
> Key: CB-14064
> URL: https://issues.apache.org/jira/browse/CB-14064
> Project: Apache Cordova
>  Issue Type: Sub-task
>  Components: cordova-common
>Reporter: Darryl Pogue
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: CI, pull-request-available
>




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

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



[jira] [Commented] (CB-14064) Remove Node 4 from CI - cordova-common

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-14064:
-

dpogue closed pull request #15: CB-14064: Dependency updates & drop node4 CI
URL: https://github.com/apache/cordova-common/pull/15
 
 
   

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/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 000..91582f4
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,22 @@
+
+
+### Platforms affected
+
+
+### What does this PR do?
+
+
+### What testing has been done on this change?
+
+
+### Checklist
+- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in 
the JIRA database
+- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
+- [ ] Added automated test coverage as appropriate for this change.
diff --git a/.travis.yml b/.travis.yml
index 4592c3e..25b631d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,9 +3,9 @@ sudo: false
 git:
   depth: 10
 node_js:
-  - "4"
   - "6"
   - "8"
+  - "10"
 install:
   - npm install
   - npm install -g codecov
diff --git a/appveyor.yml b/appveyor.yml
index ffe5194..f34dfbd 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -3,10 +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 7e0b096..609e8ff 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,7 @@
   },
   "main": "cordova-common.js",
   "engines": {
-"node": ">=4.0.0"
+"node": ">=6.0.0"
   },
   "scripts": {
 "test": "npm run eslint && npm run jasmine",
@@ -26,29 +26,27 @@
 "ansi": "^0.3.1",
 "bplist-parser": "^0.1.0",
 "cordova-registry-mapper": "^1.1.8",
-"elementtree": "0.1.6",
-"glob": "^5.0.13",
+"elementtree": "0.1.7",
+"glob": "^7.1.2",
 "minimatch": "^3.0.0",
-"osenv": "^0.1.3",
-"plist": "^1.2.0",
+"plist": "^3.0.1",
 "q": "^1.4.1",
-"semver": "^5.0.1",
-"shelljs": "^0.5.3",
-"underscore": "^1.8.3",
-"unorm": "^1.3.3"
+"shelljs": "^0.8.1",
+"underscore": "^1.8.3"
   },
   "devDependencies": {
 "eslint": "^4.0.0",
-"eslint-config-semistandard": "^11.0.0",
-"eslint-config-standard": "^10.2.1",
+"eslint-config-semistandard": "^12.0.1",
+"eslint-config-standard": "^11.0.0",
 "eslint-plugin-import": "^2.3.0",
-"eslint-plugin-node": "^5.0.0",
+"eslint-plugin-node": "^6.0.1",
 "eslint-plugin-promise": "^3.5.0",
 "eslint-plugin-standard": "^3.0.1",
 "istanbul": "^0.4.5",
-"jasmine": "^2.5.2",
+"jasmine": "^3.1.0",
+"osenv": "^0.1.3",
 "promise-matchers": "^0.9.6",
-"rewire": "^2.5.1"
+"rewire": "^4.0.1"
   },
   "contributors": []
 }
diff --git a/src/superspawn.js b/src/superspawn.js
index 424934e..8051184 100644
--- a/src/superspawn.js
+++ b/src/superspawn.js
@@ -35,7 +35,7 @@ function resolveWindowsExe (cmd) {
 if (isValidExe(cmd)) {
 return cmd;
 }
-cmd = shell.which(cmd) || cmd;
+cmd = String(shell.which(cmd) || cmd);
 if (!isValidExe(cmd)) {
 winExtensions.some(function (ext) {
 if (fs.existsSync(cmd + ext)) {


 


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:
us...@infra.apache.org


> Remove Node 4 from CI - cordova-common
> --
>
> Key: CB-14064
> URL: https://issues.apache.org/jira/browse/CB-14064
> Project: Apache Cordova
>  Issue Type: Sub-task
>  Components: cordova-common
>Reporter: Darryl Pogue
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: CI, pull-request-available
>




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

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



[jira] [Commented] (CB-11691) Plugin can't modify binary plists

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-11691:
--

Commit 9b4937493a397246188fee8284f62b9507a14c75 in cordova-common's branch 
refs/heads/master from [~dpogue]
[ https://gitbox.apache.org/repos/asf?p=cordova-common.git;h=9b49374 ]

CB-11691: Fix for modifying binary plists

The bplist-parser module returns the plist dictionary object wrapped in
an array. When making modifications with `` or
``, it would add the changes as properties to the array but
then ignore them when writing out to the filesystem.


> Plugin  can't modify binary plists
> ---
>
> Key: CB-11691
> URL: https://issues.apache.org/jira/browse/CB-11691
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
> Environment: Mac OS X version: 10.11.6
> Node version: v0.12.7
> Cordova version: 6.3.0
>Reporter: Sky Kelsey
>Priority: Major
>
> https://github.com/apache/cordova-lib/blob/master/cordova-common/src/util/plist-helpers.js#L27
> Cordova expects plists to be in XML format, and not binary. However, it fails 
> to apply changes silently, masking the problem. Can you please log failures 
> to modify config files, and ideally also add support for binary plists? All 
> plists are generated as binary in xcode projects by default, so anyone who 
> develops a plugin and needs to modify a plist is going to hit this issue.



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

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



[jira] [Commented] (CB-11691) Plugin can't modify binary plists

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-11691:
-

dpogue closed pull request #20: CB-11691: Fix for modifying binary plists
URL: https://github.com/apache/cordova-common/pull/20
 
 
   

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/spec/ConfigChanges/ConfigChanges.spec.js 
b/spec/ConfigChanges/ConfigChanges.spec.js
index 0e200ae..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/*');
@@ -425,6 +426,19 @@ describe('config-changes module', function () {
 expect(fs.readFileSync(path.join(temp, 'SampleApp', 
'SampleApp-Info.plist'), 
'utf-8')).not.toMatch(/(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(/UINewsstandIcon<\/key>[\s\S]*CFBundlePrimaryIcon<\/key>/);
+expect(fs.readFileSync(path.join(temp, 'SampleApp', 
'SampleApp-binary.plist'), 'utf-8')).toMatch(/schema-b<\/string>/);
+expect(fs.readFileSync(path.join(temp, 'SampleApp', 
'SampleApp-binary.plist'), 
'utf-8')).not.toMatch(/(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/fixtures/plugins/org.apache.bplist/plugin.xml 
b/spec/fixtures/plugins/org.apache.bplist/plugin.xml
new file mode 100644
index 000..ea6f1f9
--- /dev/null
+++ b/spec/fixtures/plugins/org.apache.bplist/plugin.xml
@@ -0,0 +1,54 @@
+
+
+
+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">
+
+Binary PList updates
+
+
+
+
+
+UINewsstandIcon
+
+CFBundleIconFiles
+
+Newsstand-Cover-Icon.png
+newsstand-cover-i...@2x.png
+
+UINewsstandBindingType
+UINewsstandBindingTypeMagazine
+UINewsstandBindingEdge
+UINewsstandBindingEdgeLeft
+
+
+
+
+
+
+schema-a
+schema-b
+
+
+
+
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 000..67a5811
Binary files /dev/null and 
b/spec/fixtures/projects/ios-config-xml/SampleApp/SampleApp-binary.plist differ
diff --git a/src/ConfigChanges/ConfigFile.js b/src/ConfigChanges/ConfigFile.js
index eb6df45..2e5ed5f 100644
--- a/src/ConfigChanges/ConfigFile.js
+++ b/src/ConfigChanges/ConfigFile.js
@@ -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 = 

[jira] [Resolved] (CB-13770) Warn when target file of or is not found

2018-05-18 Thread Darryl Pogue (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-13770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Darryl Pogue resolved CB-13770.
---
Resolution: Fixed

> Warn when target file of  or  is not found
> 
>
> Key: CB-13770
> URL: https://issues.apache.org/jira/browse/CB-13770
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-common
>Reporter: Jacques Caron
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> When one uses  or  in config.xml or plugin.xml, 
> files that are not found are silently ignored.
> Adding a warning, and including where the file is actually looked for helps 
> when debugging such config elements.
> PR upcoming.



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

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



[jira] [Commented] (CB-13770) Warn when target file of or is not found

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-13770:
--

Commit acf133346579a96217d280a8c3186e07d7fc3ef7 in cordova-common's branch 
refs/heads/master from [~jcaron]
[ https://gitbox.apache.org/repos/asf?p=cordova-common.git;h=acf1333 ]

CB-13770: Warn when  or  not found

When a file is referenced in  or  is not
found, no warning or error is generated.

This change logs a warning, and includes where the file is actually
expected to be based on the filename provided.


> Warn when target file of  or  is not found
> 
>
> Key: CB-13770
> URL: https://issues.apache.org/jira/browse/CB-13770
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-common
>Reporter: Jacques Caron
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> When one uses  or  in config.xml or plugin.xml, 
> files that are not found are silently ignored.
> Adding a warning, and including where the file is actually looked for helps 
> when debugging such config elements.
> PR upcoming.



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

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



[jira] [Commented] (CB-13770) Warn when target file of or is not found

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13770:
-

dpogue closed pull request #18: CB-13770: Warn when  or 
 not found
URL: https://github.com/apache/cordova-common/pull/18
 
 
   

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/src/ConfigChanges/ConfigChanges.js 
b/src/ConfigChanges/ConfigChanges.js
index 1780d25..e7ad0e2 100644
--- a/src/ConfigChanges/ConfigChanges.js
+++ b/src/ConfigChanges/ConfigChanges.js
@@ -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');
 }
 }
 }


 


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:
us...@infra.apache.org


> Warn when target file of  or  is not found
> 
>
> Key: CB-13770
> URL: https://issues.apache.org/jira/browse/CB-13770
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-common
>Reporter: Jacques Caron
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> When one uses  or  in config.xml or plugin.xml, 
> files that are not found are silently ignored.
> Adding a warning, and including where the file is actually looked for helps 
> when debugging such config elements.
> PR upcoming.



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

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



[jira] [Commented] (CB-11691) Plugin can't modify binary plists

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-11691:
-

codecov-io commented on issue #20: CB-11691: Fix for modifying binary plists
URL: https://github.com/apache/cordova-common/pull/20#issuecomment-388537764
 
 
   # 
[Codecov](https://codecov.io/gh/apache/cordova-common/pull/20?src=pr=h1) 
Report
   > Merging 
[#20](https://codecov.io/gh/apache/cordova-common/pull/20?src=pr=desc) into 
[master](https://codecov.io/gh/apache/cordova-common/commit/8d6511e0d9821e4c0127564d74cca1dc533bf24c?src=pr=desc)
 will **increase** coverage by `0.05%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/cordova-common/pull/20/graphs/tree.svg?token=jsbcYRuqT5=650=150=pr)](https://codecov.io/gh/apache/cordova-common/pull/20?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master  #20  +/-   ##
   ==
   + Coverage   85.23%   85.29%   +0.05% 
   ==
 Files  19   19  
 Lines1768 1768  
 Branches  376  376  
   ==
   + Hits 1507 1508   +1 
   + Misses261  260   -1
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/cordova-common/pull/20?src=pr=tree) | 
Coverage Δ | |
   |---|---|---|
   | 
[src/ConfigChanges/ConfigFile.js](https://codecov.io/gh/apache/cordova-common/pull/20/diff?src=pr=tree#diff-c3JjL0NvbmZpZ0NoYW5nZXMvQ29uZmlnRmlsZS5qcw==)
 | `89.85% <100%> (+0.72%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/cordova-common/pull/20?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/cordova-common/pull/20?src=pr=footer).
 Last update 
[8d6511e...393cda1](https://codecov.io/gh/apache/cordova-common/pull/20?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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:
us...@infra.apache.org


> Plugin  can't modify binary plists
> ---
>
> Key: CB-11691
> URL: https://issues.apache.org/jira/browse/CB-11691
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
> Environment: Mac OS X version: 10.11.6
> Node version: v0.12.7
> Cordova version: 6.3.0
>Reporter: Sky Kelsey
>Priority: Major
>
> https://github.com/apache/cordova-lib/blob/master/cordova-common/src/util/plist-helpers.js#L27
> Cordova expects plists to be in XML format, and not binary. However, it fails 
> to apply changes silently, masking the problem. Can you please log failures 
> to modify config files, and ideally also add support for binary plists? All 
> plists are generated as binary in xcode projects by default, so anyone who 
> develops a plugin and needs to modify a plist is going to hit this issue.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

raphinesse commented on issue #22: CB-12397 Package .gitignore when publishing 
to npm
URL: 
https://github.com/apache/cordova-app-hello-world/pull/22#issuecomment-390266240
 
 
   `npm pack` with my local npm 6 on Linux. I already thought that we should 
test this with some test publish to see that there's no funny stuff happening.


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

brodybits commented on issue #22: CB-12397 Package .gitignore when publishing 
to npm
URL: 
https://github.com/apache/cordova-app-hello-world/pull/22#issuecomment-390265408
 
 
   How was this tested?


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

raphinesse opened a new pull request #22: CB-12397 Package .gitignore when 
publishing to npm
URL: https://github.com/apache/cordova-app-hello-world/pull/22
 
 
   For further details see discussion starting at:
   https://github.com/apache/cordova-discuss/issues/69#issuecomment-390199958


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-13979) getEditConfigs() and getConfigFiles() only work for the first tag

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13979:
-

dpogue commented on a change in pull request #19: CB-13979: More consistency 
for config.xml lookups
URL: https://github.com/apache/cordova-common/pull/19#discussion_r189279473
 
 

 ##
 File path: spec/fixtures/test-config.xml
 ##
 @@ -82,6 +82,7 @@
 
 
 
+
 
 Review comment:
   That is what causes the bug described in CB-13979, although I agree it's a 
weird scenario.
   
   If I add the empty platform tag without the rest of these changes, existing 
tests fail.
   With these changes, they pass even when the empty platform tag is present.


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:
us...@infra.apache.org


> getEditConfigs() and getConfigFiles() only work for the first  tag
> 
>
> Key: CB-13979
> URL: https://issues.apache.org/jira/browse/CB-13979
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
>Affects Versions: Master
>Reporter: Kevin Christopher Henry
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> I ran into something strange - my configuration would change based on the 
> ordering of elements in config.xml.
> Looking at the source code, the culprit is getEditConfigs() and 
> getConfigFiles() in ConfigParser.js. Unlike the rest of the code they only 
> look in the first platform tag for config directives:
> {{var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');}}
> {{var platform_edit_configs = platform_tag ? 
> platform_tag.findall('edit-config') : [];}}
> This should probably be something like this instead (untested):
> {{var platform_edit_configs = this.doc.findall('./platform[@name="' + 
> platform + '"]/edit-config');}}
> And similarly for getConfigFiles().



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

brodybits commented on issue #8: CB-12397 fix .gitignore for plugins & 
platforms (cordova-create part)
URL: https://github.com/apache/cordova-create/pull/8#issuecomment-390211527
 
 
   Closing in favor of the solution proposed by @raphinesse in 
.


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

brodybits closed pull request #8: CB-12397 fix .gitignore for plugins & 
platforms (cordova-create part)
URL: https://github.com/apache/cordova-create/pull/8
 
 
   

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/index.js b/index.js
index 827f158..fabaefd 100644
--- a/index.js
+++ b/index.js
@@ -40,8 +40,8 @@ if (!global_config_path) {
  * This will make the create internal events visible outside
  * @param  {EventEmitter} externalEventEmitter An EventEmitter instance that 
will be used for
  *   logging purposes. If no EventEmitter provided, all events will be logged 
to console
- * @return {EventEmitter} 
- */ 
+ * @return {EventEmitter}
+ */
 function setupEvents(externalEventEmitter) {
 if (externalEventEmitter) {
 // This will make the platform internal events visible outside
@@ -49,7 +49,7 @@ function setupEvents(externalEventEmitter) {
 }
 // There is no logger if external emitter is not present,
 // so attach a console logger
-else { 
+else {
 CordovaLogger.subscribe(events);
 }
 return events;
@@ -59,9 +59,9 @@ function setupEvents(externalEventEmitter) {
  * Usage:
  * @dir - directory where the project will be created. Required.
  * @optionalId - app id. Required (but be "undefined")
- * @optionalName - app name. Required (but can be "undefined"). 
+ * @optionalName - app name. Required (but can be "undefined").
  * @cfg - extra config to be saved in .cordova/config.json Required (but can 
be "{}").
- * @extEvents - An EventEmitter instance that will be used for logging 
purposes. Required (but can be "undefined"). 
+ * @extEvents - An EventEmitter instance that will be used for logging 
purposes. Required (but can be "undefined").
  **/
 // Returns a promise.
 module.exports = function(dir, optionalId, optionalName, cfg, extEvents) {
@@ -224,7 +224,7 @@ module.exports = function(dir, optionalId, optionalName, 
cfg, extEvents) {
 }).then(function(input_directory) {
 var import_from_path = input_directory;
 
-//handle when input wants to specify sub-directory (specified in 
index.js as "dirname" export); 
+//handle when input wants to specify sub-directory (specified in 
index.js as "dirname" export);
 var isSubDir = false;
 try {
 // Delete cached require incase one exists
@@ -254,7 +254,16 @@ module.exports = function(dir, optionalId, optionalName, 
cfg, extEvents) {
 
 // get stock hooks; used if template does not contain hooks
 paths.hooks = path.join(require('cordova-app-hello-world').dirname, 
'hooks');
-
+
+// CB-12397 add .gitignore for plugins & platforms to app template
+// get stock .npmignore; used if template does not contain .gitignore
+// NOTE: This is part of a workaround for the npm .gitignore/.npmignore
+// behavior discussed in:
+// https://github.com/npm/npm/issues/1862
+// https://github.com/npm/npm/issues/3763
+// https://github.com/npm/npm/issues/7252
+paths.npmignore = 
path.join(require('cordova-app-hello-world').dirname, '.npmignore');
+
 // ToDo: get stock package.json if template does not contain 
package.json;
 var dirAlreadyExisted = fs.existsSync(dir);
 if (!dirAlreadyExisted) {
@@ -271,13 +280,23 @@ module.exports = function(dir, optionalId, optionalName, 
cfg, extEvents) {
 if (!!cfg.lib.www.link)
 linkFromTemplate(import_from_path, dir);
 
-// If following were not copied/linked from template, copy from 
stock app hello world
+// If following were not copied/linked from template,
+// copy from stock cordova-app-hello-world:
 copyIfNotExists(paths.www, path.join(dir, 'www'));
 copyIfNotExists(paths.hooks, path.join(dir, 'hooks'));
 var configXmlExists = projectConfig(dir); //moves config to root 
if in www
 if (paths.configXml && !configXmlExists) {
 shell.cp(paths.configXml, path.join(dir, 'config.xml'));
 }
+
+// CB-12397 add .gitignore for plugins & platforms to app template
+// get stock .npmignore; used if template does not contain 
.gitignore
+// NOTE: This is part of a workaround for the npm 
.gitignore/.npmignore
+// behavior discussed in:
+// https://github.com/npm/npm/issues/1862
+// https://github.com/npm/npm/issues/3763
+// 

[jira] [Commented] (CB-14098) Remove unused res folder from app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-14098:
-

raphinesse opened a new pull request #21: CB-14098: Remove unused res folder
URL: https://github.com/apache/cordova-app-hello-world/pull/21
 
 
   ### Platforms affected
   All
   
   ### What does this PR do?
   Remove unused icons and splash screens from this template to save 10MiB in 
every cordova project created from it and every installation of `cordova`.
   
   ### What testing has been done on this change?
   Manual. I can create a new project with this, `add platform android` and 
`run` it. Has no obviously missing assets.
   
   ### Checklist
   - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
   - [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
   - [ ] Added automated test coverage as appropriate for this change.
   


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:
us...@infra.apache.org


> Remove unused res folder from app template
> --
>
> Key: CB-14098
> URL: https://issues.apache.org/jira/browse/CB-14098
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world
>Affects Versions: 3.11.0
>Reporter: Raphael
>Priority: Major
>
> The res folder weighs around 10MiB and contains resources for a whole lot of 
> platforms, most of which are actually deprecated. Furthermore, as I 
> understand the included `README.md` (which I'm not sure I do), the contents 
> of this folder seem to not even being used for anything.
> So my proposal is to remove this directory from the template. That would 
> decrease the installation size of `cordova` by about two thirds and remove 
> unnecessary clutter from any newly created apps.
> If I did get anything wrong and this is actually used, we should probably 
> clarify the README, remove all content related to deprecated platforms (like 
> suggested in CB-13726) and run them through some compressors (pngquant and 
> zopflipng).



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-12397:
--

Commit f7c85137256e050856e8fe9341ed3b2ba0c319f1 in cordova-app-hello-world's 
branch refs/heads/master from Christopher J. Brody
[ https://gitbox.apache.org/repos/asf?p=cordova-app-hello-world.git;h=f7c8513 ]

CB-12397 fix .gitignore for plugins & platforms


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

stevengill closed pull request #19: CB-12397 fix .gitignore for plugins & 
platforms
URL: https://github.com/apache/cordova-app-hello-world/pull/19
 
 
   

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/.gitignore b/.gitignore
index fd29596..a0090b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-# OS X
+# macOS
 .DS_Store
diff --git a/template_src/.gitignore b/template_src/.gitignore
index fd29596..5e1e597 100644
--- a/template_src/.gitignore
+++ b/template_src/.gitignore
@@ -1,2 +1,8 @@
-# OS X
 .DS_Store
+
+# Generated by package manager
+node_modules/
+
+# Generated by Cordova
+/plugins/
+/platforms/


 


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-12397:
--

Commit 56487d25f2b532cb10123bb3d972cb431233d4af in cordova-app-hello-world's 
branch refs/heads/master from [~stevegill]
[ https://gitbox.apache.org/repos/asf?p=cordova-app-hello-world.git;h=56487d2 ]

Merge pull request #19 from brodybits/cb-12397

CB-12397 fix .gitignore for plugins & platforms

> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Created] (CB-14098) Remove unused res folder from app template

2018-05-18 Thread Raphael (JIRA)
Raphael created CB-14098:


 Summary: Remove unused res folder from app template
 Key: CB-14098
 URL: https://issues.apache.org/jira/browse/CB-14098
 Project: Apache Cordova
  Issue Type: Improvement
  Components: cordova-app-hello-world
Affects Versions: 3.11.0
Reporter: Raphael


The res folder weighs around 10MiB and contains resources for a whole lot of 
platforms, most of which are actually deprecated. Furthermore, as I understand 
the included `README.md` (which I'm not sure I do), the contents of this folder 
seem to not even being used for anything.

So my proposal is to remove this directory from the template. That would 
decrease the installation size of `cordova` by about two thirds and remove 
unnecessary clutter from any newly created apps.

If I did get anything wrong and this is actually used, we should probably 
clarify the README, remove all content related to deprecated platforms (like 
suggested in CB-13726) and run them through some compressors (pngquant and 
zopflipng).



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

raphinesse commented on issue #19: CB-12397 fix .gitignore for plugins & 
platforms
URL: 
https://github.com/apache/cordova-app-hello-world/pull/19#issuecomment-390181647
 
 
   See 
https://github.com/apache/cordova-discuss/issues/69#issuecomment-390180355 for 
a complete `.gitgnore` that fixes another problem with this one.


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

stevengill commented on issue #19: CB-12397 fix .gitignore for plugins & 
platforms
URL: 
https://github.com/apache/cordova-app-hello-world/pull/19#issuecomment-390180769
 
 
   Yes we should


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-13502) Android - add support for "setRate" method already available on iOS

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13502:
-

pelcomppl commented on issue #152: CB-13502: (android) Implementation of 
setRate method for Android Marshmallow and later
URL: 
https://github.com/apache/cordova-plugin-media/pull/152#issuecomment-389782665
 
 
   Hi @jh3141, @stevengill 
   I added your changes to /node_modules/cordova-plugin-media but when I run my 
application on smartfon with `ionic cordova run android` the application not 
see this changes.
   Do you have an idea why it is so?


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:
us...@infra.apache.org


> Android - add support for "setRate" method already available on iOS
> ---
>
> Key: CB-13502
> URL: https://issues.apache.org/jira/browse/CB-13502
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-plugin-media
>Reporter: Julian Hall
>Priority: Minor
>
> The iOS media plugin supports a method "setRate" which changes the playback 
> rate.  Android has support for this feature in the MediaPlayer class used by 
> the media plugin since API version 23 (Marshmallow), therefore supporting 
> this method there is very easy.



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

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



[jira] [Commented] (CB-8098) Media plugin change plackback rate

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-8098:


pelcomppl commented on issue #130: CB-8098 & CB-7810:(android) Added media rate 
for android
URL: 
https://github.com/apache/cordova-plugin-media/pull/130#issuecomment-389782475
 
 
   Hi @dellagustin, @ghenry22, @cordova-qa 
   I added your changes to /node_modules/cordova-plugin-media but when I run my 
application on smartfon with `ionic cordova run android` the application not 
see this changes.
   Do you have an idea why it is so?
   


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:
us...@infra.apache.org


> Media plugin change plackback rate
> --
>
> Key: CB-8098
> URL: https://issues.apache.org/jira/browse/CB-8098
> Project: Apache Cordova
>  Issue Type: New Feature
>  Components: cordova-plugin-media
>Affects Versions: 3.5.0
>Reporter: Alex
>Priority: Major
>
> Doesn't Media plugin support chanding playback rate? I dind't find any 
> mention in docs. I think this fis must even flaw HTML5 audio has it.



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

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



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-12397:
-

raphinesse commented on issue #19: CB-12397 fix .gitignore for plugins & 
platforms
URL: 
https://github.com/apache/cordova-app-hello-world/pull/19#issuecomment-390159457
 
 
   Since adding a platform after creating a new project generates a 
`node_modules` dir this should be in `.gitignore` too. Should we slip this in 
with this one?


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:
us...@infra.apache.org


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



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

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



[jira] [Commented] (CB-14054) cordova-serve not aware of cordova-android directory restructuring in v7+

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-14054:
--

Commit 2c6aa99e4e254935fe14ba16e5075ef74cc68712 in cordova-serve's branch 
refs/heads/master from [~stevegill]
[ https://gitbox.apache.org/repos/asf?p=cordova-serve.git;h=2c6aa99 ]

Merge pull request #7 from zeprone/master

CB-14054: fixing cordova-android directory restructuring. (backward compatible)

> cordova-serve not aware of cordova-android directory restructuring in v7+
> -
>
> Key: CB-14054
> URL: https://issues.apache.org/jira/browse/CB-14054
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-android, cordova-serve
>Affects Versions: cordova-android-7.0.0
> Environment: **
>  * Cordova VS Code extension version: 1.3.9
>  * VSCode version: 1.22.2
>  * OS platform and version: Windows 10 Education x64 v10.0.16299.402
>  * NodeJS version: 8.11.1
>  * Cordova version: 8.0.0
>  * Cordova-Android/iOS/Windows version: 7.0.0 (also tried 7.1.0)
>  
>Reporter: Russell Allen
>Assignee: Joe Bowser
>Priority: Major
>
> The cordova-serve plugin detects the platform {{www}} root wrong: in 
> android@7.0 it has moved from {{assets/www}} to {{app/src/main/assets/www}}.
> When using android@6.4.0, the issue doesn't persist.
> Discovered when using VS Code to emulate app (as Android) in browser. Please 
> see [https://github.com/Microsoft/vscode-cordova/issues/386] 



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

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



[jira] [Commented] (CB-14054) cordova-serve not aware of cordova-android directory restructuring in v7+

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-14054:
--

Commit 5266b867533caac4d3d8e99ac221058847bbc3b0 in cordova-serve's branch 
refs/heads/master from [~ZeProne]
[ https://gitbox.apache.org/repos/asf?p=cordova-serve.git;h=5266b86 ]

CB-14054: (android) fixing cordova-android directory restructuring.


> cordova-serve not aware of cordova-android directory restructuring in v7+
> -
>
> Key: CB-14054
> URL: https://issues.apache.org/jira/browse/CB-14054
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-android, cordova-serve
>Affects Versions: cordova-android-7.0.0
> Environment: **
>  * Cordova VS Code extension version: 1.3.9
>  * VSCode version: 1.22.2
>  * OS platform and version: Windows 10 Education x64 v10.0.16299.402
>  * NodeJS version: 8.11.1
>  * Cordova version: 8.0.0
>  * Cordova-Android/iOS/Windows version: 7.0.0 (also tried 7.1.0)
>  
>Reporter: Russell Allen
>Assignee: Joe Bowser
>Priority: Major
>
> The cordova-serve plugin detects the platform {{www}} root wrong: in 
> android@7.0 it has moved from {{assets/www}} to {{app/src/main/assets/www}}.
> When using android@6.4.0, the issue doesn't persist.
> Discovered when using VS Code to emulate app (as Android) in browser. Please 
> see [https://github.com/Microsoft/vscode-cordova/issues/386] 



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

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



[jira] [Commented] (CB-14054) cordova-serve not aware of cordova-android directory restructuring in v7+

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-14054:
-

stevengill closed pull request #7: CB-14054: fixing cordova-android directory 
restructuring. (backward compatible)
URL: https://github.com/apache/cordova-serve/pull/7
 
 
   

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/src/util.js b/src/util.js
index 242e96f..57cdef2 100644
--- a/src/util.js
+++ b/src/util.js
@@ -25,15 +25,15 @@ var path = require('path');
 // into the actual platform.
 
 var platforms = {
-amazon_fireos: {www_dir: 'assets/www'},
-android: {www_dir: 'assets/www'},
-blackberry10: {www_dir: 'www'},
-browser: {www_dir: 'www'},
-firefoxos: {www_dir: 'www'},
-ios: {www_dir: 'www'},
-ubuntu: {www_dir: 'www'},
-windows: {www_dir: 'www'},
-wp8: {www_dir: 'www'}
+amazon_fireos: { www_dir: 'assets/www' },
+android: { www_dir: 'assets/www' },
+blackberry10: { www_dir: 'www' },
+browser: { www_dir: 'www' },
+firefoxos: { www_dir: 'www' },
+ios: { www_dir: 'www' },
+ubuntu: { www_dir: 'www' },
+windows: { www_dir: 'www' },
+wp8: { www_dir: 'www' }
 };
 
 /**
@@ -76,7 +76,14 @@ function getPlatformWwwRoot (cordovaProjectRoot, 
platformName) {
 if (!platform) {
 throw new Error('Unrecognized platform: ' + platformName);
 }
-return path.join(cordovaProjectRoot, 'platforms', platformName, 
platform.www_dir);
+
+try {
+var Api = require(path.join(cordovaProjectRoot, 'platforms', 
platformName, 'cordova/api'));
+return new Api().locations.www;
+} catch (e) {
+// Fallback on hardcoded paths if platform api not found
+return path.join(cordovaProjectRoot, 'platforms', platformName, 
platform.www_dir);
+}
 }
 
 function isRootDir (dir) {


 


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:
us...@infra.apache.org


> cordova-serve not aware of cordova-android directory restructuring in v7+
> -
>
> Key: CB-14054
> URL: https://issues.apache.org/jira/browse/CB-14054
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-android, cordova-serve
>Affects Versions: cordova-android-7.0.0
> Environment: **
>  * Cordova VS Code extension version: 1.3.9
>  * VSCode version: 1.22.2
>  * OS platform and version: Windows 10 Education x64 v10.0.16299.402
>  * NodeJS version: 8.11.1
>  * Cordova version: 8.0.0
>  * Cordova-Android/iOS/Windows version: 7.0.0 (also tried 7.1.0)
>  
>Reporter: Russell Allen
>Assignee: Joe Bowser
>Priority: Major
>
> The cordova-serve plugin detects the platform {{www}} root wrong: in 
> android@7.0 it has moved from {{assets/www}} to {{app/src/main/assets/www}}.
> When using android@6.4.0, the issue doesn't persist.
> Discovered when using VS Code to emulate app (as Android) in browser. Please 
> see [https://github.com/Microsoft/vscode-cordova/issues/386] 



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

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



[jira] [Commented] (CB-14054) cordova-serve not aware of cordova-android directory restructuring in v7+

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on CB-14054:
--

Commit b5b435bc2562e631e814e1cf86034b9f19315745 in cordova-serve's branch 
refs/heads/master from [~ZeProne]
[ https://gitbox.apache.org/repos/asf?p=cordova-serve.git;h=b5b435b ]

CB-14054: (android) amend with @TimBarham suggestion.


> cordova-serve not aware of cordova-android directory restructuring in v7+
> -
>
> Key: CB-14054
> URL: https://issues.apache.org/jira/browse/CB-14054
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-android, cordova-serve
>Affects Versions: cordova-android-7.0.0
> Environment: **
>  * Cordova VS Code extension version: 1.3.9
>  * VSCode version: 1.22.2
>  * OS platform and version: Windows 10 Education x64 v10.0.16299.402
>  * NodeJS version: 8.11.1
>  * Cordova version: 8.0.0
>  * Cordova-Android/iOS/Windows version: 7.0.0 (also tried 7.1.0)
>  
>Reporter: Russell Allen
>Assignee: Joe Bowser
>Priority: Major
>
> The cordova-serve plugin detects the platform {{www}} root wrong: in 
> android@7.0 it has moved from {{assets/www}} to {{app/src/main/assets/www}}.
> When using android@6.4.0, the issue doesn't persist.
> Discovered when using VS Code to emulate app (as Android) in browser. Please 
> see [https://github.com/Microsoft/vscode-cordova/issues/386] 



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

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



[jira] [Commented] (CB-14096) Landing page still shows deprecated platforms

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-14096:
-

stevengill commented on issue #818: CB-14096: Remove deprecated platforms from 
landing page
URL: https://github.com/apache/cordova-docs/pull/818#issuecomment-390145426
 
 
   Can you attach a before and after screenshot? This sounds good but I dont 
have time to build it. 


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:
us...@infra.apache.org


> Landing page still shows deprecated platforms
> -
>
> Key: CB-14096
> URL: https://issues.apache.org/jira/browse/CB-14096
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-docs
>Reporter: Gearóid M
>Priority: Minor
>
> The [landing page|http://cordova.apache.org/] still shows icons for 
> deprecated platforms such as Blackberry and Firefox OS. These should be 
> removed.



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

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



[jira] [Commented] (CB-11691) Plugin can't modify binary plists

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-11691:
-

stevengill commented on a change in pull request #20: CB-11691: Fix for 
modifying binary plists
URL: https://github.com/apache/cordova-common/pull/20#discussion_r189204842
 
 

 ##
 File path: spec/fixtures/plugins/org.apache.bplist/plugin.xml
 ##
 @@ -0,0 +1,54 @@
+
+
+
+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">
+
+Binary PList updates
+
+
+
+
+
 
 Review comment:
   *nit: should code under `config-file` be intended 


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:
us...@infra.apache.org


> Plugin  can't modify binary plists
> ---
>
> Key: CB-11691
> URL: https://issues.apache.org/jira/browse/CB-11691
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
> Environment: Mac OS X version: 10.11.6
> Node version: v0.12.7
> Cordova version: 6.3.0
>Reporter: Sky Kelsey
>Priority: Major
>
> https://github.com/apache/cordova-lib/blob/master/cordova-common/src/util/plist-helpers.js#L27
> Cordova expects plists to be in XML format, and not binary. However, it fails 
> to apply changes silently, masking the problem. Can you please log failures 
> to modify config files, and ideally also add support for binary plists? All 
> plists are generated as binary in xcode projects by default, so anyone who 
> develops a plugin and needs to modify a plist is going to hit this issue.



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

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



[jira] [Commented] (CB-13979) getEditConfigs() and getConfigFiles() only work for the first tag

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13979:
-

stevengill commented on a change in pull request #19: CB-13979: More 
consistency for config.xml lookups
URL: https://github.com/apache/cordova-common/pull/19#discussion_r189202426
 
 

 ##
 File path: spec/fixtures/test-config.xml
 ##
 @@ -82,6 +82,7 @@
 
 
 
+
 
 Review comment:
   Why the extra android here? 


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:
us...@infra.apache.org


> getEditConfigs() and getConfigFiles() only work for the first  tag
> 
>
> Key: CB-13979
> URL: https://issues.apache.org/jira/browse/CB-13979
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common
>Affects Versions: Master
>Reporter: Kevin Christopher Henry
>Assignee: Darryl Pogue
>Priority: Minor
>  Labels: pull-request-available
>
> I ran into something strange - my configuration would change based on the 
> ordering of elements in config.xml.
> Looking at the source code, the culprit is getEditConfigs() and 
> getConfigFiles() in ConfigParser.js. Unlike the rest of the code they only 
> look in the first platform tag for config directives:
> {{var platform_tag = this.doc.find('./platform[@name="' + platform + '"]');}}
> {{var platform_edit_configs = platform_tag ? 
> platform_tag.findall('edit-config') : [];}}
> This should probably be something like this instead (untested):
> {{var platform_edit_configs = this.doc.findall('./platform[@name="' + 
> platform + '"]/edit-config');}}
> And similarly for getConfigFiles().



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

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



[jira] [Commented] (CB-14097) Camera plugin crashes using getPicture on some files

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-14097:
-

BMarinos opened a new pull request #322: CB-14097: (android) Fix crash when 
selecting some files with getPicture
URL: https://github.com/apache/cordova-plugin-camera/pull/322
 
 
   Handles both urls:
   content://com.android.providers.downloads.documents/document/
   
content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2Ffilename.pdf
   
   
   
   ### Platforms affected
   Android
   
   
   ### What does this PR do?
   Fixes crash of certain URLs
   
   ### What testing has been done on this change?
   manual testing
   
   ### Checklist
   - [ x ] [Reported an 
issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
   - [ x ] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
   - [ ? ] Added automated test coverage as appropriate for this change.
   


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:
us...@infra.apache.org


> Camera plugin crashes using getPicture on some files
> 
>
> Key: CB-14097
> URL: https://issues.apache.org/jira/browse/CB-14097
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-camera
>Affects Versions: Master
> Environment: At least tested on:
> Cordova 7.1.0
> Camera 4.0.3
> But the code is the same in master branch.
>Reporter: B. van Mensvoort
>Priority: Critical
> Fix For: Master
>
> Attachments: logcat.txt
>
>
> My app uses navigator.camera.getPicture to select files from a library.
> After selecting some files, the app crashes. Some files go well and it 
> doesn't seem to happen on all devices.
> The crash happens in the FileHelper.java file and it the exception is:
> {{java.lang.NumberFormatException: For input string: 
> "raw:/storage/emulated/0/Download/filename.PDF"}}
> It seems to be caused the way files are saved on the device. The urls of the 
> files are different. When resaving the file, the URL can be as expected.
> Expected URL:
> {{content://com.android.providers.downloads.documents/document/}}
> Error URL:
> {{content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2Ffilename.pdf}}
> The fix is the same as: 
> [https://github.com/severianremi/uCrop/commit/9e2bb067631ac3bd3817c0fb55c51db3d61edfe0]
>  



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

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



[jira] [Created] (CB-14097) Camera plugin crashes using getPicture on some files

2018-05-18 Thread B. van Mensvoort (JIRA)
B. van Mensvoort created CB-14097:
-

 Summary: Camera plugin crashes using getPicture on some files
 Key: CB-14097
 URL: https://issues.apache.org/jira/browse/CB-14097
 Project: Apache Cordova
  Issue Type: Bug
  Components: cordova-plugin-camera
Affects Versions: Master
 Environment: At least tested on:

Cordova 7.1.0
Camera 4.0.3

But the code is the same in master branch.
Reporter: B. van Mensvoort
 Fix For: Master
 Attachments: logcat.txt

My app uses navigator.camera.getPicture to select files from a library.

After selecting some files, the app crashes. Some files go well and it doesn't 
seem to happen on all devices.

The crash happens in the FileHelper.java file and it the exception is:

{{java.lang.NumberFormatException: For input string: 
"raw:/storage/emulated/0/Download/filename.PDF"}}

It seems to be caused the way files are saved on the device. The urls of the 
files are different. When resaving the file, the URL can be as expected.

Expected URL:

{{content://com.android.providers.downloads.documents/document/}}

Error URL:

{{content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2Ffilename.pdf}}

The fix is the same as: 
[https://github.com/severianremi/uCrop/commit/9e2bb067631ac3bd3817c0fb55c51db3d61edfe0]

 



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

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



[jira] [Commented] (CB-14096) Landing page still shows deprecated platforms

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-14096:
-

Menardi opened a new pull request #818: CB-14096: Remove deprecated platforms 
from landing page
URL: https://github.com/apache/cordova-docs/pull/818
 
 
   
   
   ### Platforms affected
   Website
   
   ### What does this PR do?
   Removes the following deprecated platforms from the landing page:
- Blackberry
- Ubuntu
- Firefox
- webOS
- FireOS
   
   ### What testing has been done on this change?
   Manual visual testing
   
   ### Checklist
   - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
   - [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
   - [ ] Added automated test coverage as appropriate for this change.
   


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:
us...@infra.apache.org


> Landing page still shows deprecated platforms
> -
>
> Key: CB-14096
> URL: https://issues.apache.org/jira/browse/CB-14096
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-docs
>Reporter: Gearóid M
>Priority: Minor
>
> The [landing page|http://cordova.apache.org/] still shows icons for 
> deprecated platforms such as Blackberry and Firefox OS. These should be 
> removed.



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

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



[jira] [Created] (CB-14096) Landing page still shows deprecated platforms

2018-05-18 Thread JIRA
Gearóid Moroney created CB-14096:


 Summary: Landing page still shows deprecated platforms
 Key: CB-14096
 URL: https://issues.apache.org/jira/browse/CB-14096
 Project: Apache Cordova
  Issue Type: Bug
  Components: cordova-docs
Reporter: Gearóid Moroney


The [landing page|http://cordova.apache.org/] still shows icons for deprecated 
platforms such as Blackberry and Firefox OS. These should be removed.



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

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



[jira] [Commented] (CB-14054) cordova-serve not aware of cordova-android directory restructuring in v7+

2018-05-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-14054:
-

zeprone commented on issue #7: CB-14054: fixing cordova-android directory 
restructuring. (backward compatible)
URL: https://github.com/apache/cordova-serve/pull/7#issuecomment-390109635
 
 
   I do not know if the "amend" commit (which is not a real git amend) had 
generated a notification yesterday, so -> done :)
   This PR contains now your suggestion with eslint fix


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:
us...@infra.apache.org


> cordova-serve not aware of cordova-android directory restructuring in v7+
> -
>
> Key: CB-14054
> URL: https://issues.apache.org/jira/browse/CB-14054
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-android, cordova-serve
>Affects Versions: cordova-android-7.0.0
> Environment: **
>  * Cordova VS Code extension version: 1.3.9
>  * VSCode version: 1.22.2
>  * OS platform and version: Windows 10 Education x64 v10.0.16299.402
>  * NodeJS version: 8.11.1
>  * Cordova version: 8.0.0
>  * Cordova-Android/iOS/Windows version: 7.0.0 (also tried 7.1.0)
>  
>Reporter: Russell Allen
>Assignee: Joe Bowser
>Priority: Major
>
> The cordova-serve plugin detects the platform {{www}} root wrong: in 
> android@7.0 it has moved from {{assets/www}} to {{app/src/main/assets/www}}.
> When using android@6.4.0, the issue doesn't persist.
> Discovered when using VS Code to emulate app (as Android) in browser. Please 
> see [https://github.com/Microsoft/vscode-cordova/issues/386] 



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

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