@@ -30,8 +30,7 @@ class AnnotationApplier {
3030 processed : 0 ,
3131 modified : 0 ,
3232 errors : 0 ,
33- skipped : 0 ,
34- modifiedFiles : [ ]
33+ skipped : 0
3534 } ;
3635 }
3736
@@ -187,10 +186,9 @@ class AnnotationApplier {
187186 }
188187
189188 isActionFile ( fileName , fullPath ) {
190- const normalizedPath = fullPath . replace ( / \\ / g, '/' ) ;
191189 return ( fileName . endsWith ( '.mjs' ) || fileName . endsWith ( '.ts' ) ) &&
192- normalizedPath . includes ( '/actions/' ) &&
193- ! normalizedPath . includes ( '/common/' ) ;
190+ fullPath . includes ( '/actions/' ) &&
191+ ! fullPath . includes ( '/common/' ) ;
194192 }
195193
196194 extractActionKey ( fileContent ) {
@@ -223,15 +221,8 @@ class AnnotationApplier {
223221 }
224222
225223 applyAnnotations ( fileContent , annotations ) {
226- // Find and replace version - handle both orders: type before version OR version before type
227- // Try lookahead first (version comes before type: "action")
228- let versionMatch = fileContent . match ( / ( .* v e r s i o n : \s * [ " ' ] ) ( [ ^ " ' ] + ) ( [ " ' ] , ? \s * \n ) (? = [ \s \S ] * ?t y p e : \s * [ " ' ] a c t i o n [ " ' ] ) / s) ;
229-
230- // If not found, try lookbehind (type: "action" comes before version)
231- if ( ! versionMatch ) {
232- versionMatch = fileContent . match ( / (?< = t y p e : \s * [ " ' ] a c t i o n [ " ' ] [ \s \S ] { 0 , 1000 } ?) ( .* v e r s i o n : \s * [ " ' ] ) ( [ ^ " ' ] + ) ( [ " ' ] , ? \s * \n ) / s) ;
233- }
234-
224+ // Find and replace version
225+ const versionMatch = fileContent . match ( / ( .* v e r s i o n : \s * [ " ' ] ) ( [ ^ " ' ] + ) ( [ " ' ] , ? \s * \n ) / s) ;
235226 if ( ! versionMatch ) {
236227 throw new Error ( 'Could not find version field in file' ) ;
237228 }
@@ -279,7 +270,7 @@ class AnnotationApplier {
279270 const modifiedContent = this . applyAnnotations ( fileContent , annotations ) ;
280271 fs . writeFileSync ( filePath , modifiedContent , 'utf8' ) ;
281272
282- this . recordModification ( fileContent , actionKey , filePath ) ;
273+ this . recordModification ( fileContent , actionKey ) ;
283274 return true ;
284275
285276 } catch ( error ) {
@@ -299,9 +290,8 @@ class AnnotationApplier {
299290 this . log ( `Error processing ${ filePath } : ${ error . message } ` , 'error' ) ;
300291 }
301292
302- recordModification ( fileContent , actionKey , filePath ) {
293+ recordModification ( fileContent , actionKey ) {
303294 this . stats . modified ++ ;
304- this . stats . modifiedFiles . push ( filePath ) ;
305295
306296 const currentVersionMatch = fileContent . match ( / v e r s i o n : \s * [ " ' ] ( [ ^ " ' ] + ) [ " ' ] / ) ;
307297 const currentVersion = currentVersionMatch ? currentVersionMatch [ 1 ] : 'unknown' ;
@@ -351,12 +341,6 @@ class AnnotationApplier {
351341 this . log ( '\n=== ERRORS ===' ) ;
352342 this . errors . forEach ( error => this . log ( error , 'error' ) ) ;
353343 }
354-
355- // Output modified files as JSON
356- if ( this . stats . modifiedFiles . length > 0 ) {
357- this . log ( '\n=== MODIFIED FILES (JSON) ===' ) ;
358- console . log ( JSON . stringify ( this . stats . modifiedFiles , null , 2 ) ) ;
359- }
360344 }
361345
362346 async run ( ) {
0 commit comments