Skip to content

Commit 99bd508

Browse files
committed
Use relative roots for the name of the cached haste map
1 parent 2c6c935 commit 99bd508

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
### Fixes
88

99
- `[jest-haste-map]` [**BREAKING**] Replace internal data structures to improve performance ([#6960](https://github.com/facebook/jest/pull/6960))
10-
- `[jest-haste-map]` Used relative paths internally to allow remote caching ([#7020](https://github.com/facebook/jest/pull/7020))
10+
- `[jest-haste-map]` Use relative paths to allow remote caching ([#7020](https://github.com/facebook/jest/pull/7020))
1111
- `[jest-haste-map]` Do not visit again files with the same sha-1 ([#6990](https://github.com/facebook/jest/pull/6990))
1212
- `[jest-jasmine2]` Fix memory leak in Error objects hold by the framework ([#6965](https://github.com/facebook/jest/pull/6965))
1313
- `[jest-haste-map]` Fixed Haste whitelist generation for scoped modules on Windows ([#6980](https://github.com/facebook/jest/pull/6980))

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,9 @@ class HasteMap extends EventEmitter {
258258
this._options.cacheDirectory,
259259
`haste-map-${this._options.name}`,
260260
VERSION,
261-
this._options.roots.join(':'),
261+
this._options.roots
262+
.map(root => path.relative(options.rootDir, root))
263+
.join(':'),
262264
this._options.extensions.join(':'),
263265
this._options.platforms.join(':'),
264266
this._options.computeSha1.toString(),

0 commit comments

Comments
 (0)