From 55682eecf3d58a4b82db15bc610667334fd25ca8 Mon Sep 17 00:00:00 2001 From: Dudley Flanders Date: Wed, 14 Dec 2011 16:03:20 -0600 Subject: [PATCH 1/3] Rename Script to NodeScript to match recent node versions --- app/run.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/run.js b/app/run.js index fe0a3e2..8f0328e 100755 --- a/app/run.js +++ b/app/run.js @@ -10,12 +10,12 @@ // load the node.js libraries to be abstracted var fs = require('fs'); var path = require('path'); -var Script = process.binding('evals').Script; +var NodeScript = process.binding('evals').NodeScript; // define a few globals to be compatible with jsrun.jar global.arguments = global.internal_args || process.argv.slice(2); load = function(file) { - Script.runInThisContext(fs.readFileSync(file), file); + NodeScript.runInThisContext(fs.readFileSync(file), file); }; print = console.log; quit = process.exit; From 10cd7bc891b79d3d947397819870aa8e5d74df07 Mon Sep 17 00:00:00 2001 From: Dudley Flanders Date: Thu, 5 Jan 2012 00:02:59 -0600 Subject: [PATCH 2/3] Use require('vm').Script to be compatible with more node versions. --- app/run.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/run.js b/app/run.js index 8f0328e..2f59149 100755 --- a/app/run.js +++ b/app/run.js @@ -10,12 +10,12 @@ // load the node.js libraries to be abstracted var fs = require('fs'); var path = require('path'); -var NodeScript = process.binding('evals').NodeScript; +var Script = require('vm').Script; // define a few globals to be compatible with jsrun.jar global.arguments = global.internal_args || process.argv.slice(2); load = function(file) { - NodeScript.runInThisContext(fs.readFileSync(file), file); + Script.runInThisContext(fs.readFileSync(file), file); }; print = console.log; quit = process.exit; From 23d24e70dfa2f2638f7c6cd547a69243c309a492 Mon Sep 17 00:00:00 2001 From: Dudley Flanders Date: Thu, 5 Jan 2012 15:29:30 -0600 Subject: [PATCH 3/3] Update node version in package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bb0cb45..e2345ac 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "test": "app/test.js" }, "engines": { - "node": "0.4" + "node": ">=0.4" }, "dependencies": {}, "devDependencies": {} -} \ No newline at end of file +}