[jira] [Commented] (CB-13624) Review and revise contribs docs

2017-12-11 Thread ASF subversion and git services (JIRA)

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

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

Commit e7735468b62c16a9d2d9bf65b5e44e6e1405c9f9 in cordova-coho's branch 
refs/heads/master from Jan Piotrowski
[ https://gitbox.apache.org/repos/asf?p=cordova-coho.git;h=e773546 ]

CB-13624: note that commands are applied on `master` branch

> Review and revise contribs docs
> ---
>
> Key: CB-13624
> URL: https://issues.apache.org/jira/browse/CB-13624
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-coho, cordova-docs
>Reporter: Audrey So
>Assignee: Audrey So
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13651) Denying location permission causes app to not function correctly

2017-12-11 Thread Sergio Azpiazu Amilibia (JIRA)

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

Sergio Azpiazu Amilibia commented on CB-13651:
--

Here it's a simple app with the problem.

When location permission is denied, the app becomes sluggish. To test, click on 
input field and see how the keyboard becomes unresponsive.

https://www.dropbox.com/sh/eep3yh86dllcjwn/AAA6aTl5R_Ozd2VlFN99DzNTa?dl=0

> Denying location permission causes app to not function correctly
> 
>
> Key: CB-13651
> URL: https://issues.apache.org/jira/browse/CB-13651
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-geolocation
>Affects Versions: cordova@7.0.0
> Environment: Android 8.0
>Reporter: Sergio Azpiazu Amilibia
>  Labels: newbie
>
> Denying location access to the app (checking the "do not ask again" box on 
> the second query, or doing this through the app settings in the Settings) 
> causes the app to crash. Apparently, it's trying to check for permissions 
> time and time again making the app completely unusable and unresponsive



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13650) Javascript functions with default parameters cause app to be inoperable

2017-12-11 Thread Suraj Pindoria (JIRA)

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

Suraj Pindoria commented on CB-13650:
-

At first glance, I don't think this is an issue with Cordova but instead an 
issue with iOS. Most likely the older version of iOS does not support default 
parameters as it was introduced in the newer spec for Javascript. 

> Javascript functions with default parameters cause app to be inoperable
> ---
>
> Key: CB-13650
> URL: https://issues.apache.org/jira/browse/CB-13650
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-ios
>Affects Versions: cordova@7.1.0
> Environment: Xcode 
> 9.2
> cordova --version
> 7.1.0
> Installed platforms:
>   ios 4.5.1
> iOS
> 9.3.5  (which is latest version available for iPod Touch)
>Reporter: Ralph Gossa
>Assignee: Suraj Pindoria
>
> Having Javascript functions with default parameters cause app to be 
> inoperable on certain iOS platforms
> How to re-create the issue:
> cordova create test
> cd test
> cordova platform add ios
> Open the generated test.xcodeproj with Xcode
>  
> Add a javascript function with a default parameter to index.js, example:
> /* default parameter causes app to be inoperable on iPod touch running iOS 
> 9.3*/
> function foo (a, b = 1) {
>   b = 1;
>   return b;
> }
> App with default parameters runs find in emulator and on iPhones running 
> current iOS.
> However app does not initialize properly on iPod Touch running iOS 9.3.  It 
> was working okay until I upgraded XCode and cordova.  The function does not 
> even need to be called for the app to become inoperable.
> If the default parameter is removed from the Javascript function, the app 
> runs fine.
> XCode output with Javascript function containing default parameter
> -begin--
> 2017-12-08 10:29:41.783 paramtest[1125:133765] DiskCookieStorage changing 
> policy from 2 to 0, cookie file: 
> file:///private/var/mobile/Containers/Data/Application/1C726E4F-A05A-418A-A37F-1877E71B1E60/Library/Cookies/Cookies.binarycookies
> 2017-12-08 10:29:41.962 paramtest[1125:133765] Apache Cordova native platform 
> version 4.5.3 is starting.
> 2017-12-08 10:29:41.964 paramtest[1125:133765] Multi-tasking -> Device: YES, 
> App: YES
> 2017-12-08 10:29:41.993 paramtest[1125:133765] 
> Started backup to iCloud! Please be careful.
> Your application might be rejected by Apple if you store too much data.
> For more information please read "iOS Data Storage Guidelines" at:
> https://developer.apple.com/icloud/documentation/data-storage/
> To disable web storage backup to iCloud, set the BackupWebStorage preference 
> to "local" in the Cordova config.xml file
> 2017-12-08 10:29:42.132 paramtest[1125:133765] Using UIWebView
> 2017-12-08 10:29:42.145 paramtest[1125:133765] [CDVTimer][console] 0.753999ms
> 2017-12-08 10:29:42.148 paramtest[1125:133765] [CDVTimer][handleopenurl] 
> 0.678003ms
> 2017-12-08 10:29:42.158 paramtest[1125:133765] 
> [CDVTimer][intentandnavigationfilter] 9.851992ms
> 2017-12-08 10:29:42.159 paramtest[1125:133765] [CDVTimer][gesturehandler] 
> 0.428021ms
> 2017-12-08 10:29:42.159 paramtest[1125:133765] [CDVTimer][TotalPluginStartup] 
> 15.917003ms
> 2017-12-08 10:29:42.799 paramtest[1125:133765] Resetting plugins due to page 
> load.
> 2017-12-08 10:29:43.167 paramtest[1125:133765] Finished load of: 
> file:///var/containers/Bundle/Application/81B5D70F-0B1F-455E-AB84-FA6BE125EEC2/paramtest.app/www/index.html
> --end



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156236362
 
 

 ##
 File path: spec/cordova/platform/index.spec.js
 ##
 @@ -137,16 +137,16 @@ describe('cordova/platform', function () {
 fail('did not expect fail handler to be invoked');
 }).done(done);
 });
