Skip to content

Commit

Permalink
Revert "Cache tsconfig when generating per-file cache key."
Browse files Browse the repository at this point in the history
This reverts commit a8de326.
  • Loading branch information
tvald committed Aug 2, 2017
1 parent a8de326 commit 5564fdb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/preprocessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,14 @@ export function process(
return src;
}

let tsConfig = undefined;
export function getCacheKey(
fileData: string,
filePath: Path,
configStr: string,
options: TransformOptions = { instrument: false }): string {

const jestConfig: JestConfig = JSON.parse(configStr);
if (!tsConfig) {
tsConfig = getTSConfig(jestConfig.globals, options.instrument);
}
const tsConfig = getTSConfig(jestConfig.globals, options.instrument);

return crypto.createHash('md5')
.update(JSON.stringify(tsConfig), 'utf8')
Expand Down

0 comments on commit 5564fdb

Please sign in to comment.