Skip to content

Commit

Permalink
DEV CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchhentgesspotify committed Oct 21, 2022
1 parent d71dbbe commit cd735fb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/jest-transform/src/ScriptTransformer.ts
Expand Up @@ -542,7 +542,13 @@ class ScriptTransformer {

let shouldCallTransform = false;

// success
// success
if (cacheFilePath) {
createDirectory(path.dirname(cacheFilePath));
}
if (transformer && this.shouldTransform(filename)) {
// failed
shouldCallTransform = true;
const process = transformer.processAsync ?? transformer.process;

Expand Down Expand Up @@ -810,11 +816,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
}
}

Expand Down

0 comments on commit cd735fb

Please sign in to comment.