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

Update run to work with Cordova CLI prior version 9.x #33

Merged
merged 1 commit into from Feb 28, 2019

Conversation

GedasGa
Copy link
Contributor

@GedasGa GedasGa commented Feb 26, 2019

Platforms affected

electron

Motivation and Context

Running electron platform with cordova-lib prior 9.x.x breaks. This is because prior to Cordova 9, the electron platform is added to cordova-electron folder, but in the run.js we have a static path pointing to ./platforms/electron/www/main.js. Therefore it's unable to locate the main.js and results in an error.

Description

Changed static string in the run.js to more "dynamic" approach using path.resolve with __dirname. Also, updated tests to test this functionality.

Testing

Added and ran electron platform with both cordova (8.1.2) and cordova-nighly (9.0.0) versions. Also, executed automated tests using:

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

- Change static path in run.js to dynamic
- Update unit tests
- Update DOCUMENTATION.md
@GedasGa GedasGa changed the title Update run to work with Cordova lib prior 9.x.x aUpdate run to work with Cordova CLI prior version 9.x: Feb 26, 2019
@GedasGa GedasGa changed the title aUpdate run to work with Cordova CLI prior version 9.x: Update run to work with Cordova CLI prior version 9.x Feb 26, 2019
@codecov-io
Copy link

codecov-io commented Feb 26, 2019

Codecov Report

Merging #33 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #33   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines         441    442    +1     
=====================================
+ Hits          441    442    +1
Impacted Files Coverage Δ
bin/templates/cordova/lib/run.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf9f8f7...34288b1. Read the comment docs.

1 similar comment
@codecov-io
Copy link

codecov-io commented Feb 26, 2019

Codecov Report

Merging #33 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #33   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines         441    442    +1     
=====================================
+ Hits          441    442    +1
Impacted Files Coverage Δ
bin/templates/cordova/lib/run.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf9f8f7...34288b1. Read the comment docs.

Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

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

LGTM

@erisu erisu merged commit bd2e806 into apache:master Feb 28, 2019
@erisu erisu mentioned this pull request Feb 28, 2019
@GedasGa GedasGa deleted the update-run branch June 17, 2019 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants