Skip to content

Commit a10745b

Browse files
committed
Use relative roots for the name of the cached haste map
1 parent a455f1c commit a10745b

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
@@ -11,7 +11,7 @@
1111

1212
- `[jest-each]` Add each array validation check ([#7033](https://github.com/facebook/jest/pull/7033))
1313
- `[jest-haste-map]` [**BREAKING**] Replace internal data structures to improve performance ([#6960](https://github.com/facebook/jest/pull/6960))
14-
- `[jest-haste-map]` Used relative paths internally to allow remote caching ([#7020](https://github.com/facebook/jest/pull/7020))
14+
- `[jest-haste-map]` Use relative paths to allow remote caching ([#7020](https://github.com/facebook/jest/pull/7020))
1515
- `[jest-haste-map]` Do not visit again files with the same sha-1 ([#6990](https://github.com/facebook/jest/pull/6990))
1616
- `[jest-jasmine2]` Fix memory leak in Error objects hold by the framework ([#6965](https://github.com/facebook/jest/pull/6965))
1717
- `[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)