From 40281090813362640fbeac586dcf61eab588f6e6 Mon Sep 17 00:00:00 2001 From: chge Date: Mon, 26 Sep 2016 13:04:21 +0300 Subject: [PATCH 1/4] Fix #60: define module.paths for sandbox --- lib/sandboxed_module.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/sandboxed_module.js b/lib/sandboxed_module.js index 6bf483c..eb3617c 100644 --- a/lib/sandboxed_module.js +++ b/lib/sandboxed_module.js @@ -68,6 +68,7 @@ SandboxedModule.prototype._init = function(moduleId, trace, options) { var module = new Module(this.filename, parent); module.filename = this.filename; + module.paths = parent.paths; this.module = module; From c600548313362aaf153d7eb1785bd350471e5dc1 Mon Sep 17 00:00:00 2001 From: chge Date: Mon, 26 Sep 2016 13:04:46 +0300 Subject: [PATCH 2/4] 2.0.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 767cf90..95bc6de 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "testing" ], "license": "MIT", - "version": "2.0.3", + "version": "2.0.4", "repository": "felixge/node-sandboxed-module", "main": "./lib/sandboxed_module", "files": [ From 65838dd821c32fd0953bc81c822bfe6d7282152c Mon Sep 17 00:00:00 2001 From: chge Date: Mon, 26 Sep 2016 16:31:27 +0300 Subject: [PATCH 3/4] Fix #55 global properly referenced to itself --- lib/sandboxed_module.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/sandboxed_module.js b/lib/sandboxed_module.js index eb3617c..ed53ac8 100644 --- a/lib/sandboxed_module.js +++ b/lib/sandboxed_module.js @@ -119,6 +119,8 @@ SandboxedModule.prototype._getGlobals = function() { globals[optionsGlobalsKey] = this._options.globals[optionsGlobalsKey]; } + globals.global = globals.GLOBAL = globals.root = globals; + return globals; }; From 67bfe381e89b3752740936a3a210481103db31f2 Mon Sep 17 00:00:00 2001 From: chge Date: Mon, 26 Sep 2016 16:43:03 +0300 Subject: [PATCH 4/4] 2.0.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 95bc6de..50a24ca 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "testing" ], "license": "MIT", - "version": "2.0.4", + "version": "2.0.5", "repository": "felixge/node-sandboxed-module", "main": "./lib/sandboxed_module", "files": [