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

use new to instantiate all buffers #48

Merged
merged 1 commit into from
Sep 1, 2016

Conversation

MylesBorins
Copy link
Contributor

Using Buffer without new will soon stop working. It will throw
A deprecation warning in Node v7.

Using Buffer without `new` will soon stop working. It will throw
A deprecation warning in Node v7.
MylesBorins pushed a commit to MylesBorins/node-browserify that referenced this pull request Aug 31, 2016
Using Buffer without new will soon stop working. It will throw
A deprecation warning in Node v7. This commit modifies the tests
in `test/bare.js` and `test/bare_shebang.js` to use the
`Buffer.from` interface instead. It is a drop in replacement for
Buffer that is supported by Node v4 / v6 and Browserify's Buffer
implementation

For the browserify test suite to pass on Node v7 we will need
to land this commit as well as the two below PR's

* browserify/browser-pack#75
* max-mapper/concat-stream#48
@max-mapper
Copy link
Owner

i think @mafintosh found the vuln that resulted in the deprecation so i'm assigning him to merge this :)

@mafintosh mafintosh merged commit 4ca83d6 into max-mapper:master Sep 1, 2016
@mafintosh
Copy link
Collaborator

the vuln was fixed by #47. this is related to new Buffer(...) vs Buffer(...) being required in new node for some reason.

@mafintosh
Copy link
Collaborator

1.5.2

@jasnell
Copy link
Contributor

jasnell commented Sep 1, 2016

The reason for the new change is that there are a number of internal improvements that need to be made that will make Buffer a proper subclass of Uint8Array (which requires new).

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.

4 participants