Skip to content

Commit

Permalink
Remove caching of ts.sys.readDirectory (#969)
Browse files Browse the repository at this point in the history
* Remove faulty caching of ts.sys.readDirectory

* remove another case of cached readDirectory
  • Loading branch information
cspotcode committed Mar 2, 2020
1 parent 35e2f92 commit 1f4e127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Expand Up @@ -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)),
Expand Down Expand Up @@ -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)),
Expand Down

0 comments on commit 1f4e127

Please sign in to comment.