Comparing version 1.1.2 to 1.1.3
20
index.js
@@ -13,5 +13,10 @@ var natives = process.binding('natives') | ||
ContextifyScript = process.binding('contextify').ContextifyScript; | ||
runInThisContext = function runInThisContext(code, options) { | ||
var script = new ContextifyScript(code, options); | ||
return script.runInThisContext(); | ||
/*istanbul ignore next*/ | ||
if (process.version.split('.')[0].length > 2) { // v10.0.0 and above | ||
runInThisContext = vm.runInThisContext; | ||
} else { | ||
runInThisContext = function runInThisContext(code, options) { | ||
var script = new ContextifyScript(code, options); | ||
return script.runInThisContext(); | ||
} | ||
} | ||
@@ -69,3 +74,7 @@ } catch (er) { | ||
wrapper: wrap, | ||
_cache: cache | ||
_cache: cache, | ||
_source: natives, | ||
nonInternalExists: function (id) { | ||
return id.indexOf('internal/') !== 0; | ||
} | ||
} | ||
@@ -84,3 +93,3 @@ } | ||
} | ||
if (id === 'internal/bootstrap/loaders') { | ||
if (id === 'internal/bootstrap/loaders' || id === 'internal/process') { | ||
// Provide just enough to keep `graceful-fs@3` working and tests passing. | ||
@@ -135,2 +144,3 @@ // For now. | ||
nm.loading = false | ||
/*istanbul ignore next*/ | ||
if (setV8Flags) { | ||
@@ -137,0 +147,0 @@ // Ref: https://github.com/nodejs/node/blob/591a24b819d53a555463b1cbf9290a6d8bcc1bcb/lib/internal/bootstrap_node.js#L429-L434 |
{ | ||
"name": "natives", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Do stuff with Node.js's native JavaScript modules", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "tap test/*.js --100" | ||
"test": "tap test/*.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/isaacs/natives.git" | ||
"url": "git+https://github.com/addaleax/natives.git" | ||
}, | ||
@@ -16,5 +16,5 @@ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", | ||
"bugs": { | ||
"url": "https://github.com/isaacs/natives/issues" | ||
"url": "https://github.com/addaleax/natives/issues" | ||
}, | ||
"homepage": "https://github.com/isaacs/natives#readme", | ||
"homepage": "https://github.com/addaleax/natives#readme", | ||
"devDependencies": { | ||
@@ -21,0 +21,0 @@ "tap": "^11.0.0" |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
6773
142
0