Commit Graph

6 Commits

Author SHA1 Message Date
jrandolf
9f5cb670e8
chore: consolidate deferred promise (#8863)
* fix: forward timeout waitForFileChooser

* chore: consolidate deferred promise

Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2022-08-30 16:24:51 +02:00
Alex Rudenko
202ffce0aa
fix: remove deferred promise timeouts (#8835)
Issue #8832 makes a good point that we should not be making
implicit assumptions about the client's performance
when waiting for internal events. At the same time,
we want to be able to get the debug info if some promises
never resolve because of missing backend events.

This PR adds a variable to turn on timeouts for deferred
promises created using `createDebuggableDeferredPromise`.
We can use it in our tests to catch never-resolving
promises or when reproducing bug reports where Puppeteer
hangs indefinitely.

Closes #8832
2022-08-24 12:05:32 +02:00
jrandolf
7001322cd1
feat: export public types only (#8584) 2022-06-27 09:24:23 +02:00
Yash Ladha
d8932ca187
chore: shorter node checker function (#6584)
`isNode` checks for the node version in which the process is running and it checks for the node key inside the versions. This is exactly the same as using `process.version` as they are set in the native code and `process.version` is just a shorthand for `process.versions.node`.
2020-11-05 07:49:58 +01:00
Wojciech Maj
aee8fda98a
fix: make Node.js environment detection robust w.r.t. JSDOM (#6148)
Previously Node.js was detected by the lack of `global.document` which doesn’t work in case JSDOM is being used in Node.js. Instead, we now detect `process.versions.node`, like here: 426943ae93 (diff-168726dbe96b3ce427e7fedce31bb0bc).

Fixes #6147.
2020-07-03 10:56:28 +02:00
Jack Franklin
b993adb468 chore(agnostic): Migrate DOMWorld (#6054)
DOMWorld only needs to use Node's `fs` module if you're adding a
filepath as a script/style tag. We can detect this case and run the
`require` inline such that in a browser this code won't execute.
2020-06-25 13:01:46 +02:00