Comparing version 3.6.3 to 3.6.4
@@ -0,1 +1,10 @@ | ||
v3.6.4 (2018-10-17) | ||
------------------- | ||
[fix] Added new to vmwerror when trying to load coffeescipt but can't (dotconnor) | ||
[fix] Add arguments to process.nextTick proxy (Patrick Engström) | ||
v3.6.3 (2018-08-06) | ||
------------------- | ||
[fix] Security fixes | ||
v3.6.2 (2018-07-05) | ||
@@ -2,0 +11,0 @@ ------------------- |
@@ -0,1 +1,3 @@ | ||
import {EventEmitter} from 'events'; | ||
/** | ||
@@ -66,3 +68,3 @@ * Require options for a VM | ||
*/ | ||
export class NodeVM { | ||
export class NodeVM extends EventEmitter { | ||
constructor(options?: NodeVMOptions); | ||
@@ -69,0 +71,0 @@ /** Runs the code */ |
@@ -22,3 +22,3 @@ const fs = require('fs'); | ||
} catch (ex) { | ||
throw VMError('Coffee-Script compiler is not installed.'); | ||
throw new VMError('Coffee-Script compiler is not installed.'); | ||
} | ||
@@ -25,0 +25,0 @@ |
@@ -350,3 +350,3 @@ const {Script} = host.require('vm'); | ||
features: Contextify.readonly(host.process.features), | ||
nextTick(callback) { | ||
nextTick(callback, ...args) { | ||
if (typeof callback !== 'function') { | ||
@@ -357,3 +357,5 @@ throw new Error('Callback must be a function.'); | ||
try { | ||
return host.process.nextTick(Decontextify.value(callback)); | ||
return host.process.nextTick(Decontextify.value(function() { | ||
callback.apply(null, args) | ||
})); | ||
} catch (e) { | ||
@@ -360,0 +362,0 @@ throw Contextify.value(e); |
@@ -16,3 +16,3 @@ { | ||
], | ||
"version": "3.6.3", | ||
"version": "3.6.4", | ||
"main": "index.js", | ||
@@ -19,0 +19,0 @@ "repository": "github:patriksimek/vm2", |
62192
1396