File tree Expand file tree Collapse file tree 2 files changed +552
-3
lines changed Expand file tree Collapse file tree 2 files changed +552
-3
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 11// ignore_for_file: avoid_print
22
3- import 'dart:convert' show jsonDecode, jsonEncode ;
3+ import 'dart:convert' show JsonEncoder, jsonDecode ;
44import 'dart:io' show File, exit;
55
66// ignore: depend_on_referenced_packages
@@ -116,7 +116,12 @@ Future<void> _replaceVersion({
116116 ..clear ()
117117 ..addAll (newMap);
118118 }
119- await sourceChangeLogFile.writeAsString (jsonEncode (sourceChangeLog));
119+
120+ // Create a JsonEncoder with 4 spaces of indentation
121+ final spaces = ' ' * 4 ;
122+ final encoder = JsonEncoder .withIndent (spaces);
123+
124+ await sourceChangeLogFile.writeAsString (encoder.convert (sourceChangeLog));
120125}
121126
122127/// Update the [pubspecYamlPath] file to update the `version` property from [newVersion]
You can’t perform that action at this time.
0 commit comments