Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 8.5.2 to 8.5.3

21

dist/index.js

@@ -160,6 +160,4 @@ "use strict";

].map(Number);
const ignore = options.skipIgnore ? [] : (options.ignore || ['/node_modules/']).map(str => new RegExp(str));
// Require the TypeScript compiler and configuration.
const cwd = options.dir ? path_1.resolve(options.dir) : process.cwd();
const isScoped = options.scope ? (fileName) => path_1.relative(cwd, fileName).charAt(0) !== '.' : () => true;
const typeCheck = options.typeCheck === true || options.transpileOnly !== true;

@@ -174,2 +172,4 @@ const compiler = require.resolve(options.compiler || 'typescript', { paths: [cwd, __dirname] });

const outputCache = new Map();
const isScoped = options.scope ? (relname) => relname.charAt(0) !== '.' : () => true;
const shouldIgnore = createIgnore(options.skipIgnore ? [] : (options.ignore || ['/node_modules/']).map(str => new RegExp(str)));
const diagnosticHost = {

@@ -321,3 +321,3 @@ getNewLine: () => ts.sys.newLine,

if (diagnosticList.length)
reportTSError(configDiagnosticList);
reportTSError(diagnosticList);
return [result.outputText, result.sourceMapText];

@@ -338,3 +338,8 @@ };

const enabled = (enabled) => enabled === undefined ? active : (active = !!enabled);
const ignored = (fileName) => !active || !isScoped(fileName) || shouldIgnore(fileName, ignore);
const ignored = (fileName) => {
if (!active)
return true;
const relname = path_1.relative(cwd, fileName);
return !isScoped(relname) || shouldIgnore(relname);
};
return { ts, config, compile, getTypeInfo, ignored, enabled };

@@ -346,5 +351,7 @@ }

*/
function shouldIgnore(filename, ignore) {
const relname = normalizeSlashes(filename);
return ignore.some(x => x.test(relname));
function createIgnore(ignore) {
return (relname) => {
const path = normalizeSlashes(relname);
return ignore.some(x => x.test(path));
};
}

@@ -351,0 +358,0 @@ /**

@@ -161,2 +161,11 @@ "use strict";

});
it('should throw error even in transpileOnly mode', function (done) {
child_process_1.exec(`${BIN_EXEC} --transpile-only -pe "console."`, function (err) {
if (err === null) {
return done('Command was expected to fail, but it succeeded.');
}
chai_1.expect(err.message).to.contain('error TS1003: Identifier expected');
return done();
});
});
it('should pipe into `ts-node` and evaluate', function (done) {

@@ -163,0 +172,0 @@ const cp = child_process_1.exec(BIN_EXEC, function (err, stdout) {

{
"name": "ts-node",
"version": "8.5.2",
"version": "8.5.3",
"description": "TypeScript execution environment and REPL for node.js, with source map support",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

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