From f8889193e806244e780a86121daa7a797bd3339d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Fri, 19 Oct 2018 11:13:02 +0100 Subject: [PATCH] Add getCacheFilePath to HasteMap --- CHANGELOG.md | 1 + packages/jest-haste-map/src/index.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a03e365c23c..d831ceac99bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - `[jest-runtime]` Pass the normalized configuration to script transformers ([#7148](https://github.com/facebook/jest/pull/7148)) - `[jest-runtime]` If `require` fails without a file extension, print all files that match with one ([#7160](https://github.com/facebook/jest/pull/7160)) - `[jest-haste-map]` Make `ignorePattern` optional ([#7166](https://github.com/facebook/jest/pull/7166)) +- `[jest-haste-map]` Add `getCacheFilePath` to get the path to the cache file for a `HasteMap` instance ([#](https://github.com/facebook/jest/pull/)) - `[jest-runtime]` Remove `cacheDirectory` from `ignorePattern` for `HasteMap` if not necessary ([#7166](https://github.com/facebook/jest/pull/7166)) - `[jest-validate]` Add syntax to validate multiple permitted types ([#7207](https://github.com/facebook/jest/pull/7207)) diff --git a/packages/jest-haste-map/src/index.js b/packages/jest-haste-map/src/index.js index 5ea1cac2386a..4fdae9167279 100644 --- a/packages/jest-haste-map/src/index.js +++ b/packages/jest-haste-map/src/index.js @@ -290,6 +290,10 @@ class HasteMap extends EventEmitter { ); } + getCacheFilePath(): string { + return this._cachePath; + } + build(): Promise { if (!this._buildPromise) { this._buildPromise = this._buildFileMap()