Skip to content

Commit

Permalink
Add getCacheFilePath to HasteMap (#7217)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubennorte authored Oct 19, 2018
1 parent bea5037 commit 22f67d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ([#7217](https://github.com/facebook/jest/pull/7217))
- `[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))

Expand Down
4 changes: 4 additions & 0 deletions packages/jest-haste-map/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ class HasteMap extends EventEmitter {
);
}

getCacheFilePath(): string {
return this._cachePath;
}

build(): Promise<HasteMapObject> {
if (!this._buildPromise) {
this._buildPromise = this._buildFileMap()
Expand Down

0 comments on commit 22f67d4

Please sign in to comment.