Comparing version 6.2.0 to 7.0.0
@@ -49,3 +49,3 @@ "use strict"; | ||
exports.DEFAULTS = { | ||
files: yn(process.env['TS_NODE_FILES'], { default: true }), | ||
files: yn(process.env['TS_NODE_FILES']), | ||
cache: yn(process.env['TS_NODE_CACHE'], { default: true }), | ||
@@ -162,3 +162,11 @@ pretty: yn(process.env['TS_NODE_PRETTY']), | ||
var extensions = ['.ts', '.tsx']; | ||
var cachedir = path_1.join(path_1.resolve(cwd, cacheDirectory), getCompilerDigest({ version: ts.version, typeCheck: typeCheck, ignoreDiagnostics: ignoreDiagnostics, config: config, compiler: compiler })); | ||
var fileNames = options.files ? config.fileNames : []; | ||
var cachedir = path_1.join(path_1.resolve(cwd, cacheDirectory), getCompilerDigest({ | ||
version: ts.version, | ||
options: config.options, | ||
fileNames: fileNames, | ||
typeCheck: typeCheck, | ||
ignoreDiagnostics: ignoreDiagnostics, | ||
compiler: compiler | ||
})); | ||
var diagnosticHost = { | ||
@@ -185,8 +193,6 @@ getNewLine: function () { return os_1.EOL; }, | ||
} | ||
// Add all files into the file hash. | ||
if (options.files) { | ||
for (var _i = 0, _a = config.fileNames; _i < _a.length; _i++) { | ||
var fileName = _a[_i]; | ||
memoryCache.versions[fileName] = 1; | ||
} | ||
// Initialize files from TypeScript into project. | ||
for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) { | ||
var path = fileNames_1[_i]; | ||
memoryCache.versions[path] = 1; | ||
} | ||
@@ -364,4 +370,5 @@ /** | ||
// Return diagnostics. | ||
if (result.error) | ||
return { errors: [result.error] }; | ||
if (result.error) { | ||
return { errors: [result.error], fileNames: [], options: {} }; | ||
} | ||
config = result.config; | ||
@@ -435,3 +442,3 @@ basePath = normalizeSlashes(path_1.dirname(configFileName)); | ||
.update(path_1.extname(fileName), 'utf8') | ||
.update('\x001\x00', 'utf8') // Store "cache version" in hash. | ||
.update('\x00', 'utf8') | ||
.update(sourceCode, 'utf8') | ||
@@ -438,0 +445,0 @@ .digest('hex'); |
{ | ||
"name": "ts-node", | ||
"version": "6.2.0", | ||
"version": "7.0.0", | ||
"description": "TypeScript execution environment and REPL for node.js, with source map support", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -10,2 +10,4 @@ # ![TypeScript Node](logo.svg) | ||
**Tip:** `ts-node` differs slightly from `tsc`. It will not load files from `tsconfig.json` by default. Instead, `ts-node` starts from the input file and discovers the rest of the project tree through imports and references. | ||
## Installation | ||
@@ -12,0 +14,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127871
1129
161