diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 06154081619b..5ff15569f842 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,5 +50,5 @@ jobs: run: | git config --global user.name ${{ secrets.USER_NAME }} git config --global user.email ${{ secrets.USER_EMAIL }} - dart ./script/tool/lib/src/main.dart publish-plugin --all-changed --base-sha=HEAD~ --skip-confirmation --remote=origin + dart ./script/tool/lib/src/main.dart publish --all-changed --base-sha=HEAD~ --skip-confirmation --remote=origin env: {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"} diff --git a/script/tool/CHANGELOG.md b/script/tool/CHANGELOG.md index 2417d0fa833c..830d3ca931e6 100644 --- a/script/tool/CHANGELOG.md +++ b/script/tool/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.11 + +* Renames `publish-plugin` to `publish`. +* Renames arguments to `list`: + * `--package` now lists top-level packages (previously `--plugin`). + * `--package-or-subpackage` now lists top-level packages (previously + `--package`). + ## 0.10.0+1 * Recognizes `run_test.sh` as a developer-only file in `version-check`. diff --git a/script/tool/README.md b/script/tool/README.md index 0e44bf16c263..9f0ac84145f2 100644 --- a/script/tool/README.md +++ b/script/tool/README.md @@ -54,7 +54,7 @@ dart pub global run flutter_plugin_tools ## Commands Run with `--help` for a full list of commands and arguments, but the -following shows a number of common commands being run for a specific plugin. +following shows a number of common commands being run for a specific package. All examples assume running from source; see above for running the published version instead. @@ -71,29 +71,29 @@ command is targetting. An package name can be any of: ```sh cd -dart run ./script/tool/bin/flutter_plugin_tools.dart format --packages plugin_name +dart run ./script/tool/bin/flutter_plugin_tools.dart format --packages package_name ``` ### Run the Dart Static Analyzer ```sh cd -dart run ./script/tool/bin/flutter_plugin_tools.dart analyze --packages plugin_name +dart run ./script/tool/bin/flutter_plugin_tools.dart analyze --packages package_name ``` ### Run Dart Unit Tests ```sh cd -dart run ./script/tool/bin/flutter_plugin_tools.dart test --packages plugin_name +dart run ./script/tool/bin/flutter_plugin_tools.dart test --packages package_name ``` ### Run Dart Integration Tests ```sh cd -dart run ./script/tool/bin/flutter_plugin_tools.dart build-examples --apk --packages plugin_name -dart run ./script/tool/bin/flutter_plugin_tools.dart drive-examples --android --packages plugin_name +dart run ./script/tool/bin/flutter_plugin_tools.dart build-examples --apk --packages package_name +dart run ./script/tool/bin/flutter_plugin_tools.dart drive-examples --android --packages package_name ``` Replace `--apk`/`--android` with the platform you want to test against @@ -110,11 +110,11 @@ Examples: ```sh cd # Run just unit tests for iOS and Android: -dart run ./script/tool/bin/flutter_plugin_tools.dart native-test --ios --android --no-integration --packages plugin_name +dart run ./script/tool/bin/flutter_plugin_tools.dart native-test --ios --android --no-integration --packages package_name # Run all tests for macOS: -dart run ./script/tool/bin/flutter_plugin_tools.dart native-test --macos --packages plugin_name +dart run ./script/tool/bin/flutter_plugin_tools.dart native-test --macos --packages package_name # Run all tests for Windows: -dart run ./script/tool/bin/flutter_plugin_tools.dart native-test --windows --packages plugin_name +dart run ./script/tool/bin/flutter_plugin_tools.dart native-test --windows --packages package_name ``` ### Update README.md from Example Sources @@ -125,7 +125,7 @@ before running this command. ```sh cd -dart run ./script/tool/bin/flutter_plugin_tools.dart update-excerpts --packages plugin_name +dart run ./script/tool/bin/flutter_plugin_tools.dart update-excerpts --packages package_name ``` ### Update CHANGELOG and Version @@ -165,18 +165,18 @@ on the Flutter Wiki first. ```sh cd git checkout -dart run ./script/tool/bin/flutter_plugin_tools.dart publish-plugin --packages +dart run ./script/tool/bin/flutter_plugin_tools.dart publish --packages ``` By default the tool tries to push tags to the `upstream` remote, but some additional settings can be configured. Run `dart run ./script/tool/bin/flutter_plugin_tools.dart -publish-plugin --help` for more usage information. +publish --help` for more usage information. The tool wraps `pub publish` for pushing the package to pub, and then will automatically use git to try to create and push tags. It has some additional safety checking around `pub publish` too. By default `pub publish` publishes _everything_, including untracked or uncommitted files in version control. -`publish-plugin` will first check the status of the local +`publish` will first check the status of the local directory and refuse to publish if there are any mismatched files with version control present. diff --git a/script/tool/lib/src/common/plugin_command.dart b/script/tool/lib/src/common/package_command.dart similarity index 92% rename from script/tool/lib/src/common/plugin_command.dart rename to script/tool/lib/src/common/package_command.dart index 843768fd4c61..60d7ecc80076 100644 --- a/script/tool/lib/src/common/plugin_command.dart +++ b/script/tool/lib/src/common/package_command.dart @@ -34,9 +34,9 @@ class PackageEnumerationEntry { /// Interface definition for all commands in this tool. // TODO(stuartmorgan): Move most of this logic to PackageLoopingCommand. -abstract class PluginCommand extends Command { +abstract class PackageCommand extends Command { /// Creates a command to operate on [packagesDir] with the given environment. - PluginCommand( + PackageCommand( this.packagesDir, { this.processRunner = const ProcessRunner(), this.platform = const LocalPlatform(), @@ -47,7 +47,7 @@ abstract class PluginCommand extends Command { help: 'Specifies which packages the command should run on (before sharding).\n', valueHelp: 'package1,package2,...', - aliases: [_pluginsArg], + aliases: [_pluginsLegacyAliasArg], ); argParser.addOption( _shardIndexArg, @@ -58,7 +58,7 @@ abstract class PluginCommand extends Command { ); argParser.addOption( _shardCountArg, - help: 'Specifies the number of shards into which plugins are divided.', + help: 'Specifies the number of shards into which packages are divided.', valueHelp: 'n', defaultsTo: '1', ); @@ -71,7 +71,7 @@ abstract class PluginCommand extends Command { defaultsTo: [], ); argParser.addFlag(_runOnChangedPackagesArg, - help: 'Run the command on changed packages/plugins.\n' + help: 'Run the command on changed packages.\n' 'If no packages have changed, or if there have been changes that may\n' 'affect all packages, the command runs on all packages.\n' 'Packages excluded with $_excludeArg are excluded even if changed.\n' @@ -106,13 +106,13 @@ abstract class PluginCommand extends Command { static const String _logTimingArg = 'log-timing'; static const String _packagesArg = 'packages'; static const String _packagesForBranchArg = 'packages-for-branch'; - static const String _pluginsArg = 'plugins'; + static const String _pluginsLegacyAliasArg = 'plugins'; static const String _runOnChangedPackagesArg = 'run-on-changed-packages'; static const String _runOnDirtyPackagesArg = 'run-on-dirty-packages'; static const String _shardCountArg = 'shardCount'; static const String _shardIndexArg = 'shardIndex'; - /// The directory containing the plugin packages. + /// The directory containing the packages. final Directory packagesDir; /// The process runner. @@ -221,7 +221,7 @@ abstract class PluginCommand extends Command { _shardCount = shardCount; } - /// Returns the set of plugins to exclude based on the `--exclude` argument. + /// Returns the set of packages to exclude based on the `--exclude` argument. Set getExcludedPackageNames() { final Set excludedPackages = _excludedPackages ?? getStringListArg(_excludeArg).expand((String item) { @@ -250,22 +250,22 @@ abstract class PluginCommand extends Command { Stream getTargetPackages( {bool filterExcluded = true}) async* { // To avoid assuming consistency of `Directory.list` across command - // invocations, we collect and sort the plugin folders before sharding. + // invocations, we collect and sort the package folders before sharding. // This is considered an implementation detail which is why the API still // uses streams. - final List allPlugins = + final List allPackages = await _getAllPackages().toList(); - allPlugins.sort((PackageEnumerationEntry p1, PackageEnumerationEntry p2) => + allPackages.sort((PackageEnumerationEntry p1, PackageEnumerationEntry p2) => p1.package.path.compareTo(p2.package.path)); - final int shardSize = allPlugins.length ~/ shardCount + - (allPlugins.length % shardCount == 0 ? 0 : 1); - final int start = min(shardIndex * shardSize, allPlugins.length); - final int end = min(start + shardSize, allPlugins.length); - - for (final PackageEnumerationEntry plugin - in allPlugins.sublist(start, end)) { - if (!(filterExcluded && plugin.excluded)) { - yield plugin; + final int shardSize = allPackages.length ~/ shardCount + + (allPackages.length % shardCount == 0 ? 0 : 1); + final int start = min(shardIndex * shardSize, allPackages.length); + final int end = min(start + shardSize, allPackages.length); + + for (final PackageEnumerationEntry package + in allPackages.sublist(start, end)) { + if (!(filterExcluded && package.excluded)) { + yield package; } } } @@ -330,7 +330,7 @@ abstract class PluginCommand extends Command { runOnChangedPackages = false; } - final Set excludedPluginNames = getExcludedPackageNames(); + final Set excludedPackageNames = getExcludedPackageNames(); if (runOnChangedPackages) { final GitVersionFinder gitVersionFinder = await retrieveVersionFinder(); @@ -368,15 +368,16 @@ abstract class PluginCommand extends Command { ]) { await for (final FileSystemEntity entity in dir.list(followLinks: false)) { - // A top-level Dart package is a plugin package. + // A top-level Dart package is a standard package. if (isPackage(entity)) { if (packages.isEmpty || packages.contains(p.basename(entity.path))) { yield PackageEnumerationEntry( RepositoryPackage(entity as Directory), - excluded: excludedPluginNames.contains(entity.basename)); + excluded: excludedPackageNames.contains(entity.basename)); } } else if (entity is Directory) { - // Look for Dart packages under this top-level directory. + // Look for Dart packages under this top-level directory; this is the + // standard structure for federated plugins. await for (final FileSystemEntity subdir in entity.list(followLinks: false)) { if (isPackage(subdir)) { @@ -394,7 +395,7 @@ abstract class PluginCommand extends Command { packages.intersection(possibleMatches).isNotEmpty) { yield PackageEnumerationEntry( RepositoryPackage(subdir as Directory), - excluded: excludedPluginNames + excluded: excludedPackageNames .intersection(possibleMatches) .isNotEmpty); } @@ -415,11 +416,12 @@ abstract class PluginCommand extends Command { /// stream. Stream getTargetPackagesAndSubpackages( {bool filterExcluded = true}) async* { - await for (final PackageEnumerationEntry plugin + await for (final PackageEnumerationEntry package in getTargetPackages(filterExcluded: filterExcluded)) { - yield plugin; - yield* getSubpackages(plugin.package).map((RepositoryPackage package) => - PackageEnumerationEntry(package, excluded: plugin.excluded)); + yield package; + yield* getSubpackages(package.package).map( + (RepositoryPackage subPackage) => + PackageEnumerationEntry(subPackage, excluded: package.excluded)); } } @@ -524,7 +526,7 @@ abstract class PluginCommand extends Command { } // Returns true if one or more files changed that have the potential to affect - // any plugin (e.g., CI script changes). + // any packages (e.g., CI script changes). bool _changesRequireFullTest(List changedFiles) { const List specialFiles = [ '.ci.yaml', // LUCI config. diff --git a/script/tool/lib/src/common/package_looping_command.dart b/script/tool/lib/src/common/package_looping_command.dart index 9e696e956192..a32ada2c35e8 100644 --- a/script/tool/lib/src/common/package_looping_command.dart +++ b/script/tool/lib/src/common/package_looping_command.dart @@ -12,7 +12,7 @@ import 'package:platform/platform.dart'; import 'package:pub_semver/pub_semver.dart'; import 'core.dart'; -import 'plugin_command.dart'; +import 'package_command.dart'; import 'process_runner.dart'; import 'repository_package.dart'; @@ -82,7 +82,7 @@ class PackageResult { /// An abstract base class for a command that iterates over a set of packages /// controlled by a standard set of flags, running some actions on each package, /// and collecting and reporting the success/failure of those actions. -abstract class PackageLoopingCommand extends PluginCommand { +abstract class PackageLoopingCommand extends PackageCommand { /// Creates a command to operate on [packagesDir] with the given environment. PackageLoopingCommand( Directory packagesDir, { diff --git a/script/tool/lib/src/common/package_state_utils.dart b/script/tool/lib/src/common/package_state_utils.dart index c9465876f290..870956a24b10 100644 --- a/script/tool/lib/src/common/package_state_utils.dart +++ b/script/tool/lib/src/common/package_state_utils.dart @@ -161,7 +161,7 @@ bool _isUnpublishedExampleChange( return exampleComponents.first.toLowerCase() != 'readme.md'; } -// True if the change is only relevant to people working on the plugin. +// True if the change is only relevant to people working on the package. Future _isDevChange(List pathComponents, {GitVersionFinder? git, String? repoPath}) async { return _isTestChange(pathComponents) || diff --git a/script/tool/lib/src/create_all_plugins_app_command.dart b/script/tool/lib/src/create_all_plugins_app_command.dart index 7bf007ac72a5..a23dc83d98f3 100644 --- a/script/tool/lib/src/create_all_plugins_app_command.dart +++ b/script/tool/lib/src/create_all_plugins_app_command.dart @@ -10,13 +10,13 @@ import 'package:pub_semver/pub_semver.dart'; import 'package:pubspec_parse/pubspec_parse.dart'; import 'common/core.dart'; -import 'common/plugin_command.dart'; +import 'common/package_command.dart'; import 'common/repository_package.dart'; const String _outputDirectoryFlag = 'output-dir'; /// A command to create an application that builds all in a single application. -class CreateAllPluginsAppCommand extends PluginCommand { +class CreateAllPluginsAppCommand extends PackageCommand { /// Creates an instance of the builder command. CreateAllPluginsAppCommand( Directory packagesDir, { diff --git a/script/tool/lib/src/drive_examples_command.dart b/script/tool/lib/src/drive_examples_command.dart index 45e20c0f13cf..e8fb11b5f289 100644 --- a/script/tool/lib/src/drive_examples_command.dart +++ b/script/tool/lib/src/drive_examples_command.dart @@ -49,7 +49,7 @@ class DriveExamplesCommand extends PackageLoopingCommand { final String name = 'drive-examples'; @override - final String description = 'Runs driver tests for plugin example apps.\n\n' + final String description = 'Runs driver tests for package example apps.\n\n' 'For each *_test.dart in test_driver/ it drives an application with ' 'either the corresponding test in test_driver (for example, ' 'test_driver/app_test.dart would match test_driver/app.dart), or the ' diff --git a/script/tool/lib/src/format_command.dart b/script/tool/lib/src/format_command.dart index f640cbaa5f6c..cc6936c566e1 100644 --- a/script/tool/lib/src/format_command.dart +++ b/script/tool/lib/src/format_command.dart @@ -11,7 +11,7 @@ import 'package:meta/meta.dart'; import 'package:platform/platform.dart'; import 'common/core.dart'; -import 'common/plugin_command.dart'; +import 'common/package_command.dart'; import 'common/process_runner.dart'; /// In theory this should be 8191, but in practice that was still resulting in @@ -37,7 +37,7 @@ final Uri _googleFormatterUrl = Uri.https('github.com', '/google/google-java-format/releases/download/google-java-format-1.3/google-java-format-1.3-all-deps.jar'); /// A command to format all package code. -class FormatCommand extends PluginCommand { +class FormatCommand extends PackageCommand { /// Creates an instance of the format command. FormatCommand( Directory packagesDir, { diff --git a/script/tool/lib/src/license_check_command.dart b/script/tool/lib/src/license_check_command.dart index 5e74d846c13f..0517bcf43298 100644 --- a/script/tool/lib/src/license_check_command.dart +++ b/script/tool/lib/src/license_check_command.dart @@ -8,7 +8,7 @@ import 'package:path/path.dart' as p; import 'package:platform/platform.dart'; import 'common/core.dart'; -import 'common/plugin_command.dart'; +import 'common/package_command.dart'; const Set _codeFileExtensions = { '.c', @@ -105,7 +105,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. '''; /// Validates that code files have copyright and license blocks. -class LicenseCheckCommand extends PluginCommand { +class LicenseCheckCommand extends PackageCommand { /// Creates a new license check command for [packagesDir]. LicenseCheckCommand(Directory packagesDir, {Platform platform = const LocalPlatform(), GitDir? gitDir}) diff --git a/script/tool/lib/src/list_command.dart b/script/tool/lib/src/list_command.dart index e45c09bfd2ef..b47657e47eff 100644 --- a/script/tool/lib/src/list_command.dart +++ b/script/tool/lib/src/list_command.dart @@ -5,11 +5,11 @@ import 'package:file/file.dart'; import 'package:platform/platform.dart'; -import 'common/plugin_command.dart'; +import 'common/package_command.dart'; import 'common/repository_package.dart'; /// A command to list different types of repository content. -class ListCommand extends PluginCommand { +class ListCommand extends PackageCommand { /// Creates an instance of the list command, whose behavior depends on the /// 'type' argument it provides. ListCommand( @@ -18,14 +18,14 @@ class ListCommand extends PluginCommand { }) : super(packagesDir, platform: platform) { argParser.addOption( _type, - defaultsTo: _plugin, - allowed: [_plugin, _example, _package, _file], + defaultsTo: _package, + allowed: [_package, _example, _allPackage, _file], help: 'What type of file system content to list.', ); } static const String _type = 'type'; - static const String _plugin = 'plugin'; + static const String _allPackage = 'package-or-subpackage'; static const String _example = 'example'; static const String _package = 'package'; static const String _file = 'file'; @@ -39,7 +39,7 @@ class ListCommand extends PluginCommand { @override Future run() async { switch (getStringArg(_type)) { - case _plugin: + case _package: await for (final PackageEnumerationEntry entry in getTargetPackages()) { print(entry.package.path); } @@ -52,7 +52,7 @@ class ListCommand extends PluginCommand { print(package.path); } break; - case _package: + case _allPackage: await for (final PackageEnumerationEntry entry in getTargetPackagesAndSubpackages()) { print(entry.package.path); diff --git a/script/tool/lib/src/main.dart b/script/tool/lib/src/main.dart index ea1ec067c82f..0f73c71e8437 100644 --- a/script/tool/lib/src/main.dart +++ b/script/tool/lib/src/main.dart @@ -25,7 +25,7 @@ import 'list_command.dart'; import 'make_deps_path_based_command.dart'; import 'native_test_command.dart'; import 'publish_check_command.dart'; -import 'publish_plugin_command.dart'; +import 'publish_command.dart'; import 'pubspec_check_command.dart'; import 'readme_check_command.dart'; import 'remove_dev_dependencies.dart'; @@ -69,7 +69,7 @@ void main(List args) { ..addCommand(NativeTestCommand(packagesDir)) ..addCommand(MakeDepsPathBasedCommand(packagesDir)) ..addCommand(PublishCheckCommand(packagesDir)) - ..addCommand(PublishPluginCommand(packagesDir)) + ..addCommand(PublishCommand(packagesDir)) ..addCommand(PubspecCheckCommand(packagesDir)) ..addCommand(ReadmeCheckCommand(packagesDir)) ..addCommand(RemoveDevDependenciesCommand(packagesDir)) diff --git a/script/tool/lib/src/make_deps_path_based_command.dart b/script/tool/lib/src/make_deps_path_based_command.dart index 805dd68a0afe..a09511ad7f42 100644 --- a/script/tool/lib/src/make_deps_path_based_command.dart +++ b/script/tool/lib/src/make_deps_path_based_command.dart @@ -9,7 +9,7 @@ import 'package:pub_semver/pub_semver.dart'; import 'common/core.dart'; import 'common/git_version_finder.dart'; -import 'common/plugin_command.dart'; +import 'common/package_command.dart'; import 'common/repository_package.dart'; const int _exitPackageNotFound = 3; @@ -24,7 +24,7 @@ enum _RewriteOutcome { changed, noChangesNeeded, alreadyChanged } /// where a non-breaking change to a platform interface package of a federated /// plugin would cause post-publish analyzer failures in another package of that /// plugin. -class MakeDepsPathBasedCommand extends PluginCommand { +class MakeDepsPathBasedCommand extends PackageCommand { /// Creates an instance of the command to convert selected dependencies to /// path-based. MakeDepsPathBasedCommand( @@ -150,7 +150,7 @@ class MakeDepsPathBasedCommand extends PluginCommand { return _RewriteOutcome.alreadyChanged; } printError( - 'Plugins with dependency overrides are not currently supported.'); + 'Packages with dependency overrides are not currently supported.'); throw ToolExit(_exitCannotUpdatePubspec); } diff --git a/script/tool/lib/src/publish_check_command.dart b/script/tool/lib/src/publish_check_command.dart index d98a286ff582..38e1b7bdebbb 100644 --- a/script/tool/lib/src/publish_check_command.dart +++ b/script/tool/lib/src/publish_check_command.dart @@ -55,7 +55,7 @@ class PublishCheckCommand extends PackageLoopingCommand { @override final String description = - 'Checks to make sure that a plugin *could* be published.'; + 'Checks to make sure that a package *could* be published.'; final PubVersionFinder _pubVersionFinder; diff --git a/script/tool/lib/src/publish_plugin_command.dart b/script/tool/lib/src/publish_command.dart similarity index 98% rename from script/tool/lib/src/publish_plugin_command.dart rename to script/tool/lib/src/publish_command.dart index cae8edac71ca..e7b3d110c5fa 100644 --- a/script/tool/lib/src/publish_plugin_command.dart +++ b/script/tool/lib/src/publish_command.dart @@ -18,8 +18,8 @@ import 'package:yaml/yaml.dart'; import 'common/core.dart'; import 'common/file_utils.dart'; import 'common/git_version_finder.dart'; +import 'common/package_command.dart'; import 'common/package_looping_command.dart'; -import 'common/plugin_command.dart'; import 'common/process_runner.dart'; import 'common/pub_version_finder.dart'; import 'common/repository_package.dart'; @@ -42,13 +42,13 @@ class _RemoteInfo { /// 2. Tags the release with the format -v. /// 3. Pushes the release to a remote. /// -/// Both 2 and 3 are optional, see `plugin_tools help publish-plugin` for full +/// Both 2 and 3 are optional, see `plugin_tools help publish` for full /// usage information. /// /// [processRunner], [print], and [stdin] can be overriden for easier testing. -class PublishPluginCommand extends PackageLoopingCommand { +class PublishCommand extends PackageLoopingCommand { /// Creates an instance of the publish command. - PublishPluginCommand( + PublishCommand( Directory packagesDir, { ProcessRunner processRunner = const ProcessRunner(), Platform platform = const LocalPlatform(), @@ -100,7 +100,7 @@ class PublishPluginCommand extends PackageLoopingCommand { static const String _tagFormat = '%PACKAGE%-v%VERSION%'; @override - final String name = 'publish-plugin'; + final String name = 'publish'; @override final String description = diff --git a/script/tool/lib/src/version_check_command.dart b/script/tool/lib/src/version_check_command.dart index 235611492b2d..b3be672066d9 100644 --- a/script/tool/lib/src/version_check_command.dart +++ b/script/tool/lib/src/version_check_command.dart @@ -170,7 +170,7 @@ class VersionCheckCommand extends PackageLoopingCommand { @override final String description = - 'Checks if the versions of the plugins have been incremented per pub specification.\n' + 'Checks if the versions of packages have been incremented per pub specification.\n' 'Also checks if the latest version in CHANGELOG matches the version in pubspec.\n\n' 'This command requires "pub" and "flutter" to be in your path.'; @@ -318,7 +318,7 @@ ${indentation}HTTP response: ${pubVersionFinderResponse.httpResponse.body} print('${indentation}Unable to find previous version ' '${getBoolArg(_againstPubFlag) ? 'on pub server' : 'at git base'}.'); logWarning( - '${indentation}If this plugin is not new, something has gone wrong.'); + '${indentation}If this package is not new, something has gone wrong.'); return _CurrentVersionState.validIncrease; // Assume new, thus valid. } diff --git a/script/tool/pubspec.yaml b/script/tool/pubspec.yaml index 9b9d73288552..246c2ade2564 100644 --- a/script/tool/pubspec.yaml +++ b/script/tool/pubspec.yaml @@ -1,7 +1,7 @@ name: flutter_plugin_tools description: Productivity utils for flutter/plugins and flutter/packages repository: https://github.com/flutter/plugins/tree/main/script/tool -version: 0.10.0+1 +version: 0.11.0 dependencies: args: ^2.1.0 diff --git a/script/tool/test/analyze_command_test.dart b/script/tool/test/analyze_command_test.dart index e10780fa9ecb..e6b910960846 100644 --- a/script/tool/test/analyze_command_test.dart +++ b/script/tool/test/analyze_command_test.dart @@ -37,7 +37,7 @@ void main() { }); test('analyzes all packages', () async { - final RepositoryPackage plugin1 = createFakePlugin('a', packagesDir); + final RepositoryPackage package1 = createFakePackage('a', packagesDir); final RepositoryPackage plugin2 = createFakePlugin('b', packagesDir); await runCapturingPrint(runner, ['analyze']); @@ -45,9 +45,9 @@ void main() { expect( processRunner.recordedCalls, orderedEquals([ - ProcessCall('flutter', const ['pub', 'get'], plugin1.path), - ProcessCall( - 'dart', const ['analyze', '--fatal-infos'], plugin1.path), + ProcessCall('flutter', const ['pub', 'get'], package1.path), + ProcessCall('dart', const ['analyze', '--fatal-infos'], + package1.path), ProcessCall('flutter', const ['pub', 'get'], plugin2.path), ProcessCall( 'dart', const ['analyze', '--fatal-infos'], plugin2.path), diff --git a/script/tool/test/common/git_version_finder_test.dart b/script/tool/test/common/git_version_finder_test.dart index ad1a26ffc165..d5a5dd4fe876 100644 --- a/script/tool/test/common/git_version_finder_test.dart +++ b/script/tool/test/common/git_version_finder_test.dart @@ -8,7 +8,7 @@ import 'package:flutter_plugin_tools/src/common/git_version_finder.dart'; import 'package:mockito/mockito.dart'; import 'package:test/test.dart'; -import 'plugin_command_test.mocks.dart'; +import 'package_command_test.mocks.dart'; void main() { late List?> gitDirCommands; diff --git a/script/tool/test/common/plugin_command_test.dart b/script/tool/test/common/package_command_test.dart similarity index 98% rename from script/tool/test/common/plugin_command_test.dart rename to script/tool/test/common/package_command_test.dart index 8c6b38682418..c3d1ee343ff4 100644 --- a/script/tool/test/common/plugin_command_test.dart +++ b/script/tool/test/common/package_command_test.dart @@ -8,7 +8,7 @@ import 'package:args/command_runner.dart'; import 'package:file/file.dart'; import 'package:file/memory.dart'; import 'package:flutter_plugin_tools/src/common/core.dart'; -import 'package:flutter_plugin_tools/src/common/plugin_command.dart'; +import 'package:flutter_plugin_tools/src/common/package_command.dart'; import 'package:flutter_plugin_tools/src/common/process_runner.dart'; import 'package:git/git.dart'; import 'package:mockito/annotations.dart'; @@ -18,12 +18,12 @@ import 'package:test/test.dart'; import '../mocks.dart'; import '../util.dart'; -import 'plugin_command_test.mocks.dart'; +import 'package_command_test.mocks.dart'; @GenerateMocks([GitDir]) void main() { late RecordingProcessRunner processRunner; - late SamplePluginCommand command; + late SamplePackageCommand command; late CommandRunner runner; late FileSystem fileSystem; late MockPlatform mockPlatform; @@ -49,7 +49,7 @@ void main() { return processRunner.run('git-$gitCommand', arguments); }); processRunner = RecordingProcessRunner(); - command = SamplePluginCommand( + command = SamplePackageCommand( packagesDir, processRunner: processRunner, platform: mockPlatform, @@ -282,7 +282,7 @@ packages/plugin1/plugin1/plugin1.dart }); test('returns subpackages after the enclosing package', () async { - final SamplePluginCommand localCommand = SamplePluginCommand( + final SamplePackageCommand localCommand = SamplePackageCommand( packagesDir, processRunner: processRunner, platform: mockPlatform, @@ -848,7 +848,7 @@ packages/b_package/lib/src/foo.dart ]; for (int i = 0; i < expectedShards.length; ++i) { - final SamplePluginCommand localCommand = SamplePluginCommand( + final SamplePackageCommand localCommand = SamplePackageCommand( packagesDir, processRunner: processRunner, platform: mockPlatform, @@ -892,7 +892,7 @@ packages/b_package/lib/src/foo.dart ]; for (int i = 0; i < expectedShards.length; ++i) { - final SamplePluginCommand localCommand = SamplePluginCommand( + final SamplePackageCommand localCommand = SamplePackageCommand( packagesDir, processRunner: processRunner, platform: mockPlatform, @@ -945,7 +945,7 @@ packages/b_package/lib/src/foo.dart createFakePackage('package9', packagesDir); for (int i = 0; i < expectedShards.length; ++i) { - final SamplePluginCommand localCommand = SamplePluginCommand( + final SamplePackageCommand localCommand = SamplePackageCommand( packagesDir, processRunner: processRunner, platform: mockPlatform, @@ -971,8 +971,8 @@ packages/b_package/lib/src/foo.dart }); } -class SamplePluginCommand extends PluginCommand { - SamplePluginCommand( +class SamplePackageCommand extends PackageCommand { + SamplePackageCommand( Directory packagesDir, { ProcessRunner processRunner = const ProcessRunner(), Platform platform = const LocalPlatform(), diff --git a/script/tool/test/common/plugin_command_test.mocks.dart b/script/tool/test/common/package_command_test.mocks.dart similarity index 100% rename from script/tool/test/common/plugin_command_test.mocks.dart rename to script/tool/test/common/package_command_test.mocks.dart diff --git a/script/tool/test/common/package_looping_command_test.dart b/script/tool/test/common/package_looping_command_test.dart index 7e9f63cb0344..c858df0022cc 100644 --- a/script/tool/test/common/package_looping_command_test.dart +++ b/script/tool/test/common/package_looping_command_test.dart @@ -18,7 +18,7 @@ import 'package:test/test.dart'; import '../mocks.dart'; import '../util.dart'; -import 'plugin_command_test.mocks.dart'; +import 'package_command_test.mocks.dart'; // Constants for colorized output start and end. const String _startElapsedTimeColor = '\x1B[90m'; @@ -373,9 +373,10 @@ void main() { test('skips unsupported Dart versions when requested', () async { final RepositoryPackage excluded = createFakePackage( - 'excluded_package', packagesDir, dartConstraint: '>=2.17.0 <3.0.0'); - final RepositoryPackage included = createFakePackage( - 'a_package', packagesDir); + 'excluded_package', packagesDir, + dartConstraint: '>=2.17.0 <3.0.0'); + final RepositoryPackage included = + createFakePackage('a_package', packagesDir); final TestPackageLoopingCommand command = createTestCommand( packageLoopingType: PackageLoopingType.includeAllSubpackages, @@ -406,8 +407,7 @@ void main() { createFakePlugin('package_a', packagesDir); createFakePackage('package_b', packagesDir); - final TestPackageLoopingCommand command = - createTestCommand(); + final TestPackageLoopingCommand command = createTestCommand(); final List output = await runCommand(command); const String separator = @@ -440,8 +440,7 @@ void main() { createFakePlugin('package_a', packagesDir); createFakePackage('package_b', packagesDir); - final TestPackageLoopingCommand command = - createTestCommand(); + final TestPackageLoopingCommand command = createTestCommand(); final List output = await runCommand(command, arguments: ['--log-timing']); @@ -783,8 +782,7 @@ void main() { createFakePackage('package_f', packagesDir); - final TestPackageLoopingCommand command = - createTestCommand(); + final TestPackageLoopingCommand command = createTestCommand(); final List output = await runCommand(command); expect( @@ -809,8 +807,7 @@ void main() { test('prints exclusions as skips in long-form run summary', () async { createFakePackage('package_a', packagesDir); - final TestPackageLoopingCommand command = - createTestCommand(); + final TestPackageLoopingCommand command = createTestCommand(); final List output = await runCommand(command, arguments: ['--exclude=package_a']); diff --git a/script/tool/test/custom_test_command_test.dart b/script/tool/test/custom_test_command_test.dart index a28b47505e9d..8b0c021b1255 100644 --- a/script/tool/test/custom_test_command_test.dart +++ b/script/tool/test/custom_test_command_test.dart @@ -40,7 +40,7 @@ void main() { test('runs both new and legacy when both are present', () async { final RepositoryPackage package = - createFakePlugin('a_package', packagesDir, extraFiles: [ + createFakePackage('a_package', packagesDir, extraFiles: [ 'tool/run_tests.dart', 'run_tests.sh', ]); @@ -65,7 +65,7 @@ void main() { }); test('runs when only new is present', () async { - final RepositoryPackage package = createFakePlugin( + final RepositoryPackage package = createFakePackage( 'a_package', packagesDir, extraFiles: ['tool/run_tests.dart']); @@ -87,7 +87,7 @@ void main() { }); test('runs pub get before running Dart test script', () async { - final RepositoryPackage package = createFakePlugin( + final RepositoryPackage package = createFakePackage( 'a_package', packagesDir, extraFiles: ['tool/run_tests.dart']); @@ -103,7 +103,7 @@ void main() { }); test('runs when only legacy is present', () async { - final RepositoryPackage package = createFakePlugin( + final RepositoryPackage package = createFakePackage( 'a_package', packagesDir, extraFiles: ['run_tests.sh']); @@ -125,7 +125,7 @@ void main() { }); test('skips when neither is present', () async { - createFakePlugin('a_package', packagesDir); + createFakePackage('a_package', packagesDir); final List output = await runCapturingPrint(runner, ['custom-test']); @@ -140,7 +140,7 @@ void main() { }); test('fails if new fails', () async { - createFakePlugin('a_package', packagesDir, extraFiles: [ + createFakePackage('a_package', packagesDir, extraFiles: [ 'tool/run_tests.dart', 'run_tests.sh', ]); @@ -166,7 +166,7 @@ void main() { }); test('fails if pub get fails', () async { - createFakePlugin('a_package', packagesDir, extraFiles: [ + createFakePackage('a_package', packagesDir, extraFiles: [ 'tool/run_tests.dart', 'run_tests.sh', ]); @@ -193,7 +193,7 @@ void main() { test('fails if legacy fails', () async { final RepositoryPackage package = - createFakePlugin('a_package', packagesDir, extraFiles: [ + createFakePackage('a_package', packagesDir, extraFiles: [ 'tool/run_tests.dart', 'run_tests.sh', ]); @@ -238,7 +238,7 @@ void main() { test('runs new and skips old when both are present', () async { final RepositoryPackage package = - createFakePlugin('a_package', packagesDir, extraFiles: [ + createFakePackage('a_package', packagesDir, extraFiles: [ 'tool/run_tests.dart', 'run_tests.sh', ]); @@ -261,7 +261,7 @@ void main() { }); test('runs when only new is present', () async { - final RepositoryPackage package = createFakePlugin( + final RepositoryPackage package = createFakePackage( 'a_package', packagesDir, extraFiles: ['tool/run_tests.dart']); @@ -283,7 +283,7 @@ void main() { }); test('skips package when only legacy is present', () async { - createFakePlugin('a_package', packagesDir, + createFakePackage('a_package', packagesDir, extraFiles: ['run_tests.sh']); final List output = @@ -300,7 +300,7 @@ void main() { }); test('fails if new fails', () async { - createFakePlugin('a_package', packagesDir, extraFiles: [ + createFakePackage('a_package', packagesDir, extraFiles: [ 'tool/run_tests.dart', 'run_tests.sh', ]); diff --git a/script/tool/test/dependabot_check_command_test.dart b/script/tool/test/dependabot_check_command_test.dart index a4c8693b2c21..b0558c3d22ac 100644 --- a/script/tool/test/dependabot_check_command_test.dart +++ b/script/tool/test/dependabot_check_command_test.dart @@ -10,7 +10,7 @@ import 'package:flutter_plugin_tools/src/dependabot_check_command.dart'; import 'package:mockito/mockito.dart'; import 'package:test/test.dart'; -import 'common/plugin_command_test.mocks.dart'; +import 'common/package_command_test.mocks.dart'; import 'util.dart'; void main() { diff --git a/script/tool/test/federation_safety_check_command_test.dart b/script/tool/test/federation_safety_check_command_test.dart index 015a0eb634d9..6b6b1a514531 100644 --- a/script/tool/test/federation_safety_check_command_test.dart +++ b/script/tool/test/federation_safety_check_command_test.dart @@ -12,7 +12,7 @@ import 'package:flutter_plugin_tools/src/federation_safety_check_command.dart'; import 'package:mockito/mockito.dart'; import 'package:test/test.dart'; -import 'common/plugin_command_test.mocks.dart'; +import 'common/package_command_test.mocks.dart'; import 'mocks.dart'; import 'util.dart'; diff --git a/script/tool/test/format_command_test.dart b/script/tool/test/format_command_test.dart index 5bd6f97832f7..c1c4a212a019 100644 --- a/script/tool/test/format_command_test.dart +++ b/script/tool/test/format_command_test.dart @@ -60,15 +60,15 @@ void main() { } /// Returns a list of [count] relative paths to pass to [createFakePlugin] - /// with name [pluginName] such that each path will be 99 characters long - /// relative to [packagesDir]. + /// or [createFakePackage] with name [packageName] such that each path will + /// be 99 characters long relative to [packagesDir]. /// /// This is for each of testing batching, since it means each file will /// consume 100 characters of the batch length. - List _get99CharacterPathExtraFiles(String pluginName, int count) { + List _get99CharacterPathExtraFiles(String packageName, int count) { final int padding = 99 - - pluginName.length - - 1 - // the path separator after the plugin name + packageName.length - + 1 - // the path separator after the package name 1 - // the path separator after the padding 10; // the file name const int filenameBase = 10000; diff --git a/script/tool/test/license_check_command_test.dart b/script/tool/test/license_check_command_test.dart index 43fbd6b5eca8..005b77d99a13 100644 --- a/script/tool/test/license_check_command_test.dart +++ b/script/tool/test/license_check_command_test.dart @@ -11,7 +11,7 @@ import 'package:mockito/mockito.dart'; import 'package:platform/platform.dart'; import 'package:test/test.dart'; -import 'common/plugin_command_test.mocks.dart'; +import 'common/package_command_test.mocks.dart'; import 'mocks.dart'; import 'util.dart'; diff --git a/script/tool/test/list_command_test.dart b/script/tool/test/list_command_test.dart index f74431c5cee7..f19215c89b9e 100644 --- a/script/tool/test/list_command_test.dart +++ b/script/tool/test/list_command_test.dart @@ -29,17 +29,17 @@ void main() { runner.addCommand(command); }); - test('lists plugins', () async { - createFakePlugin('plugin1', packagesDir); + test('lists top-level packages', () async { + createFakePackage('package1', packagesDir); createFakePlugin('plugin2', packagesDir); final List plugins = - await runCapturingPrint(runner, ['list', '--type=plugin']); + await runCapturingPrint(runner, ['list', '--type=package']); expect( plugins, orderedEquals([ - '/packages/plugin1', + '/packages/package1', '/packages/plugin2', ]), ); @@ -64,20 +64,20 @@ void main() { ); }); - test('lists packages', () async { - createFakePlugin('plugin1', packagesDir); + test('lists packages and subpackages', () async { + createFakePackage('package1', packagesDir); createFakePlugin('plugin2', packagesDir, examples: ['example1', 'example2']); createFakePlugin('plugin3', packagesDir, examples: []); - final List packages = - await runCapturingPrint(runner, ['list', '--type=package']); + final List packages = await runCapturingPrint( + runner, ['list', '--type=package-or-subpackage']); expect( packages, unorderedEquals([ - '/packages/plugin1', - '/packages/plugin1/example', + '/packages/package1', + '/packages/package1/example', '/packages/plugin2', '/packages/plugin2/example/example1', '/packages/plugin2/example/example2', diff --git a/script/tool/test/make_deps_path_based_command_test.dart b/script/tool/test/make_deps_path_based_command_test.dart index 33d6be261e87..7e52dd6bbbc4 100644 --- a/script/tool/test/make_deps_path_based_command_test.dart +++ b/script/tool/test/make_deps_path_based_command_test.dart @@ -11,7 +11,7 @@ import 'package:flutter_plugin_tools/src/make_deps_path_based_command.dart'; import 'package:mockito/mockito.dart'; import 'package:test/test.dart'; -import 'common/plugin_command_test.mocks.dart'; +import 'common/package_command_test.mocks.dart'; import 'mocks.dart'; import 'util.dart'; diff --git a/script/tool/test/publish_plugin_command_test.dart b/script/tool/test/publish_command_test.dart similarity index 94% rename from script/tool/test/publish_plugin_command_test.dart rename to script/tool/test/publish_command_test.dart index f3be3b48b1f1..19e8bdd233ec 100644 --- a/script/tool/test/publish_plugin_command_test.dart +++ b/script/tool/test/publish_command_test.dart @@ -10,14 +10,14 @@ import 'package:args/command_runner.dart'; import 'package:file/file.dart'; import 'package:file/memory.dart'; import 'package:flutter_plugin_tools/src/common/core.dart'; -import 'package:flutter_plugin_tools/src/publish_plugin_command.dart'; +import 'package:flutter_plugin_tools/src/publish_command.dart'; import 'package:http/http.dart' as http; import 'package:http/testing.dart'; import 'package:mockito/mockito.dart'; import 'package:platform/platform.dart'; import 'package:test/test.dart'; -import 'common/plugin_command_test.mocks.dart'; +import 'common/package_command_test.mocks.dart'; import 'mocks.dart'; import 'util.dart'; @@ -34,7 +34,7 @@ void main() { late Map> mockHttpResponses; void _createMockCredentialFile() { - final String credentialPath = PublishPluginCommand.getCredentialPath(); + final String credentialPath = PublishCommand.getCredentialPath(); fileSystem.file(credentialPath) ..createSync(recursive: true) ..writeAsStringSync('some credential'); @@ -72,7 +72,7 @@ void main() { mockStdin = MockStdin(); commandRunner = CommandRunner('tester', '') - ..addCommand(PublishPluginCommand( + ..addCommand(PublishCommand( packagesDir, processRunner: processRunner, stdinput: mockStdin, @@ -93,7 +93,7 @@ void main() { Error? commandError; final List output = await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=foo', ], errorHandler: (Error e) { commandError = e; @@ -122,7 +122,7 @@ void main() { Error? commandError; final List output = await runCapturingPrint( - commandRunner, ['publish-plugin', '--packages=foo'], + commandRunner, ['publish', '--packages=foo'], errorHandler: (Error e) { commandError = e; }); @@ -154,8 +154,8 @@ void main() { stderrEncoding: utf8), // pub publish for plugin1 ]; - final List output = await runCapturingPrint(commandRunner, - ['publish-plugin', '--packages=plugin1,plugin2']); + final List output = await runCapturingPrint( + commandRunner, ['publish', '--packages=plugin1,plugin2']); expect( output, @@ -176,7 +176,7 @@ void main() { mockStdin.mockUserInputs.add(utf8.encode('user input')); await runCapturingPrint( - commandRunner, ['publish-plugin', '--packages=foo']); + commandRunner, ['publish', '--packages=foo']); expect(processRunner.mockPublishProcess.stdinMock.lines, contains('user input')); @@ -187,7 +187,7 @@ void main() { createFakePlugin('foo', packagesDir, examples: []); await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=foo', '--pub-publish-flags', '--dry-run,--server=bar' @@ -209,7 +209,7 @@ void main() { createFakePlugin('foo', packagesDir, examples: []); await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=foo', '--skip-confirmation', '--pub-publish-flags', @@ -232,7 +232,7 @@ void main() { createFakePlugin('plugin_b', packagesDir, examples: []); await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=plugin_a,plugin_b', '--skip-confirmation', '--pub-publish-flags', @@ -263,7 +263,7 @@ void main() { Error? commandError; final List output = await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=foo', ], errorHandler: (Error e) { commandError = e; @@ -283,7 +283,7 @@ void main() { final List output = await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=foo', '--dry-run', ]); @@ -310,7 +310,7 @@ void main() { final List output = await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=$packageName', ]); @@ -330,7 +330,7 @@ void main() { test('with the version and name from the pubspec.yaml', () async { createFakePlugin('foo', packagesDir, examples: []); await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=foo', ]); @@ -348,7 +348,7 @@ void main() { Error? commandError; final List output = await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=foo', ], errorHandler: (Error e) { commandError = e; @@ -375,7 +375,7 @@ void main() { final List output = await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=foo', ]); @@ -398,7 +398,7 @@ void main() { final List output = await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--skip-confirmation', '--packages=foo', ]); @@ -420,8 +420,8 @@ void main() { mockStdin.readLineOutput = 'y'; - final List output = await runCapturingPrint(commandRunner, - ['publish-plugin', '--packages=foo', '--dry-run']); + final List output = await runCapturingPrint( + commandRunner, ['publish', '--packages=foo', '--dry-run']); expect( processRunner.recordedCalls @@ -445,7 +445,7 @@ void main() { final List output = await runCapturingPrint(commandRunner, [ - 'publish-plugin', + 'publish', '--packages=foo', '--remote', 'origin', @@ -491,7 +491,7 @@ void main() { mockStdin.readLineOutput = 'y'; final List output = await runCapturingPrint(commandRunner, - ['publish-plugin', '--all-changed', '--base-sha=HEAD~']); + ['publish', '--all-changed', '--base-sha=HEAD~']); expect( output, @@ -553,7 +553,7 @@ void main() { mockStdin.readLineOutput = 'y'; final List output = await runCapturingPrint(commandRunner, - ['publish-plugin', '--all-changed', '--base-sha=HEAD~']); + ['publish', '--all-changed', '--base-sha=HEAD~']); expect( output, @@ -598,7 +598,7 @@ void main() { final List output = await runCapturingPrint( commandRunner, [ - 'publish-plugin', + 'publish', '--all-changed', '--base-sha=HEAD~', '--dry-run' @@ -651,7 +651,7 @@ void main() { mockStdin.readLineOutput = 'y'; final List output2 = await runCapturingPrint(commandRunner, - ['publish-plugin', '--all-changed', '--base-sha=HEAD~']); + ['publish', '--all-changed', '--base-sha=HEAD~']); expect( output2, containsAllInOrder([ @@ -700,7 +700,7 @@ void main() { mockStdin.readLineOutput = 'y'; final List output2 = await runCapturingPrint(commandRunner, - ['publish-plugin', '--all-changed', '--base-sha=HEAD~']); + ['publish', '--all-changed', '--base-sha=HEAD~']); expect( output2, containsAllInOrder([ @@ -749,7 +749,7 @@ void main() { ]; final List output = await runCapturingPrint(commandRunner, - ['publish-plugin', '--all-changed', '--base-sha=HEAD~']); + ['publish', '--all-changed', '--base-sha=HEAD~']); expect( output, @@ -795,7 +795,7 @@ void main() { Error? commandError; final List output = await runCapturingPrint(commandRunner, - ['publish-plugin', '--all-changed', '--base-sha=HEAD~'], + ['publish', '--all-changed', '--base-sha=HEAD~'], errorHandler: (Error e) { commandError = e; }); @@ -830,7 +830,7 @@ void main() { ]; final List output = await runCapturingPrint(commandRunner, - ['publish-plugin', '--all-changed', '--base-sha=HEAD~']); + ['publish', '--all-changed', '--base-sha=HEAD~']); expect(output, containsAllInOrder(['Ran for 0 package(s)'])); expect( @@ -852,7 +852,7 @@ void main() { ]; final List output = await runCapturingPrint(commandRunner, - ['publish-plugin', '--all-changed', '--base-sha=HEAD~']); + ['publish', '--all-changed', '--base-sha=HEAD~']); expect( output, diff --git a/script/tool/test/update_excerpts_command_test.dart b/script/tool/test/update_excerpts_command_test.dart index 34c85cc172fe..79f53d8779bb 100644 --- a/script/tool/test/update_excerpts_command_test.dart +++ b/script/tool/test/update_excerpts_command_test.dart @@ -12,7 +12,7 @@ import 'package:flutter_plugin_tools/src/update_excerpts_command.dart'; import 'package:mockito/mockito.dart'; import 'package:test/test.dart'; -import 'common/plugin_command_test.mocks.dart'; +import 'common/package_command_test.mocks.dart'; import 'mocks.dart'; import 'util.dart'; diff --git a/script/tool/test/update_release_info_command_test.dart b/script/tool/test/update_release_info_command_test.dart index 7e7ff54d5947..8cd2e9591e70 100644 --- a/script/tool/test/update_release_info_command_test.dart +++ b/script/tool/test/update_release_info_command_test.dart @@ -12,7 +12,7 @@ import 'package:flutter_plugin_tools/src/update_release_info_command.dart'; import 'package:mockito/mockito.dart'; import 'package:test/test.dart'; -import 'common/plugin_command_test.mocks.dart'; +import 'common/package_command_test.mocks.dart'; import 'mocks.dart'; import 'util.dart'; diff --git a/script/tool/test/version_check_command_test.dart b/script/tool/test/version_check_command_test.dart index 0e94712e9ef0..598176bbe209 100644 --- a/script/tool/test/version_check_command_test.dart +++ b/script/tool/test/version_check_command_test.dart @@ -16,7 +16,7 @@ import 'package:mockito/mockito.dart'; import 'package:pub_semver/pub_semver.dart'; import 'package:test/test.dart'; -import 'common/plugin_command_test.mocks.dart'; +import 'common/package_command_test.mocks.dart'; import 'mocks.dart'; import 'util.dart';