This repository was archived by the owner on Feb 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -297,20 +297,28 @@ export class DependencyTree {
297
297
}
298
298
299
299
/**
300
- * Globs all supported files from the {rootDirs}
301
- *
302
- * @returns {string[] } An array of found files (absolute paths)
300
+ * @returns {string[] } An array of supported file extensions
303
301
*/
304
- getFiles ( ) : readonly Path [ ] {
302
+ getSupportedFileTypes ( ) : string [ ] {
305
303
const supportedFileTypes = new Set (
306
304
this . fileProcessors . reduce (
307
305
( acc , processor ) => [ ...acc , ...processor . supportedFileTypes ( ) ] ,
308
306
[ ] ,
309
307
) ,
310
308
) ;
309
+ return Array . from ( supportedFileTypes ) ;
310
+ }
311
+
312
+ /**
313
+ * Globs all supported files from the {rootDirs}
314
+ *
315
+ * @returns {string[] } An array of found files (absolute paths)
316
+ */
317
+ getFiles ( ) : readonly Path [ ] {
318
+ const supportedFileTypes = this . getSupportedFileTypes ( ) ;
311
319
return this . rootDirs . reduce < Path [ ] > ( ( acc : string [ ] , rootDir ) => {
312
320
return acc . concat (
313
- fg . sync ( `**/*.{${ Array . from ( supportedFileTypes ) . join ( ',' ) } }` , {
321
+ fg . sync ( `**/*.{${ supportedFileTypes . join ( ',' ) } }` , {
314
322
cwd : rootDir ,
315
323
ignore : this . ignoreGlobs ,
316
324
absolute : true ,
You can’t perform that action at this time.
0 commit comments