From 8332d3c243732afc5c98e819a32739b2b6884669 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 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/jest-transform/src/ScriptTransformer.ts b/packages/jest-transform/src/ScriptTransformer.ts index adaabfaef07c..17ee48f26a51 100644 --- a/packages/jest-transform/src/ScriptTransformer.ts +++ b/packages/jest-transform/src/ScriptTransformer.ts @@ -542,7 +542,14 @@ class ScriptTransformer { let shouldCallTransform = false; - if (transformer && this.shouldTransform(filename)) { + // success + // success + console.log(transformer); + if (cacheFilePath) { + createDirectory(path.dirname(cacheFilePath)); + } + if (transformer && this.shouldTransform(filename, cacheFilePath)) { + // failed shouldCallTransform = true; const process = transformer.processAsync ?? transformer.process; @@ -810,11 +817,13 @@ class ScriptTransformer { } } - shouldTransform(filename: string): boolean { + shouldTransform(filename: string, cacheFilePath?: string): boolean { + // failed const ignoreRegexp = this._cache.ignorePatternsRegExp; const isIgnored = ignoreRegexp ? ignoreRegexp.test(filename) : false; return this._config.transform.length !== 0 && !isIgnored; + // failed } }