From 59e51dfc3d7164746c6c19c5d760230997bd138e Mon Sep 17 00:00:00 2001 From: Jihoon Date: Fri, 5 Aug 2022 16:13:13 -0700 Subject: [PATCH] fix: increase the maximum possible file size that jest-haste-map can handle (#13094) --- CHANGELOG.md | 1 + packages/jest-haste-map/src/worker.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a6776b013d8..00fee1cd099b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - `[jest-worker]` When a process runs out of memory worker exits correctly and doesn't spin indefinitely ([#13054](https://github.com/facebook/jest/pull/13054)) - `[@jest/expect-utils]` Fix deep equality of ImmutableJS Record ([#13055](https://github.com/facebook/jest/pull/13055)) +- `[jest-haste-map]` Increase the maximum possible file size that jest-haste-map can handle ([#13094](https://github.com/facebook/jest/pull/13094)) ### Chore & Maintenance diff --git a/packages/jest-haste-map/src/worker.ts b/packages/jest-haste-map/src/worker.ts index 4422dbf7017a..13fd786809fc 100644 --- a/packages/jest-haste-map/src/worker.ts +++ b/packages/jest-haste-map/src/worker.ts @@ -100,7 +100,7 @@ export async function worker(data: WorkerMessage): Promise { // If a SHA-1 is requested on update, compute it. if (computeSha1) { - sha1 = sha1hex(getContent() || fs.readFileSync(filePath)); + sha1 = sha1hex(content || fs.readFileSync(filePath)); } return {dependencies, id, module, sha1};