Missing default rejection tracking and console.log() polyfill to the Hermes CLI
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 859
- Avg merge
- 1h 30m
- Merged PRs (30d)
- 3
Description
## Bug Description
The following code returns 10 on v8 but doesn't return anything using the hermes binary:
```
function resolveAfter2Seconds(x) {
return new Promise((resolve) => {
setTimeout(() => {
resolve(x);
}, 2000);
});
}
async function f1() {
const x = await resolveAfter2Seconds(10);
console.log(x); // 10
}
f1();
```
## The Expected Behavior
To return 10;
Contributor guide
Research direction
Start by reproducing the async Promise example with the hermes binary and compare its output with V8. Trace the CLI behavior related to default rejection tracking and console.log(), then verify that the example prints 10 and that rejected Promises are tracked as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100