Skip to content
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

Upgrade buffer lib to support Deno #327

Open
josephrocca opened this issue Oct 28, 2022 · 0 comments
Open

Upgrade buffer lib to support Deno #327

josephrocca opened this issue Oct 28, 2022 · 0 comments

Comments

@josephrocca
Copy link

There was a fix in NPM buffer package at v5.3.0 which added support for environments like SES and Deno which require you to edit __proto__ via Object.setPrototypeOf (because it is much safer, see here for explanation). The fix basically just replaces all instances of this:

buf.__proto__ = Buffer.prototype

with this:

Object.setPrototypeOf(buf, Buffer.prototype)

IIUC, Skypack is using an older version which doesn't have this fix - but I'm not sure because I don't think the code is open source? So I might be mistaken - perhaps the Buffer package that's in my final bundle is coming from somewhere else - in which case please feel free to close, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant