Comparing version
@@ -104,6 +104,3 @@ "use strict"; | ||
}); | ||
for (var _i = 0, _a = arrify(argv.require); _i < _a.length; _i++) { | ||
var id = _a[_i]; | ||
Module._load(id); | ||
} | ||
Module._preloadModules(arrify(argv.require)); | ||
var EVAL_FILENAME = "[eval].ts"; | ||
@@ -186,3 +183,3 @@ var EVAL_PATH = path_1.join(cwd, EVAL_FILENAME); | ||
if (change.added) { | ||
var script = vm_1.createScript(change.value, EVAL_FILENAME); | ||
var script = new vm_1.Script(change.value, EVAL_FILENAME); | ||
result = script.runInNewContext(context); | ||
@@ -189,0 +186,0 @@ } |
@@ -128,2 +128,9 @@ "use strict"; | ||
}); | ||
it('should support require from node modules', function (done) { | ||
child_process_1.exec(BIN_EXEC + " -r typescript -e \"console.log('success')\"", function (err, stdout) { | ||
chai_1.expect(err).to.not.exist; | ||
chai_1.expect(stdout).to.equal('success\n'); | ||
return done(); | ||
}); | ||
}); | ||
}); | ||
@@ -130,0 +137,0 @@ describe('register', function () { |
{ | ||
"name": "ts-node", | ||
"version": "1.7.3", | ||
"version": "2.0.0", | ||
"preferGlobal": true, | ||
@@ -5,0 +5,0 @@ "description": "TypeScript execution environment and REPL for node", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
120374
0.64%963
0.42%