@@ -66,13 +66,11 @@ Future<BuildResult> compileOverReactProgram({
6666 final webPath = p.join (packagePath, 'web' );
6767 webFilesByName.forEach ((name, contentsTemplate) {
6868 final filePath = p.join (packagePath, 'web' , name);
69- final partFilename =
70- p.basenameWithoutExtension (name) + '.over_react.g.dart' ;
69+ final partFilename = p.basenameWithoutExtension (name) + '.over_react.g.dart' ;
7170 final contents = contentsTemplate.replaceAll ('{{PART_PATH}}' , partFilename);
7271
7372 if (! p.isWithin (webPath, filePath)) {
74- throw ArgumentError .value (
75- name, 'Filename must be a relative path without any `..`.' );
73+ throw ArgumentError .value (name, 'Filename must be a relative path without any `..`.' );
7674 }
7775 File (filePath)
7876 ..parent.createSync (recursive: true )
@@ -89,8 +87,7 @@ Future<BuildResult> compileOverReactProgram({
8987 runInShell: true ,
9088 );
9189 if (pubGetResult.exitCode != 0 ) {
92- throw Exception (
93- 'Unexpected `pub get` failure in temporary package: $packagePath \n '
90+ throw Exception ('Unexpected `pub get` failure in temporary package: $packagePath \n '
9491 '${pubGetResult .infoForErrorMessage }' );
9592 }
9693
@@ -117,8 +114,7 @@ Future<BuildResult> compileOverReactProgram({
117114 ..parent.createSync (recursive: true )
118115 ..writeAsStringSync (buildResult.stdout.toString ());
119116 if (buildResult.exitCode != 0 ) {
120- throw Exception (
121- 'Unexpected build failure in temporary package: $packagePath \n '
117+ throw Exception ('Unexpected build failure in temporary package: $packagePath \n '
122118 '${buildResult .infoForErrorMessage }' );
123119 }
124120
@@ -155,14 +151,10 @@ extension BuildResultUtils on BuildResult {
155151 throw Exception ('Compiled file ${compiledFile .path } does not exist' );
156152 }
157153 } else {
158- final candidates = webFolder
159- .listSync ()
160- .whereType <File >()
161- .where ((f) => f.path.endsWith ('.dart.js' ))
162- .toList ();
154+ final candidates =
155+ webFolder.listSync ().whereType <File >().where ((f) => f.path.endsWith ('.dart.js' )).toList ();
163156 if (candidates.length != 1 ) {
164- throw Exception (
165- 'Expected a single dart2js output, but found ${candidates .length }:'
157+ throw Exception ('Expected a single dart2js output, but found ${candidates .length }:'
166158 '${candidates .map ((c ) => '\n - ${c .path }' )}' );
167159 }
168160 compiledFile = candidates.single;
0 commit comments