fix(plugin-stealth): Support puppeteer 14 private cdp client #653
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's just an example. I'm sure it could be nicer, but it works (at least for me; I couldn't run the tests because of Windows and there comes the error "Failed to download Firefox rv0.0.1!"). No time to fix this error.
Edit:
The problem is that
puppeteer@14
has finally made '#client' private. However, there is still/or now the functionPage._client()
, which returns the client. To avoid problems between<@14
and>=@14
, I made it a bit "uglier".Edit (2):
I had to make a 2nd commit because for some reason the 1st push didn't push the changes to the defaultArg test(s). (And another one to remove the dummy blank spaces.)