Skip to content

Commit b3ccf5b

Browse files
committed
cleanup
1 parent 8ada490 commit b3ccf5b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

bricks/dart_frog_prod_server/hooks/lib/src/disable_workspace_resolution.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import 'package:yaml_edit/yaml_edit.dart';
77
/// A void callback function (e.g. `void Function()`).
88
typedef VoidCallback = void Function();
99

10-
void _noop() {}
11-
1210
/// Opts out of dart workspaces until we can generate per package lockfiles.
1311
/// https://github.com/dart-lang/pub/issues/4594
1412
VoidCallback disableWorkspaceResolution(
@@ -21,7 +19,7 @@ VoidCallback disableWorkspaceResolution(
2119
} on Exception catch (e) {
2220
context.logger.err('$e');
2321
exit(1);
24-
return _noop;
22+
return () {}; // no-op
2523
}
2624
}
2725

@@ -43,7 +41,7 @@ void Function() overrideResolutionInPubspecOverrides(String projectDirectory) {
4341
return () => pubspecOverridesFile.writeAsStringSync(contents);
4442
}
4543

46-
if (pubspecOverrides['resolution'] == 'null') return _noop;
44+
if (pubspecOverrides['resolution'] == 'null') return () {}; // no-op
4745

4846
final editor = YamlEditor(contents)..update(['resolution'], null);
4947
pubspecOverridesFile.writeAsStringSync(editor.toString());

packages/dart_frog_cli/lib/src/commands/build/templates/dart_frog_prod_server_bundle.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)