File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -141,13 +141,14 @@ export class StandardWriter extends ComponentWriter {
141141 if ( chunk . writeInfos . length !== 0 ) {
142142 try {
143143 const toResolve = new Set < string > ( ) ;
144+
144145 // it is a reasonable expectation that when a conversion call exits, the files of
145146 // every component has been written to the destination. This await ensures the microtask
146147 // queue is empty when that call exits and overall less memory is consumed.
147148 await Promise . all (
148149 chunk . writeInfos
149150 . map ( makeWriteInfoAbsolute ( this . rootDestination ) )
150- . filter ( existsOrDoesntMatchIgnored ( this . forceignore ) )
151+ . filter ( existsOrDoesntMatchIgnored ( this . forceignore , this . logger ) ) // Skip files matched by default ignore
151152 . map ( ( info ) => {
152153 if ( info . shouldDelete ) {
153154 this . deleted . push ( {
@@ -304,6 +305,13 @@ const makeWriteInfoAbsolute =
304305 } ) ;
305306
306307const existsOrDoesntMatchIgnored =
307- ( forceignore : ForceIgnore ) =>
308- ( writeInfo : WriteInfo ) : boolean =>
309- existsSync ( writeInfo . output ) || forceignore . accepts ( writeInfo . output ) ;
308+ ( forceignore : ForceIgnore , logger : Logger ) =>
309+ ( writeInfo : WriteInfo ) : boolean => {
310+ const result = existsSync ( writeInfo . output ) || forceignore . accepts ( writeInfo . output ) ;
311+
312+ // Detect if file was ignored by .forceignore patterns
313+ if ( ! result ) {
314+ logger . debug ( `File ${ writeInfo . output } was ignored or not exists` ) ;
315+ }
316+ return result ;
317+ } ;
You can’t perform that action at this time.
0 commit comments