File tree 1 file changed +9
-1
lines changed
packages/jest-transform/src
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -542,7 +542,13 @@ class ScriptTransformer {
542
542
543
543
let shouldCallTransform = false ;
544
544
545
+ // success
546
+ // success
547
+ if ( cacheFilePath ) {
548
+ createDirectory ( path . dirname ( cacheFilePath ) ) ;
549
+ }
545
550
if ( transformer && this . shouldTransform ( filename ) ) {
551
+ // failed
546
552
shouldCallTransform = true ;
547
553
const process = transformer . processAsync ?? transformer . process ;
548
554
@@ -810,11 +816,13 @@ class ScriptTransformer {
810
816
}
811
817
}
812
818
813
- shouldTransform ( filename : string ) : boolean {
819
+ shouldTransform ( filename : string , cacheFilePath ?: string ) : boolean {
820
+ // failed
814
821
const ignoreRegexp = this . _cache . ignorePatternsRegExp ;
815
822
const isIgnored = ignoreRegexp ? ignoreRegexp . test ( filename ) : false ;
816
823
817
824
return this . _config . transform . length !== 0 && ! isIgnored ;
825
+ // failed
818
826
}
819
827
}
820
828
You can’t perform that action at this time.
0 commit comments