Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2d84704

Browse files
committedOct 1, 2018
Use rootDir in the haste map cache name
1 parent 9a22225 commit 2d84704

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎packages/jest-haste-map/src/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,13 @@ class HasteMap extends EventEmitter {
255255
'deprecated. Provide a RegExp instead. See https://github.com/facebook/jest/pull/4063.',
256256
);
257257
}
258+
const rootDirHash = crypto
259+
.createHash('md5')
260+
.update(options.rootDir)
261+
.digest('hex');
258262
this._cachePath = HasteMap.getCacheFilePath(
259263
this._options.cacheDirectory,
260-
`haste-map-${this._options.name}`,
264+
`haste-map-${this._options.name}-${rootDirHash}`,
261265
VERSION,
262266
this._options.roots
263267
.map(root => fastPath.relative(options.rootDir, root))

0 commit comments

Comments
 (0)
Please sign in to comment.