From e9cc37061d281fccc3910f9f6cd5820f7a9545ed Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Fri, 14 Oct 2022 18:34:48 +0100 Subject: [PATCH] DEV CI --- packages/jest-transform/src/ScriptTransformer.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/jest-transform/src/ScriptTransformer.ts b/packages/jest-transform/src/ScriptTransformer.ts index 63e3ca1e2d7a..463aab72dc28 100644 --- a/packages/jest-transform/src/ScriptTransformer.ts +++ b/packages/jest-transform/src/ScriptTransformer.ts @@ -462,6 +462,7 @@ class ScriptTransformer { const {transformer, transformerConfig = {}} = this._getTransformer(filename) ?? {}; const cacheFilePath = this._getFileCachePath(filename, content, options); + createDirectory(path.dirname(cacheFilePath)); const sourceMapPath = `${cacheFilePath}.map`; // Ignore cache if `config.cache` is set (--no-cache) const code = this._config.cache ? readCodeCacheFile(cacheFilePath) : null; @@ -522,6 +523,7 @@ class ScriptTransformer { content, options, ); + createDirectory(path.dirname(cacheFilePath)); const sourceMapPath = `${cacheFilePath}.map`; // Ignore cache if `config.cache` is set (--no-cache) const code = this._config.cache ? readCodeCacheFile(cacheFilePath) : null;