From a10745ba203d32c014954a3976794cdfc9f46780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Mon, 24 Sep 2018 12:39:18 +0100 Subject: [PATCH] Use relative roots for the name of the cached haste map --- CHANGELOG.md | 2 +- packages/jest-haste-map/src/index.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4213d68c8110..01a25cf10b13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ - `[jest-each]` Add each array validation check ([#7033](https://github.com/facebook/jest/pull/7033)) - `[jest-haste-map]` [**BREAKING**] Replace internal data structures to improve performance ([#6960](https://github.com/facebook/jest/pull/6960)) -- `[jest-haste-map]` Used relative paths internally to allow remote caching ([#7020](https://github.com/facebook/jest/pull/7020)) +- `[jest-haste-map]` Use relative paths to allow remote caching ([#7020](https://github.com/facebook/jest/pull/7020)) - `[jest-haste-map]` Do not visit again files with the same sha-1 ([#6990](https://github.com/facebook/jest/pull/6990)) - `[jest-jasmine2]` Fix memory leak in Error objects hold by the framework ([#6965](https://github.com/facebook/jest/pull/6965)) - `[jest-haste-map]` Fixed Haste whitelist generation for scoped modules on Windows ([#6980](https://github.com/facebook/jest/pull/6980)) diff --git a/packages/jest-haste-map/src/index.js b/packages/jest-haste-map/src/index.js index fb62e26c8f7d..f045a2a47388 100644 --- a/packages/jest-haste-map/src/index.js +++ b/packages/jest-haste-map/src/index.js @@ -258,7 +258,9 @@ class HasteMap extends EventEmitter { this._options.cacheDirectory, `haste-map-${this._options.name}`, VERSION, - this._options.roots.join(':'), + this._options.roots + .map(root => path.relative(options.rootDir, root)) + .join(':'), this._options.extensions.join(':'), this._options.platforms.join(':'), this._options.computeSha1.toString(),