From 1f4e127370cecff23ac13585d5bfaecbe811d274 Mon Sep 17 00:00:00 2001 From: Andrew Bradley Date: Sun, 1 Mar 2020 23:28:02 -0500 Subject: [PATCH] Remove caching of ts.sys.readDirectory (#969) * Remove faulty caching of ts.sys.readDirectory * remove another case of cached readDirectory --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3b17a9edf..90e6cd6ec 100644 --- a/src/index.ts +++ b/src/index.ts @@ -491,7 +491,7 @@ export function create (rawOptions: CreateOptions = {}): Register { return ts.ScriptSnapshot.fromString(contents) }, readFile: cachedReadFile, - readDirectory: cachedLookup(debugFn('readDirectory', ts.sys.readDirectory)), + readDirectory: ts.sys.readDirectory, getDirectories: cachedLookup(debugFn('getDirectories', ts.sys.getDirectories)), fileExists: cachedLookup(debugFn('fileExists', fileExists)), directoryExists: cachedLookup(debugFn('directoryExists', ts.sys.directoryExists)), @@ -591,7 +591,7 @@ export function create (rawOptions: CreateOptions = {}): Register { if (cacheContents !== undefined) return cacheContents return cachedReadFile(fileName) }, - readDirectory: cachedLookup(debugFn('readDirectory', ts.sys.readDirectory)), + readDirectory: ts.sys.readDirectory, getDirectories: cachedLookup(debugFn('getDirectories', ts.sys.getDirectories)), fileExists: cachedLookup(debugFn('fileExists', fileExists)), directoryExists: cachedLookup(debugFn('directoryExists', ts.sys.directoryExists)),