From 06c99d5d96fb416648a3ff522ba612dc3fed7dd4 Mon Sep 17 00:00:00 2001 From: Miki Date: Tue, 31 Jan 2023 08:57:25 -0800 Subject: [PATCH] Remove the problematic parsing of tsConfig as a result of dependents/node-filing-cabinet#110 Signed-off-by: Miki --- lib/Config.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/Config.js b/lib/Config.js index 4be5d58..b00fec8 100644 --- a/lib/Config.js +++ b/lib/Config.js @@ -23,14 +23,6 @@ class Config { if (!this.directory) { throw new Error('directory not given'); } if (this.filter && typeof this.filter !== 'function') { throw new Error('filter must be a function'); } - if ('string' === typeof this.tsConfig) { - debug('preparsing the ts config into an object for performance'); - const ts = require('typescript'); - const tsParsedConfig = ts.readJsonConfigFile(this.tsConfig, ts.sys.readFile); - const obj = ts.parseJsonSourceFileConfigFileContent(tsParsedConfig, ts.sys, path.dirname(this.tsConfig)); - this.tsConfig = obj.raw; - } - debug('given filename: ' + this.filename); this.filename = path.resolve(process.cwd(), this.filename);