Skip to content

Commit d7ea3dd

Browse files
authored
Merge pull request #1678 from substack/buffer-5
Update 'buffer' to v5.x
2 parents 6efcd65 + 4f5d93b commit d7ea3dd

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"browser-pack": "^6.0.1",
2626
"browser-resolve": "^1.11.0",
2727
"browserify-zlib": "~0.1.2",
28-
"buffer": "^4.1.0",
28+
"buffer": "^5.0.2",
2929
"cached-path-relative": "^1.0.0",
3030
"concat-stream": "~1.5.1",
3131
"console-browserify": "^1.1.0",

test/double_buffer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ test('double buffer', function (t) {
99
b.require('buffer');
1010
b.bundle(function (err, src) {
1111
if (err) return t.fail(err);
12-
vm.runInNewContext(src, { t: t });
12+
vm.runInNewContext(src, { t: t, Uint8Array: Uint8Array });
1313
});
1414
});

test/global.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test('__filename and __dirname with insertGlobals: true', function (t) {
2626
});
2727
b.require(__dirname + '/global/filename.js', { expose: 'x' });
2828
b.bundle(function (err, src) {
29-
var c = {};
29+
var c = { Uint8Array: Uint8Array };
3030
c.self = c;
3131
vm.runInNewContext(src, c);
3232
var x = c.require('x');

test/leak.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ test('leaking information about system paths (Buffer)', function (t) {
5252
t.equal(src.indexOf(dirstring), -1, 'temp directory visible');
5353
t.equal(src.indexOf(process.cwd()), -1, 'cwd directory visible');
5454
t.equal(src.indexOf('/home'), -1, 'home directory visible');
55-
vm.runInNewContext(src, { t: t, setTimeout: setTimeout });
55+
vm.runInNewContext(src, { t: t, setTimeout: setTimeout, Uint8Array: Uint8Array });
5656
});
5757
});

0 commit comments

Comments
 (0)