Skip to content

Commit 9f1732b

Browse files
authored
chore(deps): upgrade very good analysis (#372)
1 parent 28d72db commit 9f1732b

File tree

31 files changed

+70
-63
lines changed

31 files changed

+70
-63
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include: package:very_good_analysis/analysis_options.3.0.1.yaml
1+
include: package:very_good_analysis/analysis_options.3.1.0.yaml
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: create_dart_frog_hooks
22

33
environment:
4-
sdk: ">=2.12.0 <3.0.0"
4+
sdk: ">=2.18.0 <3.0.0"
55

66
dependencies:
77
mason: ^0.1.0-dev.31
@@ -10,4 +10,4 @@ dependencies:
1010
dev_dependencies:
1111
mocktail: ^0.3.0
1212
test: ^1.19.2
13-
very_good_analysis: ^3.0.1
13+
very_good_analysis: ^3.1.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include: package:very_good_analysis/analysis_options.3.0.1.yaml
1+
include: package:very_good_analysis/analysis_options.3.1.0.yaml

bricks/dart_frog_dev_server/hooks/pre_gen.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ typedef RouteConfigurationBuilder = RouteConfiguration Function(
1010
io.Directory directory,
1111
);
1212

13+
void _defaultExit(int code) => ExitOverrides.current?.exit ?? io.exit;
14+
1315
Future<void> run(HookContext context) async => preGen(context);
1416

1517
Future<void> preGen(
1618
HookContext context, {
1719
RouteConfigurationBuilder buildConfiguration = buildRouteConfiguration,
18-
void Function(int exitCode)? exit,
20+
void Function(int exitCode) exit = _defaultExit,
1921
}) async {
2022
final RouteConfiguration configuration;
2123
try {
2224
configuration = buildConfiguration(io.Directory.current);
2325
} catch (error) {
2426
context.logger.err('$error');
25-
final _exit = exit ?? ExitOverrides.current?.exit ?? io.exit;
26-
return _exit(1);
27+
return exit(1);
2728
}
2829

2930
reportRouteConflicts(context, configuration);

bricks/dart_frog_dev_server/hooks/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: dart_frog_dev_server_hooks
22
publish_to: none
33

44
environment:
5-
sdk: ">=2.12.0 <3.0.0"
5+
sdk: ">=2.18.0 <3.0.0"
66

77
dependencies:
88
dart_frog_gen: ^0.1.0
@@ -13,4 +13,4 @@ dev_dependencies:
1313
mocktail: ^0.3.0
1414
path: ^1.8.2
1515
test: ^1.19.2
16-
very_good_analysis: ^3.0.1
16+
very_good_analysis: ^3.1.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include: package:very_good_analysis/analysis_options.3.0.1.yaml
1+
include: package:very_good_analysis/analysis_options.3.1.0.yaml

bricks/dart_frog_prod_server/hooks/post_gen.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,24 @@ typedef ProcessRunner = Future<io.ProcessResult> Function(
1111
bool runInShell,
1212
});
1313

14+
void _defaultExit(int code) => ExitOverrides.current?.exit ?? io.exit;
15+
1416
Future<void> run(HookContext context) => postGen(context);
1517

1618
Future<void> postGen(
1719
HookContext context, {
1820
io.Directory? directory,
1921
ProcessRunner runProcess = io.Process.run,
20-
void Function(int exitCode)? exit,
22+
void Function(int exitCode) exit = _defaultExit,
2123
}) async {
22-
final _exit = exit ?? ExitOverrides.current?.exit ?? io.exit;
23-
final _directory = directory ?? io.Directory.current;
24-
final buildDirectoryPath = path.join(_directory.path, 'build');
24+
final projectDirectory = directory ?? io.Directory.current;
25+
final buildDirectoryPath = path.join(projectDirectory.path, 'build');
2526

2627
await dartPubGet(
2728
context,
2829
workingDirectory: buildDirectoryPath,
2930
runProcess: runProcess,
30-
exit: _exit,
31+
exit: exit,
3132
);
3233

3334
final relativeBuildPath = path.relative(buildDirectoryPath);

bricks/dart_frog_prod_server/hooks/pre_gen.dart

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,31 @@ typedef RouteConfigurationBuilder = RouteConfiguration Function(
1111
io.Directory directory,
1212
);
1313

14+
void _defaultExit(int code) => ExitOverrides.current?.exit ?? io.exit;
15+
1416
Future<void> run(HookContext context) => preGen(context);
1517

1618
Future<void> preGen(
1719
HookContext context, {
1820
io.Directory? directory,
1921
RouteConfigurationBuilder buildConfiguration = buildRouteConfiguration,
20-
void Function(int exitCode)? exit,
22+
void Function(int exitCode) exit = _defaultExit,
2123
}) async {
22-
final _exit = exit ?? ExitOverrides.current?.exit ?? io.exit;
2324
final projectDirectory = directory ?? io.Directory.current;
2425

25-
await createBundle(context, projectDirectory, _exit);
26+
await createBundle(context, projectDirectory, exit);
2627

2728
final RouteConfiguration configuration;
2829
try {
2930
configuration = buildConfiguration(projectDirectory);
3031
} catch (error) {
3132
context.logger.err('$error');
32-
return _exit(1);
33+
return exit(1);
3334
}
3435

35-
reportRouteConflicts(context, configuration, _exit);
36-
reportRogueRoutes(context, configuration, _exit);
37-
await reportExternalPathDependencies(context, projectDirectory, _exit);
36+
reportRouteConflicts(context, configuration, exit);
37+
reportRogueRoutes(context, configuration, exit);
38+
await reportExternalPathDependencies(context, projectDirectory, exit);
3839

3940
context.vars = {
4041
'directories': configuration.directories

bricks/dart_frog_prod_server/hooks/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: dart_frog_prod_server_hooks
22
publish_to: none
33

44
environment:
5-
sdk: ">=2.12.0 <3.0.0"
5+
sdk: ">=2.18.0 <3.0.0"
66

77
dependencies:
88
dart_frog_gen: ^0.1.0
@@ -14,4 +14,4 @@ dependencies:
1414
dev_dependencies:
1515
mocktail: ^0.3.0
1616
test: ^1.19.2
17-
very_good_analysis: ^3.0.1
17+
very_good_analysis: ^3.1.0

docs/docs/tutorials/todos.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ dev_dependencies:
178178
json_serializable: ^6.3.1
179179
mocktail: ^0.3.0
180180
test: ^1.19.2
181-
very_good_analysis: ^3.0.1
181+
very_good_analysis: ^3.1.0
182182
```
183183
184184
Install the newly added dependencies via:
@@ -377,7 +377,7 @@ dependencies:
377377
dev_dependencies:
378378
mocktail: ^0.3.0
379379
test: ^1.19.2
380-
very_good_analysis: ^3.0.1
380+
very_good_analysis: ^3.1.0
381381
```
382382
383383
:::note
@@ -456,7 +456,7 @@ dependencies:
456456
dev_dependencies:
457457
mocktail: ^0.3.0
458458
test: ^1.19.2
459-
very_good_analysis: ^3.0.1
459+
very_good_analysis: ^3.1.0
460460
```
461461

462462
Install the newly added dependencies via:

0 commit comments

Comments
 (0)