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

[Merged by Bors] - Pretty print promise objects #2407

Closed
wants to merge 3 commits into from
Closed

Conversation

jedel1043
Copy link
Member

Right now our promises print { } on display. This PR improves a bit the display and ergonomics of promises in general. Now, promises will print...

  • When pending: Promise { <pending> }
  • When fulfilled: Promise { "hi" }
  • When rejected: Promise { <rejected> ReferenceError: x is not initialized }

@jedel1043 jedel1043 added the enhancement New feature or request label Nov 5, 2022
@jedel1043 jedel1043 added this to the v0.17.0 milestone Nov 5, 2022
@github-actions
Copy link

github-actions bot commented Nov 5, 2022

Test262 conformance changes

Test result main count PR count difference
Total 93,789 93,789 0
Passed 69,513 69,513 0
Ignored 18,352 18,352 0
Failed 5,924 5,924 0
Panics 0 0 0
Conformance 74.12% 74.12% 0.00%

Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

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

Nice change!

@codecov
Copy link

codecov bot commented Nov 5, 2022

Codecov Report

Merging #2407 (3a4a1c9) into main (91235c7) will decrease coverage by 0.02%.
The diff coverage is 41.66%.

@@            Coverage Diff             @@
##             main    #2407      +/-   ##
==========================================
- Coverage   38.85%   38.82%   -0.03%     
==========================================
  Files         313      313              
  Lines       23846    23863      +17     
==========================================
  Hits         9266     9266              
- Misses      14580    14597      +17     
Impacted Files Coverage Δ
boa_engine/src/object/mod.rs 18.69% <ø> (-0.25%) ⬇️
boa_engine/src/value/display.rs 67.00% <25.00%> (-13.24%) ⬇️
boa_engine/src/builtins/promise/mod.rs 19.84% <44.44%> (+0.31%) ⬆️
boa_engine/src/object/jsobject.rs 48.58% <85.71%> (+1.52%) ⬆️
boa_ast/src/property.rs 18.96% <0.00%> (-1.73%) ⬇️
boa_engine/src/vm/opcode/get/function.rs 50.00% <0.00%> (ø)
boa_engine/src/vm/opcode/get/generator.rs 0.00% <0.00%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@raskad
Copy link
Member

raskad commented Nov 5, 2022

bors r+

bors bot pushed a commit that referenced this pull request Nov 5, 2022
Right now our promises print `{ }` on display. This PR improves a bit the display and ergonomics of promises in general. Now, promises will print...
- When pending: `Promise { <pending> }`
- When fulfilled: `Promise { "hi" }`
- When rejected: `Promise { <rejected> ReferenceError: x is not initialized }`
@bors
Copy link

bors bot commented Nov 5, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Pretty print promise objects [Merged by Bors] - Pretty print promise objects Nov 5, 2022
@bors bors bot closed this Nov 5, 2022
@bors bors bot deleted the pretty-promise branch November 5, 2022 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants