diff --git a/CHANGELOG.md b/CHANGELOG.md index 169c2270b0f7..56f61ede0f5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - `[jest-haste-map]` [**BREAKING**] Remove `mapper` option ([#9581](https://github.com/facebook/jest/pull/9581)) - `[*]` Support array of paths for `moduleNameMapper` aliases ([#9465](https://github.com/facebook/jest/pull/9465)) - `[jest-reporters]` Adds ability to pass options to the istanbul-reporter through `coverageReporters` ([#9572](https://github.com/facebook/jest/pull/9572)) +- `[jest-transform]` `writeCacheFile` no longer calls `fsync` ([#9695](https://github.com/facebook/jest/pull/9695)) ### Fixes diff --git a/packages/jest-transform/src/ScriptTransformer.ts b/packages/jest-transform/src/ScriptTransformer.ts index ccd18834aa42..a3658842f164 100644 --- a/packages/jest-transform/src/ScriptTransformer.ts +++ b/packages/jest-transform/src/ScriptTransformer.ts @@ -630,7 +630,7 @@ function readCodeCacheFile(cachePath: Config.Path): string | null { */ const writeCacheFile = (cachePath: Config.Path, fileData: string) => { try { - writeFileAtomic(cachePath, fileData, {encoding: 'utf8'}); + writeFileAtomic(cachePath, fileData, {encoding: 'utf8', fsync: false}); } catch (e) { if (cacheWriteErrorSafeToIgnore(e, cachePath)) { return;