-
Notifications
You must be signed in to change notification settings - Fork 68
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
fix(puppeteer): support puppeteer v15 #535
Conversation
@@ -61,7 +61,7 @@ function injectJSSource( | |||
source: string | Function, | |||
args: any[] = [] | |||
): Promise<void> { | |||
return frame.evaluate(source as any, ...args); | |||
return frame.evaluate(source as any, ...args) as Promise<void>; |
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.
Needed to typecast since this was type Promise<unknown>
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.
I should not review this, as I've made changes here.
IMO this should show up in release notes, either as a bug fix or a feature.
We should always look for alternatives to hacking tsconfig
. By using the actual Puppeteer types, we can avoid all of the hacks/casts and just pass plain objects around.
Did some quick testing using puppeteer v12-15. All ran without issues (including with typescript). |
See: #534