File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ const DEFAULT_IGNORE = [
31
31
'**/.env*' ,
32
32
] ;
33
33
34
- export async function collectFiles (
35
- basePath : string = process . cwd ( ) ,
36
- patterns : string [ ] = DEFAULT_PATTERNS ,
37
- ignore : string [ ] = DEFAULT_IGNORE ,
38
- ) : Promise < FileData [ ] > {
34
+ export async function collectFiles ( {
35
+ basePath = process . cwd ( ) ,
36
+ patterns = DEFAULT_PATTERNS ,
37
+ ignore = DEFAULT_IGNORE ,
38
+ } : { basePath ?: string ; patterns ?: string [ ] ; ignore ?: string [ ] } = { } ) : Promise < FileData [ ] > {
39
39
const originalCwd = process . cwd ( ) ;
40
40
41
41
try {
@@ -74,8 +74,14 @@ export async function collectFiles(
74
74
}
75
75
}
76
76
77
- export function applyChanges ( changedFiles : FileData [ ] , basePath : string = process . cwd ( ) ) : void {
78
- for ( const file of changedFiles ) {
77
+ export function applyChanges ( {
78
+ files,
79
+ basePath = process . cwd ( ) ,
80
+ } : {
81
+ files : FileData [ ] ;
82
+ basePath ?: string ;
83
+ } ) : void {
84
+ for ( const file of files ) {
79
85
try {
80
86
const fullPath = path . resolve ( basePath , file . path ) ;
81
87
const dirPath = path . dirname ( fullPath ) ;
You can’t perform that action at this time.
0 commit comments