Skip to content

Commit cd735fb

Browse files
DEV CI
1 parent d71dbbe commit cd735fb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/jest-transform/src/ScriptTransformer.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,13 @@ class ScriptTransformer {
542542

543543
let shouldCallTransform = false;
544544

545+
// success
546+
// success
547+
if (cacheFilePath) {
548+
createDirectory(path.dirname(cacheFilePath));
549+
}
545550
if (transformer && this.shouldTransform(filename)) {
551+
// failed
546552
shouldCallTransform = true;
547553
const process = transformer.processAsync ?? transformer.process;
548554

@@ -810,11 +816,13 @@ class ScriptTransformer {
810816
}
811817
}
812818

813-
shouldTransform(filename: string): boolean {
819+
shouldTransform(filename: string, cacheFilePath?: string): boolean {
820+
// failed
814821
const ignoreRegexp = this._cache.ignorePatternsRegExp;
815822
const isIgnored = ignoreRegexp ? ignoreRegexp.test(filename) : false;
816823

817824
return this._config.transform.length !== 0 && !isIgnored;
825+
// failed
818826
}
819827
}
820828

0 commit comments

Comments
 (0)