browserify-13.1.0.tgz/test/bare.js:34: ps.stdin.end('console.log(Buffer("ABC"))');
browserify-13.1.0.tgz/test/bare_shebang.js:32: ps.stdin.end('#!/usr/bin/env node\nconsole.log(Buffer("WOO"))');
browserify-13.1.0.tgz/test/global/buffer.js:1:t.equal(Buffer('xyz').toString('base64'), 'eHl6');
browserify-13.1.0.tgz/test/global/buffer.js:2:t.equal(Buffer('eHl6', 'base64').toString(), 'xyz');
browserify-13.1.0.tgz/test/leak.js:46: stream.push('t.equal(Buffer("eHl6", "base64").toString(), "xyz")');
Refs: nodejs/node#8169, nodejs/node#7152.
Two options here:
Buffer.alloc()/Buffer.from()/Buffer.allocUnsafe()(requires a shim for v0.10/v0.12 and older v4.x versions prior to v4.5.0).new Buffer()for the time being — just add thenewkeyword everywhere. You should manually check that everything is safe in this case, see the links below for more explanation. That might be hard-deprecated at some later point.More background:
Quick grep (you should better re-check):
The grep above only includes the lines that call
Buffer()without thenewkeyword, if you choose to move to the new API — you should probably also replacenew Buffer(…)calls.