Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vm2

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vm2 - npm Package Compare versions

Comparing version 3.6.0 to 3.6.1

test/node_modules/foobar/index.js

4

CHANGELOG.md

@@ -0,1 +1,5 @@

v3.6.1 (2018-06-27)
-------------------
[fix] Security fixes
v3.6.0 (2018-05-11)

@@ -2,0 +6,0 @@ -------------------

8

lib/main.js

@@ -95,10 +95,2 @@ const fs = require('fs');

/**
* Makes the object read only.
*
* @static
* @param {*} object Object to freeze.
* @return {*} Frozen object.
*/
/**
* Create VM instance.

@@ -105,0 +97,0 @@ *

@@ -350,5 +350,27 @@ const {Script} = host.require('vm');

features: Contextify.readonly(host.process.features),
nextTick(callback) { return host.process.nextTick(() => callback.call(null)); },
hrtime() { return host.process.hrtime(); },
cwd() { return host.process.cwd(); },
nextTick(callback) {
if (typeof callback !== 'function') {
throw new Error('Callback must be a function.');
};
try {
return host.process.nextTick(() => callback.call(null));
} catch (e) {
throw Contextify.value(e);
}
},
hrtime() {
try {
return host.process.hrtime();
} catch (e) {
throw Contextify.value(e);
}
},
cwd() {
try {
return host.process.cwd();
} catch (e) {
throw Contextify.value(e);
}
},
on(name, handler) {

@@ -359,3 +381,8 @@ if (name !== 'beforeExit' && name !== 'exit') {

host.process.on(name, Decontextify.value(handler));
try {
host.process.on(name, Decontextify.value(handler));
} catch (e) {
throw Contextify.value(e);
}
return this;

@@ -369,3 +396,8 @@ },

host.process.once(name, Decontextify.value(handler));
try {
host.process.once(name, Decontextify.value(handler));
} catch (e) {
throw Contextify.value(e);
}
return this;

@@ -379,3 +411,8 @@ },

removeListener(name, handler) {
host.process.removeListener(name, Decontextify.value(handler));
try {
host.process.removeListener(name, Decontextify.value(handler));
} catch (e) {
throw Contextify.value(e);
}
return this;

@@ -389,3 +426,7 @@ },

return host.process.umask();
try {
return host.process.umask();
} catch (e) {
throw Contextify.value(e);
}
}

@@ -392,0 +433,0 @@ };

@@ -16,3 +16,3 @@ {

],
"version": "3.6.0",
"version": "3.6.1",
"main": "index.js",

@@ -19,0 +19,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc