]> source.dussan.org Git - jquery.git/commitdiff
Build: make compare size cache readable for manual edits
authorTimmy Willison <timmywil@users.noreply.github.com>
Sun, 10 Mar 2024 16:27:22 +0000 (12:27 -0400)
committerTimmy Willison <timmywil@users.noreply.github.com>
Mon, 11 Mar 2024 17:29:23 +0000 (13:29 -0400)
Ref gh-5440

build/tasks/compare_size.mjs

index 554b1087a9fdc40a2cbacb11f871291f4d767264..a94cf42f01210f5d46d22547057346c9e8b5b46a 100644 (file)
@@ -60,7 +60,9 @@ function cacheResults( results ) {
 }
 
 function saveCache( loc, cache ) {
-       return fs.writeFile( loc, JSON.stringify( cache ) );
+
+       // Keep cache readable for manual edits
+       return fs.writeFile( loc, JSON.stringify( cache, null, "  " ) + "\n" );
 }
 
 function compareSizes( existing, current, padLength ) {