-it('should direct `save` commands to the `save` method/module', 
function (done) {
-spyOn(platform, 'save').and.returnValue(true);
-platform('save', ['android'])
-.then(function () {
-expect(platform.save).toHaveBeenCalled();
-}).fail(function (e) {
-expect(e).toBeUndefined();
-fail('did not expect fail handler to be invoked');
-}).done(done);
-});
+// it('should direct `save` commands to the `save` method/module', 
function (done) {
 
 Review comment:
   delete


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156232488
 
 

 ##
 File path: src/cordova/platform/index.js
 ##
 @@ -34,7 +33,7 @@ module.exports.update = function update (hooksRunner, 
projectRoot, targets, opts
 module.exports.remove = require('./remove');
 module.exports.check = require('./check');
 module.exports.list = require('./list');
-module.exports.save = require('./save');
+// module.exports.save = require('./save');
 
 Review comment:
   delete


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156232465
 
 

 ##
 File path: src/cordova/platform/index.js
 ##
 @@ -80,9 +79,8 @@ function platform (command, targets, opts) {
 return module.exports.update(hooksRunner, projectRoot, targets, 
opts);
 case 'check':
 return module.exports.check(hooksRunner, projectRoot);
-case 'save':
-events.emit('warn', 'This command has been deprecated and will be 
removed in the next major release of cordova.');
-return module.exports.save(hooksRunner, projectRoot, opts);
+// case 'save':
 
 Review comment:
   delete


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156235679
 
 

 ##
 File path: integration-tests/pkgJson.spec.js
 ##
 @@ -621,15 +621,15 @@ describe('During add, if pkg.json has a platform/plugin 
spec, use that one.', fu
 var iosVersion;
 var cwd = process.cwd();
 var iosDirectory = path.join(cwd, 'platforms/ios/cordova/version');
-var platformsFolderPath = path.join(cwd, 'platforms/platforms.json');
+//var platformsFolderPath = path.join(cwd, 'platforms/platforms.json');
 
 Review comment:
   delete


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156232426
 
 

 ##
 File path: src/cordova/platform/remove.js
 ##
 @@ -25,7 +25,7 @@ var events = require('cordova-common').events;
 var npmUninstall = require('cordova-fetch').uninstall;
 var cordova_util = require('../util');
 var config = require('../config');
-var platformMetadata = require('../platform_metadata');
+// var platformMetadata = require('../platform_metadata');
 
 Review comment:
   delete


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156232597
 
 

 ##
 File path: src/cordova/platform/addHelper.js
 ##
 @@ -32,7 +32,7 @@ var cordova_util = require('../util');
 var promiseutil = require('../../util/promise-util');
 var config = require('../config');
 var lazy_load = require('../lazy_load');
-var platformMetadata = require('../platform_metadata');
+// var platformMetadata = require('../platform_metadata');
 
 Review comment:
   delete


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13123) plugin add should use cordovaDependency instead of plugin.xml engine tag

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13123:
-

stevengill commented on issue #598: CB-13123 : plugin add should use 
cordovaDependency instead
URL: https://github.com/apache/cordova-lib/pull/598#issuecomment-350900736
 
 
   This is not going to make next release, getting bumped for now


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 add should use cordovaDependency instead of plugin.xml engine tag
> 
>
> Key: CB-13123
> URL: https://issues.apache.org/jira/browse/CB-13123
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: tools-next
> Fix For: cordova@8
>
>
> We have been planning on switching from plugin.xml engine tag to 
> cordovaDependencies element in package.json when it comes to resolving 
> project dependencies during plugin add. 
> I suggest we update the code to use cordovaDependencies. Maybe we fallback on 
> plugin.xml engine element until we do a major cordova release where we drop 
> engine element fully.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Created] (CB-13657) InAppBrowser not opening links in system browser

2017-12-11 Thread veenapani (JIRA)
veenapani created CB-13657:
--

 Summary: InAppBrowser not opening links in system browser
 Key: CB-13657
 URL: https://issues.apache.org/jira/browse/CB-13657
 Project: Apache Cordova
  Issue Type: Bug
  Components: cordova-ios
Reporter: veenapani
Assignee: Suraj Pindoria


I'm trying to open few links inside my application in safari browser (for ios) 
or chrome or other default browser's (for android) . I'm unable to get this to 
work, any help is highly appreciated. Below is my code:
{code}
 var target = "_blank";
var options = 
"toolbar=yes,closebuttoncaption=,location=no,hardwareback=yes";
authDialog.authenticate('https://mytimebeta.cerner.com/','' ,'' 
,'','',1);
var inAppBrowserRef = 
cordova.InAppBrowser.open('http://M1525246:9008/', target, options);
inAppBrowserRef.addEventListener('loadstop', function(event) {
 inAppBrowserRef.executeScript({
   file: 
"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js;
   }, function() {
   inAppBrowserRef.executeScript({
 
code: "jQuery('#timeExpense').on('click', function() 
{window.open('http://www.google.com','_system') });"
 });
   });
 
 });
{code}
Note:
If I initialize var target = "_system"; the whole application is opening in 
safari and we don't want to do that. However, in my jQuery code inside the 
addEventListener, the _system is not working.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156232354
 
 

 ##
 File path: src/cordova/platform_metadata.js
 ##
 @@ -1,111 +1,111 @@
-/**
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-var path = require('path');
-var cordova_util = require('./util');
-var fs = require('fs');
-var Q = require('q');
-var child_process = require('child_process');
-
-function getJson (jsonFile) {
-return JSON.parse(fs.readFileSync(jsonFile, 'utf-8'));
-}
-
-// Retrieves the platforms and their versions from the platforms.json file
-// Returns an array of {platform: platform, version: version} ...
-// ... where version could be '3.4.0', '/path/to/platform' or 'git://...'
-function getVersions (projectRoot) {
-var platformsDir = path.join(projectRoot, 'platforms');
-var platformsJsonFile = path.join(platformsDir, 'platforms.json');
-
-// If the platforms.json file doesn't exist, retrieve versions from 
platforms installed on the filesystem...
-// ...Note that in this case, we won't be able to know what source(folder, 
git-url) the platform came from, we'll just use versions
-return getPlatVersionsFromFile(platformsJsonFile).fail(function () {
-return getPlatVersionsFromFileSystem(projectRoot);
-});
-}
-
-// Returns a promise
-function getPlatVersionsFromFile (platformsJsonFile) {
-
-var platformData;
-
-// Handle 'file not found' exception and stay within the 'promise monad'
-try {
-platformData = getJson(platformsJsonFile);
-} catch (e) {
-return Q.reject(e);
-}
-
-var platformVersions = [];
-
-platformVersions = Object.keys(platformData).map(function (p) {
-return {platform: p, version: platformData[p]};
-});
-
-return Q(platformVersions);
-}
-
-// Returns a promise
-function getPlatVersionsFromFileSystem (projectRoot) {
-var platforms_on_fs = cordova_util.listPlatforms(projectRoot);
-var platformVersions = platforms_on_fs.map(function (platform) {
-var script = path.join(projectRoot, 'platforms', platform, 'cordova', 
'version');
-return Q.ninvoke(child_process, 'exec', script, {}).then(function 
(result) {
-var version = result[0];
-
-// clean the version we get back from the script
-// This is necessary because the version script uses console.log 
to pass back
-// the version. Using console.log ends up adding additional line 
breaks/newlines to the value returned.
-// ToDO: version scripts should be refactored to not use 
console.log()
-var versionCleaned = version.replace(/\r?\n|\r/g, '');
-return {platform: platform, version: versionCleaned};
-});
-});
-
-return Q.all(platformVersions);
-}
-
-// Saves platform@version into platforms.json
-function save (projectRoot, platform, version) {
-var platformsDir = path.join(projectRoot, 'platforms');
-var platformJsonFile = path.join(platformsDir, 'platforms.json');
-
-var data = {};
-if (fs.existsSync(platformJsonFile)) {
-data = getJson(platformJsonFile);
-}
-data[platform] = version;
-fs.writeFileSync(platformJsonFile, JSON.stringify(data, null, 2), 'utf-8');
-}
-
-function remove (projectRoot, platform) {
-var platformsDir = path.join(projectRoot, 'platforms');
-var platformJsonFile = path.join(platformsDir, 'platforms.json');
-if (!fs.existsSync(platformJsonFile)) {
-return;
-}
-var data = getJson(platformJsonFile);
-delete data[platform];
-fs.writeFileSync(platformJsonFile, JSON.stringify(data, null, 2), 'utf-8');
-}
-
-module.exports.getPlatformVersions = getVersions;
-module.exports.save = save;
-module.exports.remove = remove;
+// /**
 
 Review comment:
   Looks like these functions were being used by the save command, hence the 
comment out


[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156232575
 
 

 ##
 File path: src/cordova/platform/addHelper.js
 ##
 @@ -220,7 +220,7 @@ function addHelper (cmd, hooksRunner, projectRoot, 
targets, opts) {
 // actually installed.
 var versionToSave = saveVersion ? 
platDetails.version : spec;
 events.emit('verbose', 'Saving ' + platform + '@' 
+ versionToSave + ' into platforms.json');
-platformMetadata.save(projectRoot, platform, 
versionToSave);
+// platformMetadata.save(projectRoot, platform, 
versionToSave);
 
 Review comment:
   delete


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156235781
 
 

 ##
 File path: spec/cordova/platform/addHelper.spec.js
 ##
 @@ -24,7 +24,7 @@ var events = require('cordova-common').events;
 var rewire = require('rewire');
 var platform_addHelper = rewire('../../../src/cordova/platform/addHelper');
 var platform_module = require('../../../src/cordova/platform');
-var platform_metadata = require('../../../src/cordova/platform_metadata');
+// var platform_metadata = require('../../../src/cordova/platform_metadata');
 
 Review comment:
   delete this + other commented out code


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156232131
 
 

 ##
 File path: src/cordova/platform_metadata.js
 ##
 @@ -1,111 +1,111 @@
-/**
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-var path = require('path');
-var cordova_util = require('./util');
-var fs = require('fs');
-var Q = require('q');
-var child_process = require('child_process');
-
-function getJson (jsonFile) {
-return JSON.parse(fs.readFileSync(jsonFile, 'utf-8'));
-}
-
-// Retrieves the platforms and their versions from the platforms.json file
-// Returns an array of {platform: platform, version: version} ...
-// ... where version could be '3.4.0', '/path/to/platform' or 'git://...'
-function getVersions (projectRoot) {
-var platformsDir = path.join(projectRoot, 'platforms');
-var platformsJsonFile = path.join(platformsDir, 'platforms.json');
-
-// If the platforms.json file doesn't exist, retrieve versions from 
platforms installed on the filesystem...
-// ...Note that in this case, we won't be able to know what source(folder, 
git-url) the platform came from, we'll just use versions
-return getPlatVersionsFromFile(platformsJsonFile).fail(function () {
-return getPlatVersionsFromFileSystem(projectRoot);
-});
-}
-
-// Returns a promise
-function getPlatVersionsFromFile (platformsJsonFile) {
-
-var platformData;
-
-// Handle 'file not found' exception and stay within the 'promise monad'
-try {
-platformData = getJson(platformsJsonFile);
-} catch (e) {
-return Q.reject(e);
-}
-
-var platformVersions = [];
-
-platformVersions = Object.keys(platformData).map(function (p) {
-return {platform: p, version: platformData[p]};
-});
-
-return Q(platformVersions);
-}
-
-// Returns a promise
-function getPlatVersionsFromFileSystem (projectRoot) {
-var platforms_on_fs = cordova_util.listPlatforms(projectRoot);
-var platformVersions = platforms_on_fs.map(function (platform) {
-var script = path.join(projectRoot, 'platforms', platform, 'cordova', 
'version');
-return Q.ninvoke(child_process, 'exec', script, {}).then(function 
(result) {
-var version = result[0];
-
-// clean the version we get back from the script
-// This is necessary because the version script uses console.log 
to pass back
-// the version. Using console.log ends up adding additional line 
breaks/newlines to the value returned.
-// ToDO: version scripts should be refactored to not use 
console.log()
-var versionCleaned = version.replace(/\r?\n|\r/g, '');
-return {platform: platform, version: versionCleaned};
-});
-});
-
-return Q.all(platformVersions);
-}
-
-// Saves platform@version into platforms.json
-function save (projectRoot, platform, version) {
-var platformsDir = path.join(projectRoot, 'platforms');
-var platformJsonFile = path.join(platformsDir, 'platforms.json');
-
-var data = {};
-if (fs.existsSync(platformJsonFile)) {
-data = getJson(platformJsonFile);
-}
-data[platform] = version;
-fs.writeFileSync(platformJsonFile, JSON.stringify(data, null, 2), 'utf-8');
-}
-
-function remove (projectRoot, platform) {
-var platformsDir = path.join(projectRoot, 'platforms');
-var platformJsonFile = path.join(platformsDir, 'platforms.json');
-if (!fs.existsSync(platformJsonFile)) {
-return;
-}
-var data = getJson(platformJsonFile);
-delete data[platform];
-fs.writeFileSync(platformJsonFile, JSON.stringify(data, null, 2), 'utf-8');
-}
-
-module.exports.getPlatformVersions = getVersions;
-module.exports.save = save;
-module.exports.remove = remove;
+// /**
 
 Review comment:
   Did you mean to comment out this whole file? Might as well just delete it if 
that is the 

[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156232409
 
 

 ##
 File path: src/cordova/platform/remove.js
 ##
 @@ -79,7 +79,7 @@ function remove (hooksRunner, projectRoot, targets, opts) {
 // Remove targets from platforms.json.
 targets.forEach(function (target) {
 events.emit('verbose', 'Removing platform ' + target + ' from 
platforms.json file...');
-platformMetadata.remove(projectRoot, target);
+// platformMetadata.remove(projectRoot, target);
 
 Review comment:
   delete


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156232305
 
 

 ##
 File path: src/cordova/platform/save.js
 ##
 @@ -15,33 +15,35 @@
 under the License.
 */
 
-var semver = require('semver');
-var cordova_util = require('../util');
-var ConfigParser = require('cordova-common').ConfigParser;
-var platformMetadata = require('../platform_metadata');
+// var semver = require('semver');
 
 Review comment:
   Lets delete this whole file as it seems like it is all commented out


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156236419
 
 

 ##
 File path: spec/cordova/platform/remove.spec.js
 ##
 @@ -21,7 +21,7 @@ var Q = require('q');
 var events = require('cordova-common').events;
 var rewire = require('rewire');
 var platform_remove = rewire('../../../src/cordova/platform/remove');
-var platform_metadata = require('../../../src/cordova/platform_metadata');
+// var platform_metadata = require('../../../src/cordova/platform_metadata');
 
 Review comment:
   delete this + other commented out code 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


> Remove cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156233872
 
 

 ##
 File path: spec/cordova/platform/save.spec.js
 ##
 @@ -15,57 +15,57 @@
 under the License.
 */
 
-var Q = require('q');
-var rewire = require('rewire');
-var platform_save = rewire('../../../src/cordova/platform/save');
-var platform_metadata = require('../../../src/cordova/platform_metadata');
-var fail;
-var semver = require('semver');
+// var Q = require('q');
 
 Review comment:
   Delete this file


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13057) Remove cordova platform save command

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13057:
-

stevengill commented on a change in pull request #586: CB-13057 : Remove 
cordova platform save command
URL: https://github.com/apache/cordova-lib/pull/586#discussion_r156235507
 
 

 ##
 File path: integration-tests/pkgJson-restore.spec.js
 ##
 @@ -142,8 +142,8 @@ describe('tests platform/spec restore with --save', 
function () {
 var cwd = process.cwd();
 var pkgJsonPath = path.join(cwd, 'package.json');
 var pkgJson;
-var platformsFolderPath = path.join(cwd, 'platforms/platforms.json');
-var platformsJson;
+//var platformsFolderPath = path.join(cwd, 'platforms/platforms.json');
 
 Review comment:
   delete all the stuff that you commented in this file


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 cordova platform save command
> 
>
> Key: CB-13057
> URL: https://issues.apache.org/jira/browse/CB-13057
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-lib
>Affects Versions: cordova@8
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: backlog, tools-next
> Fix For: cordova@8
>
>
> With autosaving now in place, we don't need `cordova platform save` anymore.
> By removing this command, we can also remove 
> cordovaProject/platforms/platforms.json & 
> cordova-lib/src/cordova/platform_metadata.js
> Deprecation notice will be added to cordova platform save until save command 
> is removed in cordova@8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13293) already fetched platforms shouldn't call fetch code

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13293:
-

stevengill commented on a change in pull request #605: CB-13293 : if fetch has 
been called already, no need to fetch again
URL: https://github.com/apache/cordova-lib/pull/605#discussion_r156236328
 
 

 ##
 File path: src/cordova/platform/addHelper.js
 ##
 @@ -292,7 +292,9 @@ function getVersionFromConfigFile (platform, cfg) {
 function downloadPlatform (projectRoot, platform, version, opts) {
 var target = version ? (platform + '@' + version) : platform;
 return Q().then(function () {
-if (opts.fetch) {
+var platformPath = path.join(projectRoot, 'platforms', platform);
+var platformAlreadyAdded = fs.existsSync(platformPath);
+if ((opts.fetch) && (!platformAlreadyAdded)) {
 
 Review comment:
   Lets wait and rebase this after we merge your commit removing no-fetch


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


> already fetched platforms shouldn't call fetch code
> ---
>
> Key: CB-13293
> URL: https://issues.apache.org/jira/browse/CB-13293
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-lib
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: tools-next
> Fix For: cordova@7.1.0
>
>
> adding a platform that has already been added/fetched will still call 
> cordova-fetch before realizing the platform is already installed. Need to 
> check if platform is added first. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13293) already fetched platforms shouldn't call fetch code

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13293:
-

stevengill commented on a change in pull request #605: CB-13293 : if fetch has 
been called already, no need to fetch again
URL: https://github.com/apache/cordova-lib/pull/605#discussion_r156233791
 
 

 ##
 File path: src/cordova/platform/addHelper.js
 ##
 @@ -292,7 +292,9 @@ function getVersionFromConfigFile (platform, cfg) {
 function downloadPlatform (projectRoot, platform, version, opts) {
 var target = version ? (platform + '@' + version) : platform;
 return Q().then(function () {
-if (opts.fetch) {
+var platformPath = path.join(projectRoot, 'platforms', platform);
+var platformAlreadyAdded = fs.existsSync(platformPath);
+if ((opts.fetch) && (!platformAlreadyAdded)) {
 
 Review comment:
   is your manual test using `fetch:true`


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


> already fetched platforms shouldn't call fetch code
> ---
>
> Key: CB-13293
> URL: https://issues.apache.org/jira/browse/CB-13293
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-lib
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: tools-next
> Fix For: cordova@7.1.0
>
>
> adding a platform that has already been added/fetched will still call 
> cordova-fetch before realizing the platform is already installed. Need to 
> check if platform is added first. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13293) already fetched platforms shouldn't call fetch code

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13293:
-

audreyso commented on a change in pull request #605: CB-13293 : if fetch has 
been called already, no need to fetch again
URL: https://github.com/apache/cordova-lib/pull/605#discussion_r156201668
 
 

 ##
 File path: src/cordova/platform/addHelper.js
 ##
 @@ -292,7 +292,9 @@ function getVersionFromConfigFile (platform, cfg) {
 function downloadPlatform (projectRoot, platform, version, opts) {
 var target = version ? (platform + '@' + version) : platform;
 return Q().then(function () {
-if (opts.fetch) {
+var platformPath = path.join(projectRoot, 'platforms', platform);
+var platformAlreadyAdded = fs.existsSync(platformPath);
+if ((opts.fetch) && (!platformAlreadyAdded)) {
 
 Review comment:
   For instance, if I add the ios platform to my project, libDir = 
/Users/auso/cordova/tests/project_9/node_modules/cordova-ios


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


> already fetched platforms shouldn't call fetch code
> ---
>
> Key: CB-13293
> URL: https://issues.apache.org/jira/browse/CB-13293
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-lib
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: tools-next
> Fix For: cordova@7.1.0
>
>
> adding a platform that has already been added/fetched will still call 
> cordova-fetch before realizing the platform is already installed. Need to 
> check if platform is added first. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13293) already fetched platforms shouldn't call fetch code

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13293:
-

audreyso commented on a change in pull request #605: CB-13293 : if fetch has 
been called already, no need to fetch again
URL: https://github.com/apache/cordova-lib/pull/605#discussion_r156225545
 
 

 ##
 File path: src/cordova/platform/addHelper.js
 ##
 @@ -292,7 +292,9 @@ function getVersionFromConfigFile (platform, cfg) {
 function downloadPlatform (projectRoot, platform, version, opts) {
 var target = version ? (platform + '@' + version) : platform;
 return Q().then(function () {
-if (opts.fetch) {
+var platformPath = path.join(projectRoot, 'platforms', platform);
+var platformAlreadyAdded = fs.existsSync(platformPath);
+if ((opts.fetch) && (!platformAlreadyAdded)) {
 
 Review comment:
   Yes! These are my logs:
   `Error: Platform ios already added.
   libDir = /Users/auso/.cordova/lib/npm_cache/cordova-ios/4.5.4/package`


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


> already fetched platforms shouldn't call fetch code
> ---
>
> Key: CB-13293
> URL: https://issues.apache.org/jira/browse/CB-13293
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-lib
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: tools-next
> Fix For: cordova@7.1.0
>
>
> adding a platform that has already been added/fetched will still call 
> cordova-fetch before realizing the platform is already installed. Need to 
> check if platform is added first. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13293) already fetched platforms shouldn't call fetch code

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13293:
-

stevengill commented on a change in pull request #605: CB-13293 : if fetch has 
been called already, no need to fetch again
URL: https://github.com/apache/cordova-lib/pull/605#discussion_r156223288
 
 

 ##
 File path: src/cordova/platform/addHelper.js
 ##
 @@ -292,7 +292,9 @@ function getVersionFromConfigFile (platform, cfg) {
 function downloadPlatform (projectRoot, platform, version, opts) {
 var target = version ? (platform + '@' + version) : platform;
 return Q().then(function () {
-if (opts.fetch) {
+var platformPath = path.join(projectRoot, 'platforms', platform);
+var platformAlreadyAdded = fs.existsSync(platformPath);
+if ((opts.fetch) && (!platformAlreadyAdded)) {
 
 Review comment:
   in line 333, `libDir` is defined? 


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


> already fetched platforms shouldn't call fetch code
> ---
>
> Key: CB-13293
> URL: https://issues.apache.org/jira/browse/CB-13293
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-lib
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: tools-next
> Fix For: cordova@7.1.0
>
>
> adding a platform that has already been added/fetched will still call 
> cordova-fetch before realizing the platform is already installed. Need to 
> check if platform is added first. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13624) Review and revise contribs docs

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13624:
-

stevengill closed pull request #168: CB-13624: note that commands are applied 
on `master` branch
URL: https://github.com/apache/cordova-coho/pull/168
 
 
   


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


> Review and revise contribs docs
> ---
>
> Key: CB-13624
> URL: https://issues.apache.org/jira/browse/CB-13624
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-coho, cordova-docs
>Reporter: Audrey So
>Assignee: Audrey So
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13624) Review and revise contribs docs

2017-12-11 Thread ASF subversion and git services (JIRA)

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

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

Commit 38b0e92557897158d068a65fb278f4d995b755fe in cordova-coho's branch 
refs/heads/master from [~stevegill]
[ https://gitbox.apache.org/repos/asf?p=cordova-coho.git;h=38b0e92 ]

Merge pull request #168 from apache/janpio-CB-13624

CB-13624: note that commands are applied on `master` branch

> Review and revise contribs docs
> ---
>
> Key: CB-13624
> URL: https://issues.apache.org/jira/browse/CB-13624
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-coho, cordova-docs
>Reporter: Audrey So
>Assignee: Audrey So
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13624) Review and revise contribs docs

2017-12-11 Thread ASF subversion and git services (JIRA)

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

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

Commit 38b0e92557897158d068a65fb278f4d995b755fe in cordova-coho's branch 
refs/heads/master from [~stevegill]
[ https://gitbox.apache.org/repos/asf?p=cordova-coho.git;h=38b0e92 ]

Merge pull request #168 from apache/janpio-CB-13624

CB-13624: note that commands are applied on `master` branch

> Review and revise contribs docs
> ---
>
> Key: CB-13624
> URL: https://issues.apache.org/jira/browse/CB-13624
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-coho, cordova-docs
>Reporter: Audrey So
>Assignee: Audrey So
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
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

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13532:
-

stevengill closed pull request #607: :CB-13532 : updated to include a check for 
pkgJson devDependencies
URL: https://github.com/apache/cordova-lib/pull/607
 
 
   

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/platform/addHelper.spec.js 
b/spec/cordova/platform/addHelper.spec.js
index 72f017401..25cab5c85 100644
--- a/spec/cordova/platform/addHelper.spec.js
+++ b/spec/cordova/platform/addHelper.spec.js
@@ -53,7 +53,7 @@ describe('cordova/platform/addHelper', function () {
 'platform': 'atari'
 };
 var package_json_mock;
-package_json_mock = jasmine.createSpyObj('package json mock', ['cordova', 
'dependencies']);
+package_json_mock = jasmine.createSpyObj('package json mock', ['cordova', 
'dependencies', 'devDependencies']);
 package_json_mock.dependencies = {};
 package_json_mock.cordova = {};
 
@@ -301,6 +301,23 @@ describe('cordova/platform/addHelper', function () {
 }).done(done);
 });
 
+it('should use pkgJson version devDependencies, if 
dependencies are undefined', function (done) {
+package_json_mock.dependencies = undefined;
+package_json_mock.cordova = {'platforms': ['ios']};
+package_json_mock.devDependencies['ios'] = {};
+
cordova_util.requireNoCache.and.returnValue(package_json_mock);
+fs.existsSync.and.callFake(function (filePath) {
+return path.basename(filePath) === 'package.json';
+});
+platform_addHelper('add', hooks_mock, projectRoot, 
['ios'], {save: true, restoring: true}).then(function () {
+
expect(platform_addHelper.getVersionFromConfigFile).not.toHaveBeenCalled();
+expect(fs.writeFileSync).toHaveBeenCalled();
+}).fail(function (e) {
+fail('fail handler unexpectedly invoked');
+console.error(e);
+}).done(done);
+});
+
 it('should only write the package.json file if it was 
modified', function (done) {
 package_json_mock.cordova = {'platforms': ['ios']};
 
cordova_util.requireNoCache.and.returnValue(package_json_mock);
diff --git a/src/cordova/platform/addHelper.js 
b/src/cordova/platform/addHelper.js
index 1c0b39fc3..a97c33a76 100644
--- a/src/cordova/platform/addHelper.js
+++ b/src/cordova/platform/addHelper.js
@@ -111,6 +111,12 @@ function addHelper (cmd, hooksRunner, projectRoot, 
targets, opts) {
 } else if (pkgJson.dependencies[platform]) {
 spec = pkgJson.dependencies[platform];
 }
+} else if (spec === undefined && pkgJson && 
pkgJson.devDependencies && cmd === 'add') {
+if (pkgJson.devDependencies['cordova-' + platform]) {
+spec = pkgJson.devDependencies['cordova-' + 
platform];
+} else if (pkgJson.devDependencies[platform]) {
+spec = pkgJson.devDependencies[platform];
+}
 }
 
 if (platform && spec === undefined && cmd === 'add') {


 


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 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
>  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 

[jira] [Commented] (CB-13293) already fetched platforms shouldn't call fetch code

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13293:
-

audreyso commented on a change in pull request #605: CB-13293 : if fetch has 
been called already, no need to fetch again
URL: https://github.com/apache/cordova-lib/pull/605#discussion_r156201668
 
 

 ##
 File path: src/cordova/platform/addHelper.js
 ##
 @@ -292,7 +292,9 @@ function getVersionFromConfigFile (platform, cfg) {
 function downloadPlatform (projectRoot, platform, version, opts) {
 var target = version ? (platform + '@' + version) : platform;
 return Q().then(function () {
-if (opts.fetch) {
+var platformPath = path.join(projectRoot, 'platforms', platform);
+var platformAlreadyAdded = fs.existsSync(platformPath);
+if ((opts.fetch) && (!platformAlreadyAdded)) {
 
 Review comment:
   For instance, if I add the ios platform to my project, `libDir = 
/Users/auso/cordova/tests/project_9/node_modules/cordova-ios`
   
   Hmm, if platformAlreadyAdded is true, it still gets to line 333 in my manual 
tests so far.


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


> already fetched platforms shouldn't call fetch code
> ---
>
> Key: CB-13293
> URL: https://issues.apache.org/jira/browse/CB-13293
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-lib
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: tools-next
> Fix For: cordova@7.1.0
>
>
> adding a platform that has already been added/fetched will still call 
> cordova-fetch before realizing the platform is already installed. Need to 
> check if platform is added first. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13293) already fetched platforms shouldn't call fetch code

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13293:
-

audreyso commented on a change in pull request #605: CB-13293 : if fetch has 
been called already, no need to fetch again
URL: https://github.com/apache/cordova-lib/pull/605#discussion_r156201668
 
 

 ##
 File path: src/cordova/platform/addHelper.js
 ##
 @@ -292,7 +292,9 @@ function getVersionFromConfigFile (platform, cfg) {
 function downloadPlatform (projectRoot, platform, version, opts) {
 var target = version ? (platform + '@' + version) : platform;
 return Q().then(function () {
-if (opts.fetch) {
+var platformPath = path.join(projectRoot, 'platforms', platform);
+var platformAlreadyAdded = fs.existsSync(platformPath);
+if ((opts.fetch) && (!platformAlreadyAdded)) {
 
 Review comment:
   For instance, if I add the ios platform to my project, `libDir = 
/Users/auso/cordova/tests/project_9/node_modules/cordova-ios`


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


> already fetched platforms shouldn't call fetch code
> ---
>
> Key: CB-13293
> URL: https://issues.apache.org/jira/browse/CB-13293
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-lib
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: tools-next
> Fix For: cordova@7.1.0
>
>
> adding a platform that has already been added/fetched will still call 
> cordova-fetch before realizing the platform is already installed. Need to 
> check if platform is added first. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



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

2017-12-11 Thread Audrey So (JIRA)

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

Audrey So closed CB-13532.
--
Resolution: Fixed

> 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
>  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
(v6.4.14#64029)

-
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

2017-12-11 Thread ASF subversion and git services (JIRA)

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

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

Commit 3109e4fe4587088a1c63644bb6395f0506432252 in cordova-lib's branch 
refs/heads/master from [~stevegill]
[ https://gitbox.apache.org/repos/asf?p=cordova-lib.git;h=3109e4f ]

Merge pull request #607 from audreyso/CB-13532

CB-13532 : updated to include a check for pkgJson 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
>  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
(v6.4.14#64029)

-
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

2017-12-11 Thread ASF subversion and git services (JIRA)

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

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

Commit 3109e4fe4587088a1c63644bb6395f0506432252 in cordova-lib's branch 
refs/heads/master from [~stevegill]
[ https://gitbox.apache.org/repos/asf?p=cordova-lib.git;h=3109e4f ]

Merge pull request #607 from audreyso/CB-13532

CB-13532 : updated to include a check for pkgJson 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
>  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
(v6.4.14#64029)

-
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

2017-12-11 Thread ASF subversion and git services (JIRA)

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

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

Commit 8c4ec00e87f6760fa12314c594a9937be3c48cb1 in cordova-lib's branch 
refs/heads/master from [~auso]
[ https://gitbox.apache.org/repos/asf?p=cordova-lib.git;h=8c4ec00 ]

:CB-13532 : updated to include a check for pkgJson 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
>  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
(v6.4.14#64029)

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



[jira] [Commented] (CB-13293) already fetched platforms shouldn't call fetch code

2017-12-11 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CB-13293:
-

stevengill commented on a change in pull request #605: CB-13293 : if fetch has 
been called already, no need to fetch again
URL: https://github.com/apache/cordova-lib/pull/605#discussion_r156162358
 
 

 ##
 File path: src/cordova/platform/addHelper.js
 ##
 @@ -292,7 +292,9 @@ function getVersionFromConfigFile (platform, cfg) {
 function downloadPlatform (projectRoot, platform, version, opts) {
 var target = version ? (platform + '@' + version) : platform;
 return Q().then(function () {
-if (opts.fetch) {
+var platformPath = path.join(projectRoot, 'platforms', platform);
+var platformAlreadyAdded = fs.existsSync(platformPath);
+if ((opts.fetch) && (!platformAlreadyAdded)) {
 
 Review comment:
   So what do we return if `platformAlreadyAdded` is true? I think we need to 
return something to make sure we get to line 333. 
   
   In line 333, what is `libDir` if it does fetch? 


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


> already fetched platforms shouldn't call fetch code
> ---
>
> Key: CB-13293
> URL: https://issues.apache.org/jira/browse/CB-13293
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-lib
>Reporter: Steve Gill
>Assignee: Audrey So
>  Labels: tools-next
> Fix For: cordova@7.1.0
>
>
> adding a platform that has already been added/fetched will still call 
> cordova-fetch before realizing the platform is already installed. Need to 
> check if platform is added first. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Resolved] (CB-13655) Android Cordova App with IFrames Chrome 63 No Request Headers Cookies

2017-12-11 Thread Joe Bowser (JIRA)

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

Joe Bowser resolved CB-13655.
-
Resolution: Won't Fix

This is a Chromium bug, closing.

> Android Cordova App with IFrames Chrome 63 No Request Headers Cookies
> -
>
> Key: CB-13655
> URL: https://issues.apache.org/jira/browse/CB-13655
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-android
> Environment: Chrome 63 android devices 
>Reporter: Faisal Akhtar
>Assignee: Joe Bowser
>Priority: Blocker
>
> Since the release of Chrome 63 on Android, on the 6th December 2017, I have 
> encountered a problem with my companies Cordova based Android app. This app 
> includes IFrames that allow users to navigate parts of my companies eCommerce 
> website from within the app.
> The navigation between pages loaded in the IFrames no longer send any cookie 
> information in the Request Headers.
> Information such as Session Ids that are stored in a cookie are not passed 
> across to the next page, which in turn causes the next page to start a whole 
> new user session!
> What is strange however is that any AJAX calls preformed within a page on the 
> IFrames (e.g. To retrieve the number of items in the basket) and asset 
> requests (css js, image files etc) do send cookie information in the request 
> headers fine. The session id in these headers are identical between pages, 
> indicating session persistence.
> Cookies are being created ok and I can see them when using the Chrome 
> developer tools within the Application panel under the companies domain. They 
> just aren't being passed to the next page.
> I experienced this issue on an Android 7.1.1 device. When I disable the 
> Chrome app on this device the cookie request headers in the IFrames in the 
> app begin to work fine again, presumably the Cordova Webview is no longer 
> using Chrome when it is disabled?
> Does anyone know what may be causing this issue? Could it be anything related 
> to SameSite cookies or Strict site isolation changes or other security 
> related changes in Chrome 63?
> The issue appears similar to this Chromium bug that was fixed October 2016: 
> https://bugs.chromium.org/p/chromium/issues/detail?id=634311
> The Webview does however have ThirdParty cookies enabled in the 
> SystemCookieManager class of the Cordova library (Cordova Android 6.4.0):
> {code:java}
> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
> cookieManager.setAcceptThirdPartyCookies(webView, true);
> }
> {code}
> Apologies if I haven't specified anything clearly enough. I'm happy to 
> provide additional information if anyone can help with this issue.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Created] (CB-13656) Document symbol and splash screen resources

2017-12-11 Thread Christian Petrov (JIRA)
Christian Petrov created CB-13656:
-

 Summary: Document symbol and splash screen resources
 Key: CB-13656
 URL: https://issues.apache.org/jira/browse/CB-13656
 Project: Apache Cordova
  Issue Type: Improvement
  Components: cordova-ios
Affects Versions: cordova-ios 4.5.0
Reporter: Christian Petrov
Assignee: Suraj Pindoria
Priority: Minor


The current guide for app icon and splash screen customization includes a 
[snippet with iOS 
resources|https://cordova.apache.org/docs/en/7.x/config_ref/images.html#ios] to 
be replaced in the user app. However, this list is incomplete, e.g. it does not 
include resources like _icon-small@3x.png_ which [are 
supported|https://github.com/apache/cordova-ios/blob/master/bin/templates/project/__PROJECT_NAME__/Images.xcassets/AppIcon.appiconset/Contents.json#L30].
 Not replacing them would result into vendor logos being shown on some devices. 
A solution to this can be to provide a complete list of those resources in the 
Cordova documentation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Created] (CB-13655) Android Cordova App with IFrames Chrome 63 No Request Headers Cookies

2017-12-11 Thread Faisal Akhtar (JIRA)
Faisal Akhtar created CB-13655:
--

 Summary: Android Cordova App with IFrames Chrome 63 No Request 
Headers Cookies
 Key: CB-13655
 URL: https://issues.apache.org/jira/browse/CB-13655
 Project: Apache Cordova
  Issue Type: Bug
  Components: cordova-android
 Environment: Chrome 63 android devices 
Reporter: Faisal Akhtar
Assignee: Joe Bowser
Priority: Blocker


Since the release of Chrome 63 on Android, on the 6th December 2017, I have 
encountered a problem with my companies Cordova based Android app. This app 
includes IFrames that allow users to navigate parts of my companies eCommerce 
website from within the app.

The navigation between pages loaded in the IFrames no longer send any cookie 
information in the Request Headers.

Information such as Session Ids that are stored in a cookie are not passed 
across to the next page, which in turn causes the next page to start a whole 
new user session!

What is strange however is that any AJAX calls preformed within a page on the 
IFrames (e.g. To retrieve the number of items in the basket) and asset requests 
(css js, image files etc) do send cookie information in the request headers 
fine. The session id in these headers are identical between pages, indicating 
session persistence.

Cookies are being created ok and I can see them when using the Chrome developer 
tools within the Application panel under the companies domain. They just aren't 
being passed to the next page.

I experienced this issue on an Android 7.1.1 device. When I disable the Chrome 
app on this device the cookie request headers in the IFrames in the app begin 
to work fine again, presumably the Cordova Webview is no longer using Chrome 
when it is disabled?

Does anyone know what may be causing this issue? Could it be anything related 
to SameSite cookies or Strict site isolation changes or other security related 
changes in Chrome 63?

The issue appears similar to this Chromium bug that was fixed October 2016: 
https://bugs.chromium.org/p/chromium/issues/detail?id=634311

The Webview does however have ThirdParty cookies enabled in the 
SystemCookieManager class of the Cordova library (Cordova Android 6.4.0):


{code:java}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
cookieManager.setAcceptThirdPartyCookies(webView, true);

}
{code}


Apologies if I haven't specified anything clearly enough. I'm happy to provide 
additional information if anyone can help with this issue.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Updated] (CB-13605) devicemotion event not fired correctly on Android

2017-12-11 Thread Jan Piotrowski (Sujan) (JIRA)

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

Jan Piotrowski (Sujan) updated CB-13605:

Summary: devicemotion event not fired correctly on Android  (was: 
devicemotion event not fired correclty)

> devicemotion event not fired correctly on Android
> -
>
> Key: CB-13605
> URL: https://issues.apache.org/jira/browse/CB-13605
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-android
>Affects Versions: 7.0.0
> Environment: Issue appears on some Android devices:
>   - Moto Z (Android 7.1.1)
>   - Galaxy S6 (Android 7.0)
>Reporter: Mario Semelka
>Assignee: Joe Bowser
>
> The 'devicemotion' event ist not fired correctly on some Android devices in 
> an Android build. In that cases, the event is fired only once after the 
> listener is registered. This is especially critical for VR development as 
> most VR cameras use this event for controls.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Comment Edited] (CB-13605) devicemotion event not fired correclty

2017-12-11 Thread Jan Piotrowski (Sujan) (JIRA)

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

Jan Piotrowski (Sujan) edited comment on CB-13605 at 12/11/17 1:03 PM:
---

What Joe meant is that Cordova only uses what the system offers and has no 
influence what works and what doesn't there.
Could you please add the whole Cordova project to the repo so I just have to 
clone and run it to replicate?


was (Author: sujan12):
What Joe meant is that Cordova only uses what the system offers and has no 
influence what works and what doesn't there.

> devicemotion event not fired correclty
> --
>
> Key: CB-13605
> URL: https://issues.apache.org/jira/browse/CB-13605
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-android
>Affects Versions: 7.0.0
> Environment: Issue appears on some Android devices:
>   - Moto Z (Android 7.1.1)
>   - Galaxy S6 (Android 7.0)
>Reporter: Mario Semelka
>Assignee: Joe Bowser
>
> The 'devicemotion' event ist not fired correctly on some Android devices in 
> an Android build. In that cases, the event is fired only once after the 
> listener is registered. This is especially critical for VR development as 
> most VR cameras use this event for controls.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13605) devicemotion event not fired correclty

2017-12-11 Thread Jan Piotrowski (Sujan) (JIRA)

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

Jan Piotrowski (Sujan) commented on CB-13605:
-

What Joe meant is that Cordova only uses what the system offers and has no 
influence what works and what doesn't there.

> devicemotion event not fired correclty
> --
>
> Key: CB-13605
> URL: https://issues.apache.org/jira/browse/CB-13605
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-android
>Affects Versions: 7.0.0
> Environment: Issue appears on some Android devices:
>   - Moto Z (Android 7.1.1)
>   - Galaxy S6 (Android 7.0)
>Reporter: Mario Semelka
>Assignee: Joe Bowser
>
> The 'devicemotion' event ist not fired correctly on some Android devices in 
> an Android build. In that cases, the event is fired only once after the 
> listener is registered. This is especially critical for VR development as 
> most VR cameras use this event for controls.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CB-13605) devicemotion event not fired correclty

2017-12-11 Thread Maximilian Frercksen (JIRA)

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

Maximilian Frercksen commented on CB-13605:
---

[~Sujan12] [~bowserj]

I have prepared a sample project that demonstrates the issue:
https://github.com/maeximus/cordova_device_motion_issue

 I dont think it is a problem with the browser because that code works when 
openning it with your mobile browser. It is the cordova container that brakes 
it. 



> devicemotion event not fired correclty
> --
>
> Key: CB-13605
> URL: https://issues.apache.org/jira/browse/CB-13605
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-android
>Affects Versions: 7.0.0
> Environment: Issue appears on some Android devices:
>   - Moto Z (Android 7.1.1)
>   - Galaxy S6 (Android 7.0)
>Reporter: Mario Semelka
>Assignee: Joe Bowser
>
> The 'devicemotion' event ist not fired correctly on some Android devices in 
> an Android build. In that cases, the event is fired only once after the 
> listener is registered. This is especially critical for VR development as 
> most VR cameras use this event for controls.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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