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

Replaces Buffer( by Buffer.from( #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arcanis
Copy link

@arcanis arcanis commented Sep 30, 2018

The Buffer constructor is deprecated for security reason; Node recommends using Buffer.from() instead in such situations. Until it's fixed, it'll print annoying warning messages.

@goto-bus-stop
Copy link
Member

Thanks! It would be nice if we could still support very old environments that don't have Buffer.from (browserify itself works all the way back to Node 0.8! maybe even 0.6, but CI doesn't 100% support that anymore, so I'm not sure…)

Perhaps we can do (Buffer.from||Buffer)( instead, and add a test that does delete Buffer.from; fs.readFileSync(...)? I think that should work for new and old Nodes.

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

Successfully merging this pull request may close these issues.

2 participants