-
Notifications
You must be signed in to change notification settings - Fork 9.5k
misc: use top-level await #13975
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
misc: use top-level await #13975
Conversation
Co-authored-by: Adam Raine <[email protected]>
@@ -26,8 +26,7 @@ if (!process.env.WPT_KEY) throw new Error('missing WPT_KEY'); | |||
const WPT_KEY = process.env.WPT_KEY; | |||
const DEBUG = process.env.DEBUG; | |||
|
|||
/** @type {typeof common.ProgressLogger['prototype']} */ | |||
let log; | |||
const log = new common.ProgressLogger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive by
happens in Node 15, sry :/ |
anyway, we could add |
checked our min node version 14.15 and also OK @brendankenny I think that top-level awaited promises are not unconsidered "unhandled" on rejections. The runtime is handling them. |
(#13967 should land first)
Fixes #13964
I likely missed a few places where we could use top-level await.
FYI:

I verified that a node process exits with 1 and logs the error when a promise rejects, so no need to catch them.