File tree Expand file tree Collapse file tree 1 file changed +23
-21
lines changed Expand file tree Collapse file tree 1 file changed +23
-21
lines changed Original file line number Diff line number Diff line change @@ -378,29 +378,31 @@ export async function processDtsFiles(
378378 absolute : true ,
379379 } ) ;
380380
381- for ( const file of dtsFiles ) {
382- try {
383- if ( banner || footer ) {
384- await addBannerAndFooter ( file , banner , footer ) ;
385- }
381+ await Promise . all (
382+ dtsFiles . map ( async ( file ) => {
383+ try {
384+ if ( banner || footer ) {
385+ await addBannerAndFooter ( file , banner , footer ) ;
386+ }
386387
387- if ( ( redirect . path || redirect . extension ) && matchPath ) {
388- await redirectDtsImports (
389- file ,
390- dtsExtension ,
391- redirect ,
392- matchPath ,
393- dir ,
394- rootDir ,
395- ) ;
396- }
388+ if ( ( redirect . path || redirect . extension ) && matchPath ) {
389+ await redirectDtsImports (
390+ file ,
391+ dtsExtension ,
392+ redirect ,
393+ matchPath ,
394+ dir ,
395+ rootDir ,
396+ ) ;
397+ }
397398
398- const newFile = file . replace ( '.d.ts' , dtsExtension ) ;
399- fs . renameSync ( file , newFile ) ;
400- } catch ( error ) {
401- logger . error ( `Failed to rename declaration file ${ file } : ${ error } ` ) ;
402- }
403- }
399+ const newFile = file . replace ( '.d.ts' , dtsExtension ) ;
400+ await fsP . rename ( file , newFile ) ;
401+ } catch ( error ) {
402+ logger . error ( `Failed to rename declaration file ${ file } : ${ error } ` ) ;
403+ }
404+ } ) ,
405+ ) ;
404406}
405407
406408export function processSourceEntry (
You can’t perform that action at this time.
0 commit comments