next
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -8,3 +8,3 @@ // Require module in given context | ||
, readFile = require('fs').readFileSync | ||
, dirname = require('path').dirname | ||
, path = require('path') | ||
, vm = require('vm') | ||
@@ -14,2 +14,3 @@ , memoize = require('memoizee') | ||
, dirname = path.dirname, extname = path.extname | ||
, natives = process.binding('natives') | ||
@@ -42,5 +43,9 @@ , wrap = Module.wrap, get; | ||
fmodule.loaded = true; | ||
vm.runInContext(wrap(content), context, path).call(fmodule.exports, | ||
fmodule.exports, fmodule.require.bind(fmodule), fmodule, path, dirpath); | ||
if (extname(path) === '.json') { | ||
fmodule.exports = JSON.parse(content); | ||
} else { | ||
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.4.0", | ||
"version": "0.4.1", | ||
"description": "(deprecated) Node.js extensions", | ||
@@ -19,13 +19,17 @@ "author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)", | ||
"dependencies": { | ||
"deferred": "0.7.x", | ||
"es5-ext": "~0.10.2", | ||
"memoizee": "0.3.x" | ||
"deferred": "~0.7.5", | ||
"es5-ext": "~0.10.11", | ||
"memoizee": "~0.3.9" | ||
}, | ||
"devDependencies": { | ||
"tad": "~0.1.21" | ||
"tad": "~0.2.4", | ||
"xlint": "~0.2.2", | ||
"xlint-jslint-medikoo": "~0.1.4" | ||
}, | ||
"scripts": { | ||
"lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream", | ||
"lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch", | ||
"test": "node ./node_modules/tad/bin/tad" | ||
}, | ||
"licence": "MIT" | ||
"license": "MIT" | ||
} |
@@ -14,5 +14,5 @@ 'use strict'; | ||
}, | ||
"Resolve": function (t, a) { | ||
Resolve: function (t, a) { | ||
a(t(pg).resolve('./sample'), resolve(pg, 'sample.js')); | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
18837
341
0
3
Updateddeferred@~0.7.5
Updatedes5-ext@~0.10.11
Updatedmemoizee@~0.3.9