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

refactor: hide implementations of build & run #1188

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

raphinesse
Copy link
Contributor

This makes build and run modules more closed by avoiding to expose
internals via the resolved promise value. Both modules' main exports
previously returned a promise that resolved to a subrocess spawn result.
Now these promises resolve to undefined.

The public API methods that return these promises did not document a
specific promise return value, just when the promise would resolve or
reject. Thus, this change is not breaking.

This makes build and run modules more closed by avoiding to expose
internals via the resolved promise value. Both modules' main exports
previously returned a promise that resolved to a subrocess spawn result.
Now these promises resolve to undefined.

The public API methods that return these promises did not document a
specific promise return value, just when the promise would resolve or
reject. Thus, this change is not breaking.
@raphinesse raphinesse changed the title refactor: hide implementation of build & run refactor: hide implementations of build & run Nov 7, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #1188 (c6665e5) into master (ea9751b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1188   +/-   ##
=======================================
  Coverage   75.03%   75.03%           
=======================================
  Files          13       13           
  Lines        1650     1650           
=======================================
  Hits         1238     1238           
  Misses        412      412           
Impacted Files Coverage Δ
bin/templates/scripts/cordova/lib/build.js 44.09% <ø> (ø)
bin/templates/scripts/cordova/lib/run.js 22.22% <ø> (ø)

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 ea9751b...c6665e5. 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.

I think this should be ok... I dont know if anyone wrote wrapping tools that used it...

@raphinesse
Copy link
Contributor Author

I dont know if anyone wrote wrapping tools that used it...

I'd argue they relied on implementation details. But I'd be totally OK with labeling this change as breaking, since we are targeting a new major anyways.

@erisu
Copy link
Member

erisu commented Nov 9, 2021

I am OK with any label, but this should be good to merge in.

@raphinesse raphinesse merged commit f26778f into apache:master Nov 9, 2021
@raphinesse raphinesse deleted the void-promises branch November 9, 2021 21:26
@erisu erisu added this to the 7.0.0 milestone Nov 16, 2021
gazben pushed a commit to apicore-engineering/cordova-ios that referenced this pull request Aug 26, 2022
This makes build and run modules more closed by avoiding to expose
internals via the resolved promise value. Both modules' main exports
previously returned a promise that resolved to a subrocess spawn result.
Now these promises resolve to undefined.

The public API methods that return these promises did not document a
specific promise return value, just when the promise would resolve or
reject. Thus, this change is not breaking.
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.

3 participants