Skip to content

Rename as_promise to as_promise_object and add as_promise -> JsPromise#3965

Merged
jedel1043 merged 1 commit intoboa-dev:mainfrom
hansl:as_promised
Aug 23, 2024
Merged

Rename as_promise to as_promise_object and add as_promise -> JsPromise#3965
jedel1043 merged 1 commit intoboa-dev:mainfrom
hansl:as_promised

Conversation

@hansl
Copy link
Contributor

@hansl hansl commented Aug 20, 2024

This aligns the API with other methods (e.g. as_function()) and makes it more intuitive.

BREAKING CHANGE

This is a breaking change as the JsValue::as_promise() API returns a different value. It is now more align to the rest of the API though with as_* returning the expected type.

@codecov
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 52.05%. Comparing base (6ddc2b4) to head (7384718).
Report is 236 commits behind head on main.

Files Patch % Lines
core/engine/src/value/mod.rs 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3965      +/-   ##
==========================================
+ Coverage   47.24%   52.05%   +4.81%     
==========================================
  Files         476      468       -8     
  Lines       46892    45104    -1788     
==========================================
+ Hits        22154    23481    +1327     
+ Misses      24738    21623    -3115     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HalidOdat HalidOdat requested a review from a team August 20, 2024 22:00
@jasonwilliams jasonwilliams added the A-API Changes related to public APIs label Aug 20, 2024
@jedel1043 jedel1043 added this pull request to the merge queue Aug 23, 2024
Merged via the queue into boa-dev:main with commit 1691802 Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-API Changes related to public APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants