Comparing version 0.3.2 to 0.3.3
@@ -12,2 +12,3 @@ // Require module in given context | ||
, natives = process.binding('natives') | ||
, wrap = Module.wrap, get; | ||
@@ -22,7 +23,4 @@ | ||
if ((context === global) || | ||
(context.process && (context.process.title === 'node') && | ||
(context.pid === global.pid))) { | ||
return require(path); | ||
} | ||
if (context === global) return require(path); | ||
if (natives.hasOwnProperty(path)) return require(path); | ||
fmodule = get(path, context); | ||
@@ -42,5 +40,5 @@ if (fmodule.loaded) return fmodule.exports; | ||
fmodule.loaded = true; | ||
vm.runInContext(wrap(content), context).call(fmodule.exports, | ||
vm.runInContext(wrap(content), context, path).call(fmodule.exports, | ||
fmodule.exports, fmodule.require.bind(fmodule), fmodule, path, dirpath); | ||
return fmodule.exports; | ||
}; |
{ | ||
"name": "next", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "(deprecated) Node.js extensions", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -17,4 +17,4 @@ # node-ext - (Deprecated) Node.js extensions | ||
## Tests [![Build Status](https://secure.travis-ci.org/medikoo/node-ext.png?branch=master)](https://secure.travis-ci.org/medikoo/node-ext) | ||
## Tests [![Build Status](https://api.travis-ci.org/medikoo/node-ext.png?branch=master)](https://travis-ci.org/medikoo/node-ext) | ||
$ npm test |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18121
334
19