Skip to content

Commit 686f8aa

Browse files
committed
Add getCacheFilePath to HasteMap
1 parent 814c929 commit 686f8aa

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- `[jest-runtime]` Pass the normalized configuration to script transformers ([#7148](https://github.com/facebook/jest/pull/7148))
1515
- `[jest-runtime]` If `require` fails without a file extension, print all files that match with one ([#7160](https://github.com/facebook/jest/pull/7160))
1616
- `[jest-haste-map]` Make `ignorePattern` optional ([#7166](https://github.com/facebook/jest/pull/7166))
17+
- `[jest-haste-map]` Add `getCacheFilePath` to get the path to the cache file for a `HasteMap` instance ([#7217](https://github.com/facebook/jest/pull/7217))
1718
- `[jest-runtime]` Remove `cacheDirectory` from `ignorePattern` for `HasteMap` if not necessary ([#7166](https://github.com/facebook/jest/pull/7166))
1819
- `[jest-validate]` Add syntax to validate multiple permitted types ([#7207](https://github.com/facebook/jest/pull/7207))
1920

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

+4
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ class HasteMap extends EventEmitter {
290290
);
291291
}
292292

293+
getCacheFilePath(): string {
294+
return this._cachePath;
295+
}
296+
293297
build(): Promise<HasteMapObject> {
294298
if (!this._buildPromise) {
295299
this._buildPromise = this._buildFileMap()

0 commit comments

Comments
 (0)