@@ -373,13 +373,19 @@ function main() {
373373 log ( 'Default version remains unchanged' ) ;
374374 }
375375
376- // Update test files
376+ // Update test files only if new version is newer than current default
377377 log ( '' ) ;
378- log ( `${ emoji . edit } Updating test files...` , 'blue' ) ;
379- for ( const testFile of TEST_FILES ) {
380- updateVersionInTestFile ( newVersion , testFile ) ;
381- log ( `${ emoji . check } Updated ${ testFile } ` , 'green' ) ;
382- filesModified . push ( testFile ) ;
378+ let testFilesUpdated = 0 ;
379+ if ( comparisonResult > 0 ) {
380+ log ( `${ emoji . edit } Updating test files...` , 'blue' ) ;
381+ for ( const testFile of TEST_FILES ) {
382+ updateVersionInTestFile ( newVersion , testFile ) ;
383+ log ( `${ emoji . check } Updated ${ testFile } ` , 'green' ) ;
384+ filesModified . push ( testFile ) ;
385+ testFilesUpdated ++ ;
386+ }
387+ } else {
388+ log ( `${ emoji . info } Skipping test file updates (new version ${ newVersion } is not newer than current default ${ currentDefault } )` , 'cyan' ) ;
383389 }
384390
385391 // Success message
@@ -390,6 +396,7 @@ function main() {
390396 filesModified . forEach ( file => {
391397 log ( ` • ${ file } ` ) ;
392398 } ) ;
399+
393400 log ( '' ) ;
394401 log ( `${ emoji . bulb } Next steps:` , 'magenta' ) ;
395402 log ( ` 1. Review the changes: git diff` ) ;
0 commit comments