Skip to content

Commit

Permalink
Use rootDir in the haste map cache name
Browse files Browse the repository at this point in the history
  • Loading branch information
rubennorte committed Oct 1, 2018
1 parent 9a22225 commit 0a96100
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/jest-haste-map/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ class HasteMap extends EventEmitter {
'deprecated. Provide a RegExp instead. See https://github.com/facebook/jest/pull/4063.',
);
}
const rootDirHash = crypto.createHash('md5').update(options.rootDir);
this._cachePath = HasteMap.getCacheFilePath(
this._options.cacheDirectory,
`haste-map-${this._options.name}`,
`haste-map-${this._options.name}-${rootDirHash}`,
VERSION,
this._options.roots
.map(root => fastPath.relative(options.rootDir, root))
Expand Down

0 comments on commit 0a96100

Please sign in to comment.