Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/require-hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module.exports = function requireHook (opts) {
return wrap.call(Module, script);
} else {
// Use custom module wrapper that undefines window/document
return '(function (exports, require, module, __filename, __dirname, process, global, window, navigator, document, self) { ' +
return '(function (exports, require, module, __filename, __dirname, process, global, Buffer, window, navigator, document, self) {' +
script +
'\n});';
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"concat-stream": "^1.5.1",
"convert-source-map": "^1.2.0",
"deep-extend": "^0.4.1",
"electron": "1.4.15",
"electron": "^1.6.6",
"events": "^1.1.0",
"mime": "^1.3.4",
"minimist": "^1.2.0",
Expand All @@ -38,7 +38,7 @@
"browserify": "^13.0.0",
"concat-stream": "^1.5.1",
"cross-spawn-async": "^2.1.6",
"electron-canvas-to-buffer": "^1.0.3",
"electron-canvas-to-buffer": "^2.0.0",
"faucet": "0.0.1",
"get-stdin": "^5.0.1",
"github-markdown-css": "^2.2.0",
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/harmony.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"v8": {
"flags": [
"--harmony_object_values_entries"
"--harmony"
]
}
}
}
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ setup('module.parent from other', 'no-parent-other.js', 'parent');

setup('test --config=file v8 flags', 'harmony_object_values_entries.js',
'[["foo","bar"]]',
[ '--js-flags=--harmony_object_values_entries', '--config', path.resolve(__dirname, 'fixtures', 'harmony.json') ]);
[ '--js-flags=--harmony', '--config', path.resolve(__dirname, 'fixtures', 'harmony.json') ]);

// May fail since Chrome now supports almost 100% ES6 ...
// setup('js-flags from CLI', 'harmony-proxies.js', 'object\n', [
Expand Down Expand Up @@ -90,7 +90,7 @@ test('require.resolve entry file', function (t) {
setup('process.cwd()', 'cwd.js', process.cwd(), [ ]);
setup('require.main', 'main.js', 'is main');
setup('browser field resolution enabled', 'browser-field.js', 'browser', [ '--browser-field' ]);
setup('browser field resolution enabled', 'no-browser-globals.js', JSON.stringify({
setup('browser globals undefined', 'no-browser-globals.js', JSON.stringify({
window: 'undefined',
document: 'undefined',
navigator: 'undefined'
Expand Down