File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/jest-transform/src Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments