From fc7b31c9ba4a4341db3874d736583b03c029fc0c Mon Sep 17 00:00:00 2001 From: Alice Pote Date: Wed, 17 May 2023 10:53:41 -0400 Subject: [PATCH] remove now-unneeded function --- src/compiler/sys/typescript/typescript-sys.ts | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/src/compiler/sys/typescript/typescript-sys.ts b/src/compiler/sys/typescript/typescript-sys.ts index 8179f4da7974..6b4fde80e629 100644 --- a/src/compiler/sys/typescript/typescript-sys.ts +++ b/src/compiler/sys/typescript/typescript-sys.ts @@ -198,7 +198,6 @@ export const patchTypescript = (config: d.Config, inMemoryFs: InMemoryFileSystem patchTsSystemWatch(config.sys, ts.sys); } patchTypeScriptResolveModule(config, inMemoryFs); - patchTypeScriptGetParsedCommandLineOfConfigFile(); (ts as any).__patched = true; } }; @@ -243,37 +242,3 @@ export const getTypescriptPathFromUrl = (config: d.Config, tsExecutingUrl: strin } return url; }; - -export const patchTypeScriptGetParsedCommandLineOfConfigFile = () => { - const orgGetParsedCommandLineOfConfigFile = ts.getParsedCommandLineOfConfigFile; - - const patchedFunc = ( - configFileName: string, - optionsToExtend: ts.CompilerOptions, - host: ts.ParseConfigFileHost, - extendedConfigCache: Map - ) => { - const results = orgGetParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache); - - // manually filter out any .spec or .e2e files - results.fileNames = results.fileNames.filter((f) => { - // filter e2e tests - if (f.includes('.e2e.') || f.includes('/e2e.')) { - return false; - } - // filter spec tests - if (f.includes('.spec.') || f.includes('/spec.')) { - return false; - } - return true; - }); - - return results; - }; - - Object.defineProperty(ts, 'getParsedCommandLineOfConfigFile', { - get: () => patchedFunc, - enumerable: true, - configurable: true, - }); -};