Socket
Socket
Sign inDemoInstall

next

Package Overview
Dependencies
3
Maintainers
1
Versions
2644
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 0.4.1

LICENSE

11

module/require-in-context.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc