Comparing version 8.4.0 to 8.4.1
@@ -35,2 +35,3 @@ "use strict"; | ||
constructor(rootFileNames = []) { | ||
this.rootFileNames = rootFileNames; | ||
this.fileContents = new Map(); | ||
@@ -212,3 +213,3 @@ this.fileVersions = new Map(); | ||
const serviceHost = { | ||
getScriptFileNames: () => Array.from(memoryCache.fileVersions.keys()), | ||
getScriptFileNames: () => memoryCache.rootFileNames, | ||
getScriptVersion: (fileName) => { | ||
@@ -240,3 +241,4 @@ const version = memoryCache.fileVersions.get(fileName); | ||
getDefaultLibFileName: () => ts.getDefaultLibFilePath(config.options), | ||
getCustomTransformers: getCustomTransformers | ||
getCustomTransformers: getCustomTransformers, | ||
writeFile: ts.sys.writeFile | ||
}; | ||
@@ -248,2 +250,5 @@ const registry = ts.createDocumentRegistry(ts.sys.useCaseSensitiveFileNames, cwd); | ||
const fileVersion = memoryCache.fileVersions.get(fileName) || 0; | ||
// Add to `rootFiles` when discovered for the first time. | ||
if (fileVersion === 0) | ||
memoryCache.rootFileNames.push(fileName); | ||
// Avoid incrementing cache when nothing has changed. | ||
@@ -250,0 +255,0 @@ if (memoryCache.fileContents.get(fileName) === contents) |
@@ -218,3 +218,3 @@ "use strict"; | ||
it('should import ts before js when TS_NODE_PREFER_TS_EXTS env is present', function (done) { | ||
child_process_1.exec(`${BIN_EXEC} tests/import-order/compiled`, { env: Object.assign({}, process.env, { TS_NODE_PREFER_TS_EXTS: 'true' }) }, function (err, stdout) { | ||
child_process_1.exec(`${BIN_EXEC} tests/import-order/compiled`, { env: Object.assign(Object.assign({}, process.env), { TS_NODE_PREFER_TS_EXTS: 'true' }) }, function (err, stdout) { | ||
chai_1.expect(err).to.equal(null); | ||
@@ -221,0 +221,0 @@ chai_1.expect(stdout).to.equal('Hello, TypeScript!\n'); |
{ | ||
"name": "ts-node", | ||
"version": "8.4.0", | ||
"version": "8.4.1", | ||
"description": "TypeScript execution environment and REPL for node.js, with source map support", | ||
@@ -67,3 +67,3 @@ "main": "dist/index.js", | ||
"tslint-config-standard": "^8.0.1", | ||
"typescript": "^3.2.4" | ||
"typescript": "^3.6.3" | ||
}, | ||
@@ -70,0 +70,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
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
135865
1194