-
Notifications
You must be signed in to change notification settings - Fork 9.3k
refactor!: use Uint8Array instead of Buffer for browser compatibility #12823
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
Conversation
a1054b8
to
48d8c5a
Compare
6ca3ee9
to
a1f0a99
Compare
5791f05
to
17ea82a
Compare
db65b30
to
7aa8f0e
Compare
Hi, Thank you very much. |
@Ph0tonic You can find the the changes on https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v23.0.0 |
Ho great, thanks. Indeed, having a link to those changes would definitely help. 👍 |
@Lightning00Blade This also should be mentioned in the breaking changes of the CHANGELOG. Everything that breaks existing code should be listed in the breaking changes. |
@Lightning00Blade Again the issue is due to the Issue tracked at - #12989 |
We want users to be able to use Puppeteer in different environments, most notably in the browser.
Therefore, we want to move away from Node-specific API and rely on the ECMAScript APIs more and this
change replaces Node's Buffer in various Puppeteer APIs with Uint8Array.
If you want to convert Uint8Array to Buffer, call
Buffer.from
. For example, instead ofconvert to Buffer explicitly:
Many Node APIs accept Uint8Arrays so it should not be needed unless you want to use Buffer-specific APIs.