@@ -13,12 +13,12 @@ import 'package:analyzer/dart/ast/token.dart';
1313import 'package:analyzer/dart/ast/visitor.dart' ;
1414import 'package:collection/collection.dart' ;
1515import 'package:crypto/crypto.dart' ;
16- import 'package:dart_style/dart_style.dart' ;
1716import 'package:grinder/grinder.dart' ;
1817import 'package:path/path.dart' as p;
1918import 'package:pub_semver/pub_semver.dart' ;
2019import 'package:source_span/source_span.dart' ;
2120
21+ import 'package:sass/src/util/map.dart' ;
2222import 'package:sass/src/util/nullable.dart' ;
2323
2424/// The files to compile to synchronous versions.
@@ -47,8 +47,10 @@ final _sharedClasses = const ['EvaluateResult'];
4747/// to a synchronous equivalent.
4848@Task ('Compile async code to synchronous code.' )
4949void synchronize () {
50- sources.forEach ((source, target) =>
51- File (target).writeAsStringSync (synchronizeFile (source)));
50+ for (var (source, target) in sources.pairs) {
51+ File (target).writeAsStringSync (synchronizeFile (source));
52+ DartFmt .format (target);
53+ }
5254}
5355
5456/// Returns the result of synchronizing [source] .
@@ -59,9 +61,7 @@ String synchronizeFile(String source) {
5961 parseFile (path: source, featureSet: FeatureSet .latestLanguageVersion ())
6062 .unit
6163 .accept (visitor);
62- return DartFormatter (
63- languageVersion: Version .parse (Platform .version.split (' ' ).first))
64- .format (visitor.result);
64+ return visitor.result;
6565}
6666
6767/// The visitor that traverses the asynchronous parse tree and converts it to
0 commit comments