Socket
Socket
Sign inDemoInstall

ts-node

Package Overview
Dependencies
Maintainers
1
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-node - npm Package Compare versions

Comparing version 6.0.2 to 6.0.3

19

dist/bin.js

@@ -120,3 +120,3 @@ #!/usr/bin/env node

try {
result = _eval(code, global);
result = _eval(code);
}

@@ -137,3 +137,3 @@ catch (error) {

*/
function _eval(input, context) {
function _eval(input) {
var lines = EVAL_INSTANCE.lines;

@@ -159,3 +159,3 @@ var isCompletion = !/\n$/.test(input);

return changes.reduce(function (result, change) {
return change.added ? exec(change.value, EVAL_FILENAME, context) : result;
return change.added ? exec(change.value, EVAL_FILENAME) : result;
}, undefined);

@@ -166,5 +166,5 @@ }

*/
function exec(code, filename, context) {
function exec(code, filename) {
var script = new vm_1.Script(code, { filename: filename });
return script.runInNewContext(context);
return script.runInThisContext();
}

@@ -179,4 +179,5 @@ /**

output: process.stdout,
terminal: process.stdout.isTTY,
eval: replEval,
useGlobal: false
useGlobal: true
});

@@ -188,3 +189,3 @@ // Bookmark the point where we should reset the REPL state.

// Hard fix for TypeScript forcing `Object.defineProperty(exports, ...)`.
exec('exports = module.exports', EVAL_FILENAME, repl.context);
exec('exports = module.exports', EVAL_FILENAME);
}

@@ -211,3 +212,3 @@ reset();

*/
function replEval(code, context, _filename, callback) {
function replEval(code, _context, _filename, callback) {
var err;

@@ -221,3 +222,3 @@ var result;

try {
result = _eval(code, context);
result = _eval(code);
}

@@ -224,0 +225,0 @@ catch (error) {

{
"name": "ts-node",
"version": "6.0.2",
"version": "6.0.3",
"description": "TypeScript execution environment and REPL for node",

@@ -57,3 +57,3 @@ "main": "dist/index.js",

"@types/mocha": "^5.0.0",
"@types/node": "^9.4.6",
"@types/node": "^10.0.3",
"@types/proxyquire": "^1.3.28",

@@ -60,0 +60,0 @@ "@types/react": "^16.0.2",

Sorry, the diff of this file is not supported yet

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