diff --git a/sidekick/test/plugins_test.dart b/sidekick/test/plugins_test.dart index 5717c509..63a591d5 100644 --- a/sidekick/test/plugins_test.dart +++ b/sidekick/test/plugins_test.dart @@ -1,5 +1,4 @@ import 'package:dcli/dcli.dart'; -import 'package:dcli_core/dcli_core.dart'; import 'package:recase/recase.dart'; import 'package:sidekick_core/sidekick_core.dart'; import 'package:sidekick_core/src/commands/plugins/create_plugin_command.dart'; @@ -55,7 +54,7 @@ void main() { 'git init'.start(workingDirectory: pluginDir.path); 'git add .'.start(workingDirectory: pluginDir.path); - withEnvironment( + await withEnvironment( () async => 'git commit -m "initial"'.start(workingDirectory: pluginDir.path), // without this, `git commit` crashes on CI diff --git a/sidekick/test/recompile_test.dart b/sidekick/test/recompile_test.dart index d185cdc7..7d7e950b 100644 --- a/sidekick/test/recompile_test.dart +++ b/sidekick/test/recompile_test.dart @@ -33,7 +33,7 @@ void main() { printOnFailure(stdout); final stderr = await updateProcess.stderrStream().join('\n'); printOnFailure(stderr); - updateProcess.shouldExit(0); + await updateProcess.shouldExit(0); expect(stderr, contains('Installing dashi command line application')); expect(stderr, contains('Getting dependencies')); expect(stderr, contains('Bundling assets')); diff --git a/sidekick_core/analysis_options.yaml b/sidekick_core/analysis_options.yaml index bee6163d..ef85cbd8 100644 --- a/sidekick_core/analysis_options.yaml +++ b/sidekick_core/analysis_options.yaml @@ -3,4 +3,5 @@ include: package:lint/analysis_options_package.yaml linter: rules: avoid_print: false + unawaited_futures: true # public_member_api_docs: true \ No newline at end of file diff --git a/sidekick_core/pubspec.yaml b/sidekick_core/pubspec.yaml index 1195ae8a..98ff0a90 100644 --- a/sidekick_core/pubspec.yaml +++ b/sidekick_core/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: cli_completion: ^0.3.0 dart_console2: '>=3.0.0 <3.1.0' dartx: ^1.1.0 - dcli: ^4.0.0 + dcli: ^4.0.4 glob: ^2.0.2 http: '>=0.13.5 <2.0.0' meta: ^1.5.0 diff --git a/sidekick_core/test/format_command_test.dart b/sidekick_core/test/format_command_test.dart index 1e0a9c57..e4239fd7 100644 --- a/sidekick_core/test/format_command_test.dart +++ b/sidekick_core/test/format_command_test.dart @@ -376,15 +376,15 @@ name: dashi ..writeAsStringSync(_dartFile140); final fakeStdout = FakeStdoutStream(); final fakeStderr = FakeStdoutStream(); - overrideIoStreams( + await overrideIoStreams( stderr: () => fakeStderr, stdout: () => fakeStdout, - body: () { + body: () async { final runner = initializeSidekick( dartSdkPath: systemDartSdkPath(), ); runner.addCommand(FormatCommand()); - expectLater( + await expectLater( () => runner.run(['format', '--verify']), throwsA(isA()), ); diff --git a/sidekick_core/test/update/patches/157_fix_usage_message.patch_test.dart b/sidekick_core/test/update/patches/157_fix_usage_message.patch_test.dart index 18d3a82c..d6d7d03b 100644 --- a/sidekick_core/test/update/patches/157_fix_usage_message.patch_test.dart +++ b/sidekick_core/test/update/patches/157_fix_usage_message.patch_test.dart @@ -13,7 +13,7 @@ void main() { tempDir.deleteSync(recursive: true); env['SIDEKICK_PACKAGE_HOME'] = null; }); - tempDir.file('test').writeAsString('# entrypoint file'); + tempDir.file('test').writeAsStringSync('# entrypoint file'); sidekickDir.file('pubspec.yaml').writeAsStringSync('name: test_sidekick'); final cliMainFile = sidekickDir.file('lib/test_sidekick.dart') ..createSync(recursive: true) diff --git a/sidekick_core/test/update/patches/192_add_format_command.patch_test.dart b/sidekick_core/test/update/patches/192_add_format_command.patch_test.dart index 1b462ef9..62bf31ba 100644 --- a/sidekick_core/test/update/patches/192_add_format_command.patch_test.dart +++ b/sidekick_core/test/update/patches/192_add_format_command.patch_test.dart @@ -13,7 +13,7 @@ void main() { tempDir.deleteSync(recursive: true); env['SIDEKICK_PACKAGE_HOME'] = null; }); - tempDir.file('dash').writeAsString('# entrypoint file'); + tempDir.file('dash').writeAsStringSync('# entrypoint file'); sidekickDir.file('pubspec.yaml').writeAsStringSync('name: dash_sidekick'); final cliMainFile = sidekickDir.file('lib/dash_sidekick.dart') ..createSync(recursive: true) diff --git a/sidekick_core/test/update/patches/208_remove_cli_name.patch_test.dart b/sidekick_core/test/update/patches/208_remove_cli_name.patch_test.dart index e47ef2a2..baabc7f7 100644 --- a/sidekick_core/test/update/patches/208_remove_cli_name.patch_test.dart +++ b/sidekick_core/test/update/patches/208_remove_cli_name.patch_test.dart @@ -13,7 +13,7 @@ void main() { tempDir.deleteSync(recursive: true); env['SIDEKICK_PACKAGE_HOME'] = null; }); - tempDir.file('dash').writeAsString('# entrypoint file'); + tempDir.file('dash').writeAsStringSync('# entrypoint file'); sidekickDir.file('pubspec.yaml').writeAsStringSync('name: dash_sidekick'); final cliMainFile = sidekickDir.file('lib/dash_sidekick.dart') ..createSync(recursive: true) diff --git a/sidekick_core/test/update/patches/253_add_lock_file.patch_test.dart b/sidekick_core/test/update/patches/253_add_lock_file.patch_test.dart index 01847791..1ac4de39 100644 --- a/sidekick_core/test/update/patches/253_add_lock_file.patch_test.dart +++ b/sidekick_core/test/update/patches/253_add_lock_file.patch_test.dart @@ -13,7 +13,7 @@ void main() { tempDir.deleteSync(recursive: true); env['SIDEKICK_PACKAGE_HOME'] = null; }); - tempDir.file('dash').writeAsString('# entrypoint file'); + tempDir.file('dash').writeAsStringSync('# entrypoint file'); sidekickDir.file('pubspec.yaml').writeAsStringSync('name: dash_sidekick'); final gitignore = sidekickDir.file('.gitignore'); gitignore.writeAsStringSync(testCase.fileContentBefore); diff --git a/sidekick_core/test/update/update_2_0_0_test.dart b/sidekick_core/test/update/update_2_0_0_test.dart index bf4323de..daa7df1f 100644 --- a/sidekick_core/test/update/update_2_0_0_test.dart +++ b/sidekick_core/test/update/update_2_0_0_test.dart @@ -15,7 +15,7 @@ void main() { tempDir.deleteSync(recursive: true); env['SIDEKICK_PACKAGE_HOME'] = null; }); - tempDir.file('test').writeAsString('# entrypoint file'); + tempDir.file('test').writeAsStringSync('# entrypoint file'); final pubspecFile = sidekickDir.file('pubspec.yaml'); final oldHttpVersion = Version(0, 13, 6); pubspecFile.writeAsStringSync(''' diff --git a/sidekick_plugin_installer/analysis_options.yaml b/sidekick_plugin_installer/analysis_options.yaml index 1011f768..c54aac43 100644 --- a/sidekick_plugin_installer/analysis_options.yaml +++ b/sidekick_plugin_installer/analysis_options.yaml @@ -2,4 +2,5 @@ include: package:lint/analysis_options_package.yaml linter: rules: - avoid_print: false \ No newline at end of file + avoid_print: false + unawaited_futures: true diff --git a/sidekick_plugin_installer/test/register_plugin_test.dart b/sidekick_plugin_installer/test/register_plugin_test.dart index 24692e1d..e8209b6c 100644 --- a/sidekick_plugin_installer/test/register_plugin_test.dart +++ b/sidekick_plugin_installer/test/register_plugin_test.dart @@ -10,7 +10,7 @@ void main() { dir.file('packages/dash/lib/dash.dart').writeAsStringSync( initialCliFileContentWithoutImportAndCommand, ); - registerPlugin( + await registerPlugin( sidekickCli: DartPackage.fromDirectory(dir.directory('packages/dash'))!, command: 'MyCommand()', @@ -29,7 +29,7 @@ void main() { dir.file('packages/dash/lib/dash.dart').writeAsStringSync( initialCliFileContentWithMyCommand, ); - registerPlugin( + await registerPlugin( sidekickCli: DartPackage.fromDirectory(dir.directory('packages/dash'))!, command: 'MyCommand()', @@ -46,7 +46,7 @@ void main() { dir.file('packages/dash/lib/dash.dart').writeAsStringSync( initialCliFileContentWithoutImportAndCommand, ); - registerPlugin( + await registerPlugin( sidekickCli: DartPackage.fromDirectory(dir.directory('packages/dash'))!, import: "import 'package:my_package/src/my_command.dart';", @@ -64,7 +64,7 @@ void main() { dir.file('packages/dash/lib/dash.dart').writeAsStringSync( initialCliFileContentWithMyImport, ); - registerPlugin( + await registerPlugin( sidekickCli: DartPackage.fromDirectory(dir.directory('packages/dash'))!, import: "import 'package:my_package/src/my_command.dart';", diff --git a/sidekick_vault/analysis_options.yaml b/sidekick_vault/analysis_options.yaml index 1011f768..c54aac43 100644 --- a/sidekick_vault/analysis_options.yaml +++ b/sidekick_vault/analysis_options.yaml @@ -2,4 +2,5 @@ include: package:lint/analysis_options_package.yaml linter: rules: - avoid_print: false \ No newline at end of file + avoid_print: false + unawaited_futures: true diff --git a/sidekick_vault/test/delete_test.dart b/sidekick_vault/test/delete_test.dart index cf72aed0..59ac6524 100644 --- a/sidekick_vault/test/delete_test.dart +++ b/sidekick_vault/test/delete_test.dart @@ -1,4 +1,3 @@ -import 'package:dcli_core/dcli_core.dart'; import 'package:sidekick_core/sidekick_core.dart'; import 'package:sidekick_vault/sidekick_vault.dart'; import 'package:test/test.dart'; diff --git a/sidekick_vault/test/unlock_test.dart b/sidekick_vault/test/unlock_test.dart index 92ac6ea2..3fabf5db 100644 --- a/sidekick_vault/test/unlock_test.dart +++ b/sidekick_vault/test/unlock_test.dart @@ -1,4 +1,3 @@ -import 'package:dcli_core/dcli_core.dart'; import 'package:sidekick_core/sidekick_core.dart'; import 'package:sidekick_vault/sidekick_vault.dart'; import 'package:test/test.dart'; diff --git a/sidekick_vault/test/vault_command_test.dart b/sidekick_vault/test/vault_command_test.dart index 5f5e90a9..8710e792 100644 --- a/sidekick_vault/test/vault_command_test.dart +++ b/sidekick_vault/test/vault_command_test.dart @@ -1,4 +1,3 @@ -import 'package:dcli_core/dcli_core.dart'; import 'package:sidekick_core/sidekick_core.dart'; import 'package:sidekick_vault/sidekick_vault.dart'; import 'package:test/test.dart'; diff --git a/sidekick_vault/tool/install.dart b/sidekick_vault/tool/install.dart index 9e4f914b..a5e79a34 100644 --- a/sidekick_vault/tool/install.dart +++ b/sidekick_vault/tool/install.dart @@ -23,13 +23,13 @@ Future main() async { print("- Generating package:${package.name}/src/vault.dart"); _writeVaultFile(vaultDir, package); - addImport( + await addImport( package.libDir.file('${package.name}.dart'), "import 'package:${package.name}/src/vault.dart';", ); print("- Adding vault command"); - registerPlugin( + await registerPlugin( sidekickCli: package, import: "import 'package:sidekick_vault/sidekick_vault.dart';", command: 'VaultCommand(vault: vault)',