Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add listTarget api & revert original bin file location #1320

Merged
merged 2 commits into from
May 8, 2023

Conversation

erisu
Copy link
Member

@erisu erisu commented Apr 25, 2023

Platforms affected

n/a

Motivation and Context

Support calling for listTarget on the PlatformAPI.
Will be used by Cordova CLI/Lib 12

Reverted the location of the binraries to the original location. Needed for older CLI versions.

Description

Added listTargets on platform api and added supporting methods in the run.js file

Testing

npm t

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@erisu erisu added this to the 7.0.0 milestone Apr 25, 2023
@erisu erisu requested a review from dpogue April 25, 2023 10:23
@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2023

Codecov Report

Merging #1320 (56c99a9) into master (1a5cd45) will increase coverage by 0.13%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1320      +/-   ##
==========================================
+ Coverage   78.51%   78.64%   +0.13%     
==========================================
  Files          15       15              
  Lines        1778     1789      +11     
==========================================
+ Hits         1396     1407      +11     
  Misses        382      382              
Impacted Files Coverage Δ
lib/Api.js 71.98% <100.00%> (+0.21%) ⬆️
lib/run.js 29.00% <100.00%> (+7.02%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@dpogue dpogue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a unit test for the Platform API and runListDevices function, but otherwise this looks good to me

module.exports.runListDevices = async function (options) {
const { options: cliArgs } = options;
module.exports.runListDevices = async function (options = {}) {
const { options: cliArgs = {} } = options;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const cliArgs = options.options ?? {}; seems way easier to read IMO, but I know that's not the "cool" way of doing things anymore

@erisu erisu merged commit c000a1b into apache:master May 8, 2023
9 checks passed
@erisu erisu deleted the feat/use-platform-api-target-list branch May 8, 2023 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants