From 13f9c85ae6393878a353a834815a41a8fe3ad0b1 Mon Sep 17 00:00:00 2001 From: Sigurd Meldgaard Date: Tue, 16 Jan 2024 11:37:59 +0000 Subject: [PATCH 1/3] Include bare pub command in help_test --- test/help_test.dart | 47 ++++++++++--------- .../testdata/goldens/help_test/pub --help.txt | 47 +++++++++++++++++++ 2 files changed, 72 insertions(+), 22 deletions(-) create mode 100644 test/testdata/goldens/help_test/pub --help.txt diff --git a/test/help_test.dart b/test/help_test.dart index 3e0a0f370..923bc3e4b 100644 --- a/test/help_test.dart +++ b/test/help_test.dart @@ -12,38 +12,41 @@ import 'golden_file.dart'; /// Result will be an iterable of lists, illustrated as follows: /// ``` /// [ -/// [pub] -/// [pub, get] +/// [pub, --help] +/// [pub, get, --help] /// ... /// ] /// ``` -Iterable> _extractCommands( - List parents, - Iterable cmds, -) sync* { - if (parents.isNotEmpty) { - yield parents; +Iterable> _extractCommands() sync* { + // dedup aliases. + Set visitedCommands = {}; + final stack = [PubCommandRunner().commands.values.toList()]; + final parents = []; + while (true) { + final commands = stack.last; + if (commands.isEmpty) { + stack.removeLast(); + yield ['pub', ...parents, '--help']; + if (parents.isEmpty) break; + parents.removeLast(); + } else { + final command = commands.removeLast(); + if (!visitedCommands.add(command)) continue; + if (command.hidden) continue; + stack.add(command.subcommands.values.toList()); + parents.add(command.name); + } } - // Track that we don't add more than once, we don't want to test aliases - final names = {}; - yield* cmds - .where((sub) => !sub.hidden && names.add(sub.name)) - .map( - (sub) => _extractCommands( - [...parents, sub.name], - sub.subcommands.values, - ), - ) - .expand((cmds) => cmds); } /// Tests for `pub ... --help`. Future main() async { - final cmds = _extractCommands([], PubCommandRunner().commands.values); + final cmds = _extractCommands(); + print(cmds.toList()); for (final c in cmds) { - testWithGolden('pub ${c.join(' ')} --help', (ctx) async { + testWithGolden(c.join(' '), (ctx) async { await ctx.run( - [...c, '--help'], + c.skip(1).toList(), environment: { // Use more columns to avoid unintended line breaking. '_PUB_TEST_TERMINAL_COLUMNS': '200', diff --git a/test/testdata/goldens/help_test/pub --help.txt b/test/testdata/goldens/help_test/pub --help.txt new file mode 100644 index 000000000..70ffa8263 --- /dev/null +++ b/test/testdata/goldens/help_test/pub --help.txt @@ -0,0 +1,47 @@ +# GENERATED BY: test/help_test.dart + +## Section 0 +$ pub --help +Pub is a package manager for Dart. + +Usage: pub [arguments] + +Global options: +-h, --help Print this usage information. + --version Print pub version. + --[no-]trace Print debugging information when an error occurs. + --verbosity Control output verbosity. + + [all] Show all output including internal tracing messages. + [error] Show only errors. + [io] Also show IO operations. + [normal] Show errors, warnings, and user messages. + [solver] Show steps during version resolution. + [warning] Show only errors and warnings. + +-v, --verbose Shortcut for "--verbosity=all". + --[no-]color Use colors in terminal output. + Defaults to color when connected to a terminal, and no-color otherwise. +-C, --directory= Run the subcommand in the directory. + (defaults to ".") + +Available commands: + add Add dependencies to `pubspec.yaml`. + cache Work with the system cache. + deps Print package dependencies. + downgrade Downgrade the current package's dependencies to oldest versions. + get Get the current package's dependencies. + global Work with global packages. + login Log into pub.dev. + logout Log out of pub.dev. + outdated Analyze your dependencies to find which ones can be upgraded. + publish Publish the current package to pub.dev. + remove Removes dependencies from `pubspec.yaml`. + run Run an executable from a package. + token Manage authentication tokens for hosted pub repositories. + upgrade Upgrade the current package's dependencies to latest versions. + version Print pub version. + +Run "pub help " for more information about a command. +See https://dart.dev/tools/pub/cmd for detailed documentation. + From 76591645cc9957a6888dd35e04c26bf33b648762 Mon Sep 17 00:00:00 2001 From: Sigurd Meldgaard Date: Thu, 18 Jan 2024 08:42:19 +0000 Subject: [PATCH 2/3] remove print --- test/help_test.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/test/help_test.dart b/test/help_test.dart index 923bc3e4b..1c8676816 100644 --- a/test/help_test.dart +++ b/test/help_test.dart @@ -42,7 +42,6 @@ Iterable> _extractCommands() sync* { /// Tests for `pub ... --help`. Future main() async { final cmds = _extractCommands(); - print(cmds.toList()); for (final c in cmds) { testWithGolden(c.join(' '), (ctx) async { await ctx.run( From b588bf70040d554a95140e94ed54ffe902868fe3 Mon Sep 17 00:00:00 2001 From: Sigurd Meldgaard Date: Mon, 11 Mar 2024 15:17:51 +0000 Subject: [PATCH 3/3] Collect tests --- test/embedding/embedding_test.dart | 59 ++++++++++++++++--- test/help_test.dart | 58 ------------------ .../embedding/embedding_test/pub --help.txt | 32 ++++++++++ .../embedding_test/pub add --help.txt | 48 +++++++++++++++ .../embedding_test/pub cache --help.txt | 16 +++++ .../embedding_test/pub cache add --help.txt | 13 ++++ .../embedding_test/pub cache clean --help.txt | 11 ++++ .../pub cache repair --help.txt | 11 ++++ .../embedding_test/pub deps --help.txt | 18 ++++++ .../embedding_test/pub downgrade --help.txt | 16 +++++ .../embedding_test/pub get --help.txt | 16 +++++ .../embedding_test/pub global --help.txt | 17 ++++++ .../pub global activate --help.txt | 18 ++++++ .../pub global deactivate --help.txt | 10 ++++ .../embedding_test/pub global list --help.txt | 10 ++++ .../embedding_test/pub global run --help.txt | 12 ++++ .../embedding_test/pub login --help.txt | 10 ++++ .../embedding_test/pub logout --help.txt | 10 ++++ .../embedding_test/pub outdated --help.txt | 20 +++++++ .../embedding_test/pub publish --help.txt | 15 +++++ .../embedding_test/pub remove --help.txt | 22 +++++++ .../embedding_test/pub run --help.txt | 15 +++++ .../embedding_test}/pub token --help.txt | 15 +++-- .../embedding_test}/pub token add --help.txt | 13 ++-- .../embedding_test/pub token list --help.txt | 11 ++++ .../pub token remove --help.txt | 12 ++++ .../embedding_test/pub upgrade --help.txt | 17 ++++++ .../embedding_test/pub version --help.txt | 32 ++++++++++ .../testdata/goldens/help_test/pub --help.txt | 47 --------------- .../goldens/help_test/pub add --help.txt | 49 --------------- .../goldens/help_test/pub cache --help.txt | 17 ------ .../help_test/pub cache add --help.txt | 14 ----- .../help_test/pub cache clean --help.txt | 12 ---- .../help_test/pub cache repair --help.txt | 12 ---- .../goldens/help_test/pub deps --help.txt | 19 ------ .../help_test/pub downgrade --help.txt | 17 ------ .../goldens/help_test/pub get --help.txt | 17 ------ .../goldens/help_test/pub global --help.txt | 18 ------ .../help_test/pub global activate --help.txt | 19 ------ .../pub global deactivate --help.txt | 11 ---- .../help_test/pub global list --help.txt | 11 ---- .../help_test/pub global run --help.txt | 13 ---- .../goldens/help_test/pub login --help.txt | 11 ---- .../goldens/help_test/pub logout --help.txt | 11 ---- .../goldens/help_test/pub outdated --help.txt | 21 ------- .../goldens/help_test/pub publish --help.txt | 16 ----- .../goldens/help_test/pub remove --help.txt | 23 -------- .../goldens/help_test/pub run --help.txt | 16 ----- .../help_test/pub token list --help.txt | 12 ---- .../help_test/pub token remove --help.txt | 13 ---- .../goldens/help_test/pub upgrade --help.txt | 18 ------ .../goldens/help_test/pub version --help.txt | 11 ---- 52 files changed, 476 insertions(+), 509 deletions(-) delete mode 100644 test/help_test.dart create mode 100644 test/testdata/goldens/embedding/embedding_test/pub --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub add --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub cache --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub cache add --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub cache clean --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub cache repair --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub deps --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub downgrade --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub get --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub global --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub global activate --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub global deactivate --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub global list --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub global run --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub login --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub logout --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub outdated --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub publish --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub remove --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub run --help.txt rename test/testdata/goldens/{help_test => embedding/embedding_test}/pub token --help.txt (55%) rename test/testdata/goldens/{help_test => embedding/embedding_test}/pub token add --help.txt (55%) create mode 100644 test/testdata/goldens/embedding/embedding_test/pub token list --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub token remove --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub upgrade --help.txt create mode 100644 test/testdata/goldens/embedding/embedding_test/pub version --help.txt delete mode 100644 test/testdata/goldens/help_test/pub --help.txt delete mode 100644 test/testdata/goldens/help_test/pub add --help.txt delete mode 100644 test/testdata/goldens/help_test/pub cache --help.txt delete mode 100644 test/testdata/goldens/help_test/pub cache add --help.txt delete mode 100644 test/testdata/goldens/help_test/pub cache clean --help.txt delete mode 100644 test/testdata/goldens/help_test/pub cache repair --help.txt delete mode 100644 test/testdata/goldens/help_test/pub deps --help.txt delete mode 100644 test/testdata/goldens/help_test/pub downgrade --help.txt delete mode 100644 test/testdata/goldens/help_test/pub get --help.txt delete mode 100644 test/testdata/goldens/help_test/pub global --help.txt delete mode 100644 test/testdata/goldens/help_test/pub global activate --help.txt delete mode 100644 test/testdata/goldens/help_test/pub global deactivate --help.txt delete mode 100644 test/testdata/goldens/help_test/pub global list --help.txt delete mode 100644 test/testdata/goldens/help_test/pub global run --help.txt delete mode 100644 test/testdata/goldens/help_test/pub login --help.txt delete mode 100644 test/testdata/goldens/help_test/pub logout --help.txt delete mode 100644 test/testdata/goldens/help_test/pub outdated --help.txt delete mode 100644 test/testdata/goldens/help_test/pub publish --help.txt delete mode 100644 test/testdata/goldens/help_test/pub remove --help.txt delete mode 100644 test/testdata/goldens/help_test/pub run --help.txt delete mode 100644 test/testdata/goldens/help_test/pub token list --help.txt delete mode 100644 test/testdata/goldens/help_test/pub token remove --help.txt delete mode 100644 test/testdata/goldens/help_test/pub upgrade --help.txt delete mode 100644 test/testdata/goldens/help_test/pub version --help.txt diff --git a/test/embedding/embedding_test.dart b/test/embedding/embedding_test.dart index fc4506ba4..23335579c 100644 --- a/test/embedding/embedding_test.dart +++ b/test/embedding/embedding_test.dart @@ -4,7 +4,9 @@ import 'dart:io'; +import 'package:args/command_runner.dart'; import 'package:path/path.dart' as p; +import 'package:pub/src/command_runner.dart'; import 'package:pub/src/exit_codes.dart'; import 'package:pub/src/io.dart' show EnvironmentKeys; import 'package:test/test.dart'; @@ -66,7 +68,7 @@ extension on GoldenTestContext { Future runEmbedding( List args, { String? workingDirectory, - Map? environment, + Map? environment, dynamic exitCode = 0, }) async { final buffer = StringBuffer(); @@ -196,13 +198,22 @@ main() { expect(buffer.toString(), contains('FINE: Pub 3.1.2+3')); }); - testWithGolden('--help', (context) async { - await servePackages(); - await context.runEmbedding( - ['pub', '--help'], - workingDirectory: d.path('.'), - ); - }); + final cmds = _extractCommands(); + for (final c in cmds) { + testWithGolden(c.join(' '), (ctx) async { + await servePackages(); + await ctx.runEmbedding( + c.toList(), + environment: { + // Use more columns to avoid unintended line breaking. + '_PUB_TEST_TERMINAL_COLUMNS': '200', + 'HOME': null, + 'PUB_CACHE': null, + }, + workingDirectory: d.path('.'), + ); + }); + } testWithGolden('--color forces colors', (context) async { final server = await servePackages(); @@ -501,3 +512,35 @@ String _filter(String input) { (match) => match[1]!, ); } + +/// Extract all commands and subcommands. +/// +/// Result will be an iterable of lists, illustrated as follows: +/// ``` +/// [ +/// [pub, --help] +/// [pub, get, --help] +/// ... +/// ] +/// ``` +Iterable> _extractCommands() sync* { + // dedup aliases. + Set visitedCommands = {}; + final stack = [PubCommandRunner().commands.values.toList()]; + final parents = []; + while (true) { + final commands = stack.last; + if (commands.isEmpty) { + stack.removeLast(); + yield ['pub', ...parents, '--help']; + if (parents.isEmpty) break; + parents.removeLast(); + } else { + final command = commands.removeLast(); + if (!visitedCommands.add(command)) continue; + if (command.hidden) continue; + stack.add(command.subcommands.values.toList()); + parents.add(command.name); + } + } +} diff --git a/test/help_test.dart b/test/help_test.dart deleted file mode 100644 index 1c8676816..000000000 --- a/test/help_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'package:args/command_runner.dart'; -import 'package:pub/src/command_runner.dart' show PubCommandRunner; - -import 'golden_file.dart'; - -/// Extract all commands and subcommands. -/// -/// Result will be an iterable of lists, illustrated as follows: -/// ``` -/// [ -/// [pub, --help] -/// [pub, get, --help] -/// ... -/// ] -/// ``` -Iterable> _extractCommands() sync* { - // dedup aliases. - Set visitedCommands = {}; - final stack = [PubCommandRunner().commands.values.toList()]; - final parents = []; - while (true) { - final commands = stack.last; - if (commands.isEmpty) { - stack.removeLast(); - yield ['pub', ...parents, '--help']; - if (parents.isEmpty) break; - parents.removeLast(); - } else { - final command = commands.removeLast(); - if (!visitedCommands.add(command)) continue; - if (command.hidden) continue; - stack.add(command.subcommands.values.toList()); - parents.add(command.name); - } - } -} - -/// Tests for `pub ... --help`. -Future main() async { - final cmds = _extractCommands(); - for (final c in cmds) { - testWithGolden(c.join(' '), (ctx) async { - await ctx.run( - c.skip(1).toList(), - environment: { - // Use more columns to avoid unintended line breaking. - '_PUB_TEST_TERMINAL_COLUMNS': '200', - 'HOME': null, - 'PUB_CACHE': null, - }, - ); - }); - } -} diff --git a/test/testdata/goldens/embedding/embedding_test/pub --help.txt b/test/testdata/goldens/embedding/embedding_test/pub --help.txt new file mode 100644 index 000000000..dbdf137f1 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub --help.txt @@ -0,0 +1,32 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub --help +Work with packages. + +Usage: pub_command_runner pub [arguments...] +-h, --help Print this usage information. +-v, --verbose Print detailed logging. + --[no-]color Use colors in terminal output. + Defaults to color when connected to a terminal, and no-color otherwise. +-C, --directory= Run the subcommand in the directory. + (defaults to ".") + +Available subcommands: + add Add dependencies to `pubspec.yaml`. + cache Work with the system cache. + deps Print package dependencies. + downgrade Downgrade the current package's dependencies to oldest versions. + fail Throws an exception + get Get the current package's dependencies. + global Work with global packages. + login Log into pub.dev. + logout Log out of pub.dev. + outdated Analyze your dependencies to find which ones can be upgraded. + publish Publish the current package to pub.dev. + remove Removes dependencies from `pubspec.yaml`. + token Manage authentication tokens for hosted pub repositories. + upgrade Upgrade the current package's dependencies to latest versions. + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-global for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub add --help.txt b/test/testdata/goldens/embedding/embedding_test/pub add --help.txt new file mode 100644 index 000000000..7edf0908a --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub add --help.txt @@ -0,0 +1,48 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub add --help +Add dependencies to `pubspec.yaml`. + +Invoking `dart pub add foo bar` will add `foo` and `bar` to `pubspec.yaml` +with a default constraint derived from latest compatible version. + +Add to dev_dependencies by prefixing with "dev:". + +Make dependency overrides by prefixing with "override:". + +Add packages with specific constraints or other sources by giving a descriptor +after a colon. + +For example: + * Add a hosted dependency at newest compatible stable version: + `dart pub add foo` + * Add a hosted dev dependency at newest compatible stable version: + `dart pub add dev:foo` + * Add a hosted dependency with the given constraint + `dart pub add foo:^1.2.3` + * Add multiple dependencies: + `dart pub add foo dev:bar` + * Add a path dependency: + `dart pub add 'foo:{"path":"../foo"}'` + * Add a hosted dependency: + `dart pub add 'foo:{"hosted":"my-pub.dev"}'` + * Add an sdk dependency: + `dart pub add 'foo:{"sdk":"flutter"}'` + * Add a git dependency: + `dart pub add 'foo:{"git":"https://github.com/foo/foo"}'` + * Add a dependency override: + `dart pub add 'override:foo:1.0.0'` + * Add a git dependency with a path and ref specified: + `dart pub add \ + 'foo:{"git":{"url":"../foo.git","ref":"","path":""}}'` + +Usage: pub_command_runner pub add [options] [
:][:descriptor] [
:][:descriptor] ...] +-h, --help Print this usage information. + --[no-]offline Use cached packages instead of accessing the network. +-n, --dry-run Report what dependencies would change but don't change any. + --[no-]precompile Build executables in immediate dependencies. +-C, --directory= Run this in the directory . + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-add for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub cache --help.txt b/test/testdata/goldens/embedding/embedding_test/pub cache --help.txt new file mode 100644 index 000000000..fe36d3dc8 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub cache --help.txt @@ -0,0 +1,16 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub cache --help +Work with the system cache. + +Usage: pub_command_runner pub cache [arguments...] +-h, --help Print this usage information. + +Available subcommands: + add Install a package. + clean Clears the global PUB_CACHE. + repair Reinstall cached packages. + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-cache for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub cache add --help.txt b/test/testdata/goldens/embedding/embedding_test/pub cache add --help.txt new file mode 100644 index 000000000..19adfbf7d --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub cache add --help.txt @@ -0,0 +1,13 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub cache add --help +Install a package. + +Usage: pub_command_runner pub cache add [--version ] [--all] +-h, --help Print this usage information. + --all Install all matching versions. +-v, --version Version constraint. + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-cache for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub cache clean --help.txt b/test/testdata/goldens/embedding/embedding_test/pub cache clean --help.txt new file mode 100644 index 000000000..2fe0c5e37 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub cache clean --help.txt @@ -0,0 +1,11 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub cache clean --help +Clears the global PUB_CACHE. + +Usage: pub_command_runner pub cache clean [arguments...] +-h, --help Print this usage information. +-f, --force Don't ask for confirmation. + +Run "pub_command_runner help" to see global options. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub cache repair --help.txt b/test/testdata/goldens/embedding/embedding_test/pub cache repair --help.txt new file mode 100644 index 000000000..ed67940c5 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub cache repair --help.txt @@ -0,0 +1,11 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub cache repair --help +Reinstall cached packages. + +Usage: pub_command_runner pub cache repair [arguments...] +-h, --help Print this usage information. + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-cache for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub deps --help.txt b/test/testdata/goldens/embedding/embedding_test/pub deps --help.txt new file mode 100644 index 000000000..032bfc6c7 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub deps --help.txt @@ -0,0 +1,18 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub deps --help +Print package dependencies. + +Usage: pub_command_runner pub deps [arguments...] +-h, --help Print this usage information. +-s, --style How output should be displayed. + [compact, tree (default), list] + --[no-]dev Whether to include dev dependencies. + (defaults to on) + --executables List all available executables. + --json Output dependency information in a json format. +-C, --directory= Run this in the directory . + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-deps for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub downgrade --help.txt b/test/testdata/goldens/embedding/embedding_test/pub downgrade --help.txt new file mode 100644 index 000000000..a308a67ea --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub downgrade --help.txt @@ -0,0 +1,16 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub downgrade --help +Downgrade the current package's dependencies to oldest versions. + + + +Usage: pub_command_runner pub downgrade [dependencies...] +-h, --help Print this usage information. + --[no-]offline Use cached packages instead of accessing the network. +-n, --dry-run Report what dependencies would change but don't change any. +-C, --directory= Run this in the directory . + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-downgrade for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub get --help.txt b/test/testdata/goldens/embedding/embedding_test/pub get --help.txt new file mode 100644 index 000000000..f0bf18e8a --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub get --help.txt @@ -0,0 +1,16 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub get --help +Get the current package's dependencies. + +Usage: pub_command_runner pub get +-h, --help Print this usage information. + --[no-]offline Use cached packages instead of accessing the network. +-n, --dry-run Report what dependencies would change but don't change any. + --enforce-lockfile Enforce pubspec.lock. Fail resolution if pubspec.lock does not satisfy pubspec.yaml + --[no-]precompile Build executables in immediate dependencies. +-C, --directory= Run this in the directory . + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-get for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub global --help.txt b/test/testdata/goldens/embedding/embedding_test/pub global --help.txt new file mode 100644 index 000000000..59a69abed --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub global --help.txt @@ -0,0 +1,17 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub global --help +Work with global packages. + +Usage: pub_command_runner pub global [arguments...] +-h, --help Print this usage information. + +Available subcommands: + activate Make a package's executables globally available. + deactivate Remove a previously activated package. + list List globally activated packages. + run Run an executable from a globally activated package. + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-global for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub global activate --help.txt b/test/testdata/goldens/embedding/embedding_test/pub global activate --help.txt new file mode 100644 index 000000000..15bf5b095 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub global activate --help.txt @@ -0,0 +1,18 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub global activate --help +Make a package's executables globally available. + +Usage: pub_command_runner pub global activate [version-constraint] +-h, --help Print this usage information. +-s, --source The source used to find the package. + [git, hosted (default), path] + --git-path Path of git package in repository + --git-ref Git branch or commit to be retrieved + --no-executables Do not put executables on PATH. +-x, --executable Executable(s) to place on PATH. + --overwrite Overwrite executables from other packages with the same name. +-u, --hosted-url A custom pub server URL for the package. Only applies when using the `hosted` source. + +Run "pub_command_runner help" to see global options. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub global deactivate --help.txt b/test/testdata/goldens/embedding/embedding_test/pub global deactivate --help.txt new file mode 100644 index 000000000..79e997029 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub global deactivate --help.txt @@ -0,0 +1,10 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub global deactivate --help +Remove a previously activated package. + +Usage: pub_command_runner pub global deactivate +-h, --help Print this usage information. + +Run "pub_command_runner help" to see global options. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub global list --help.txt b/test/testdata/goldens/embedding/embedding_test/pub global list --help.txt new file mode 100644 index 000000000..a06b7f1c3 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub global list --help.txt @@ -0,0 +1,10 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub global list --help +List globally activated packages. + +Usage: pub_command_runner pub global list [arguments...] +-h, --help Print this usage information. + +Run "pub_command_runner help" to see global options. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub global run --help.txt b/test/testdata/goldens/embedding/embedding_test/pub global run --help.txt new file mode 100644 index 000000000..1ad96c9b8 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub global run --help.txt @@ -0,0 +1,12 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub global run --help +Run an executable from a globally activated package. + +Usage: pub_command_runner pub global run : [args...] +-h, --help Print this usage information. + --[no-]enable-asserts Enable assert statements. + --enable-experiment= Runs the executable in a VM with the given experiments enabled. (Will disable snapshotting, resulting in slower startup). + +Run "pub_command_runner help" to see global options. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub login --help.txt b/test/testdata/goldens/embedding/embedding_test/pub login --help.txt new file mode 100644 index 000000000..a0068efb2 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub login --help.txt @@ -0,0 +1,10 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub login --help +Log into pub.dev. + +Usage: pub login +-h, --help Print this usage information. + +Run "pub_command_runner help" to see global options. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub logout --help.txt b/test/testdata/goldens/embedding/embedding_test/pub logout --help.txt new file mode 100644 index 000000000..3d26fa0f7 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub logout --help.txt @@ -0,0 +1,10 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub logout --help +Log out of pub.dev. + +Usage: pub_command_runner pub logout [arguments...] +-h, --help Print this usage information. + +Run "pub_command_runner help" to see global options. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub outdated --help.txt b/test/testdata/goldens/embedding/embedding_test/pub outdated --help.txt new file mode 100644 index 000000000..c169ea6e1 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub outdated --help.txt @@ -0,0 +1,20 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub outdated --help +Analyze your dependencies to find which ones can be upgraded. + +Usage: pub_command_runner pub outdated [options] +-h, --help Print this usage information. + --[no-]dependency-overrides Show resolutions with `dependency_overrides`. + (defaults to on) + --[no-]dev-dependencies Take dev dependencies into account. + (defaults to on) + --json Output the results using a json format. + --[no-]prereleases Include prereleases in latest version. + --[no-]show-all Include dependencies that are already fulfilling --mode. + --[no-]transitive Show transitive dependencies. +-C, --directory= Run this in the directory . + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-outdated for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub publish --help.txt b/test/testdata/goldens/embedding/embedding_test/pub publish --help.txt new file mode 100644 index 000000000..30028912e --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub publish --help.txt @@ -0,0 +1,15 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub publish --help +Publish the current package to pub.dev. + +Usage: pub_command_runner pub publish [options] +-h, --help Print this usage information. +-n, --dry-run Validate but do not publish the package. +-f, --force Publish without confirmation if there are no errors. + --skip-validation Publish without validation and resolution (this will ignore errors). +-C, --directory= Run this in the directory . + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-lish for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub remove --help.txt b/test/testdata/goldens/embedding/embedding_test/pub remove --help.txt new file mode 100644 index 000000000..ab1c2b056 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub remove --help.txt @@ -0,0 +1,22 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub remove --help +Removes dependencies from `pubspec.yaml`. + +Invoking `dart pub remove foo bar` will remove `foo` and `bar` from either +`dependencies` or `dev_dependencies` in `pubspec.yaml`. + +To remove a dependency override of a package prefix the package name with +'override:'. + + +Usage: pub_command_runner pub remove [...] +-h, --help Print this usage information. + --[no-]offline Use cached packages instead of accessing the network. +-n, --dry-run Report what dependencies would change but don't change any. + --[no-]precompile Precompile executables in immediate dependencies. +-C, --directory= Run this in the directory . + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-remove for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub run --help.txt b/test/testdata/goldens/embedding/embedding_test/pub run --help.txt new file mode 100644 index 000000000..b755032b2 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub run --help.txt @@ -0,0 +1,15 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub run --help +Run an executable from a package. + +Usage: pub_command_runner pub run [arguments...] +-h, --help Print this usage information. + --[no-]enable-asserts Enable assert statements. + --enable-experiment= Runs the executable in a VM with the given experiments enabled. + (Will disable snapshotting, resulting in slower startup). +-C, --directory= Run this in the directory . + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-run for detailed documentation. + diff --git a/test/testdata/goldens/help_test/pub token --help.txt b/test/testdata/goldens/embedding/embedding_test/pub token --help.txt similarity index 55% rename from test/testdata/goldens/help_test/pub token --help.txt rename to test/testdata/goldens/embedding/embedding_test/pub token --help.txt index 9f29282c2..2567a5083 100644 --- a/test/testdata/goldens/help_test/pub token --help.txt +++ b/test/testdata/goldens/embedding/embedding_test/pub token --help.txt @@ -1,7 +1,6 @@ -# GENERATED BY: test/help_test.dart +# GENERATED BY: test/embedding/embedding_test.dart -## Section 0 -$ pub token --help +$ tool/test-bin/pub_command_runner.dart pub token --help Manage authentication tokens for hosted pub repositories. The tokens will be used for authorizing both when retrieving dependencies and @@ -11,14 +10,14 @@ Tokens are stored in `$SANDBOX/.config/dart/pub-tokens.json`. For interactive authorization against pub.dev, use `dart pub login`. -Usage: pub token [arguments...] --h, --help Print this usage information. +Usage: pub_command_runner pub token [arguments...] +-h, --help Print this usage information. Available subcommands: - add Add an authentication token for a package repository. - list List servers for which a token exists. + add Add an authentication token for a package repository. + list List servers for which a token exists. remove Remove secret token for package repository at . -Run "pub help" to see global options. +Run "pub_command_runner help" to see global options. See https://dart.dev/tools/pub/cmd/pub-token for detailed documentation. diff --git a/test/testdata/goldens/help_test/pub token add --help.txt b/test/testdata/goldens/embedding/embedding_test/pub token add --help.txt similarity index 55% rename from test/testdata/goldens/help_test/pub token add --help.txt rename to test/testdata/goldens/embedding/embedding_test/pub token add --help.txt index d3e611d74..688b26d52 100644 --- a/test/testdata/goldens/help_test/pub token add --help.txt +++ b/test/testdata/goldens/embedding/embedding_test/pub token add --help.txt @@ -1,7 +1,6 @@ -# GENERATED BY: test/help_test.dart +# GENERATED BY: test/embedding/embedding_test.dart -## Section 0 -$ pub token add --help +$ tool/test-bin/pub_command_runner.dart pub token add --help Add an authentication token for a package repository. The token will be used for authorizing against both when @@ -14,10 +13,10 @@ This command will prompt for the secret token over stdin. For interactive authorization against pub.dev, use `dart pub login`. -Usage: pub token add [options] --h, --help Print this usage information. - --env-var= Read the secret token from this environment variable when making requests. +Usage: pub_command_runner pub token add [options] +-h, --help Print this usage information. + --env-var= Read the secret token from this environment variable when making requests. -Run "pub help" to see global options. +Run "pub_command_runner help" to see global options. See https://dart.dev/tools/pub/cmd/pub-token for detailed documentation. diff --git a/test/testdata/goldens/embedding/embedding_test/pub token list --help.txt b/test/testdata/goldens/embedding/embedding_test/pub token list --help.txt new file mode 100644 index 000000000..8b5d559ea --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub token list --help.txt @@ -0,0 +1,11 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub token list --help +List servers for which a token exists. + +Usage: pub_command_runner pub token list [arguments...] +-h, --help Print this usage information. + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-token for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub token remove --help.txt b/test/testdata/goldens/embedding/embedding_test/pub token remove --help.txt new file mode 100644 index 000000000..6c64784c9 --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub token remove --help.txt @@ -0,0 +1,12 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub token remove --help +Remove secret token for package repository at . + +Usage: pub_command_runner pub token remove | --all +-h, --help Print this usage information. + --all Remove all secret tokens. + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-token for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub upgrade --help.txt b/test/testdata/goldens/embedding/embedding_test/pub upgrade --help.txt new file mode 100644 index 000000000..76eff650d --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub upgrade --help.txt @@ -0,0 +1,17 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub upgrade --help +Upgrade the current package's dependencies to latest versions. + +Usage: pub_command_runner pub upgrade [dependencies...] +-h, --help Print this usage information. + --[no-]offline Use cached packages instead of accessing the network. +-n, --dry-run Report what dependencies would change but don't change any. + --[no-]precompile Precompile executables in immediate dependencies. + --tighten Updates lower bounds in pubspec.yaml to match the resolved version. + --major-versions Upgrades packages to their latest resolvable versions, and updates pubspec.yaml. +-C, --directory= Run this in the directory . + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-upgrade for detailed documentation. + diff --git a/test/testdata/goldens/embedding/embedding_test/pub version --help.txt b/test/testdata/goldens/embedding/embedding_test/pub version --help.txt new file mode 100644 index 000000000..2ba22ca6a --- /dev/null +++ b/test/testdata/goldens/embedding/embedding_test/pub version --help.txt @@ -0,0 +1,32 @@ +# GENERATED BY: test/embedding/embedding_test.dart + +$ tool/test-bin/pub_command_runner.dart pub version --help +Work with packages. + +Usage: pub_command_runner pub [arguments...] +-h, --help Print this usage information. +-v, --verbose Print detailed logging. + --[no-]color Use colors in terminal output. + Defaults to color when connected to a terminal, and no-color otherwise. +-C, --directory= Run the subcommand in the directory. + (defaults to ".") + +Available subcommands: + add Add dependencies to `pubspec.yaml`. + cache Work with the system cache. + deps Print package dependencies. + downgrade Downgrade the current package's dependencies to oldest versions. + fail Throws an exception + get Get the current package's dependencies. + global Work with global packages. + login Log into pub.dev. + logout Log out of pub.dev. + outdated Analyze your dependencies to find which ones can be upgraded. + publish Publish the current package to pub.dev. + remove Removes dependencies from `pubspec.yaml`. + token Manage authentication tokens for hosted pub repositories. + upgrade Upgrade the current package's dependencies to latest versions. + +Run "pub_command_runner help" to see global options. +See https://dart.dev/tools/pub/cmd/pub-global for detailed documentation. + diff --git a/test/testdata/goldens/help_test/pub --help.txt b/test/testdata/goldens/help_test/pub --help.txt deleted file mode 100644 index 70ffa8263..000000000 --- a/test/testdata/goldens/help_test/pub --help.txt +++ /dev/null @@ -1,47 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub --help -Pub is a package manager for Dart. - -Usage: pub [arguments] - -Global options: --h, --help Print this usage information. - --version Print pub version. - --[no-]trace Print debugging information when an error occurs. - --verbosity Control output verbosity. - - [all] Show all output including internal tracing messages. - [error] Show only errors. - [io] Also show IO operations. - [normal] Show errors, warnings, and user messages. - [solver] Show steps during version resolution. - [warning] Show only errors and warnings. - --v, --verbose Shortcut for "--verbosity=all". - --[no-]color Use colors in terminal output. - Defaults to color when connected to a terminal, and no-color otherwise. --C, --directory= Run the subcommand in the directory. - (defaults to ".") - -Available commands: - add Add dependencies to `pubspec.yaml`. - cache Work with the system cache. - deps Print package dependencies. - downgrade Downgrade the current package's dependencies to oldest versions. - get Get the current package's dependencies. - global Work with global packages. - login Log into pub.dev. - logout Log out of pub.dev. - outdated Analyze your dependencies to find which ones can be upgraded. - publish Publish the current package to pub.dev. - remove Removes dependencies from `pubspec.yaml`. - run Run an executable from a package. - token Manage authentication tokens for hosted pub repositories. - upgrade Upgrade the current package's dependencies to latest versions. - version Print pub version. - -Run "pub help " for more information about a command. -See https://dart.dev/tools/pub/cmd for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub add --help.txt b/test/testdata/goldens/help_test/pub add --help.txt deleted file mode 100644 index 5c4f71b42..000000000 --- a/test/testdata/goldens/help_test/pub add --help.txt +++ /dev/null @@ -1,49 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub add --help -Add dependencies to `pubspec.yaml`. - -Invoking `dart pub add foo bar` will add `foo` and `bar` to `pubspec.yaml` -with a default constraint derived from latest compatible version. - -Add to dev_dependencies by prefixing with "dev:". - -Make dependency overrides by prefixing with "override:". - -Add packages with specific constraints or other sources by giving a descriptor -after a colon. - -For example: - * Add a hosted dependency at newest compatible stable version: - `dart pub add foo` - * Add a hosted dev dependency at newest compatible stable version: - `dart pub add dev:foo` - * Add a hosted dependency with the given constraint - `dart pub add foo:^1.2.3` - * Add multiple dependencies: - `dart pub add foo dev:bar` - * Add a path dependency: - `dart pub add 'foo:{"path":"../foo"}'` - * Add a hosted dependency: - `dart pub add 'foo:{"hosted":"my-pub.dev"}'` - * Add an sdk dependency: - `dart pub add 'foo:{"sdk":"flutter"}'` - * Add a git dependency: - `dart pub add 'foo:{"git":"https://github.com/foo/foo"}'` - * Add a dependency override: - `dart pub add 'override:foo:1.0.0'` - * Add a git dependency with a path and ref specified: - `dart pub add \ - 'foo:{"git":{"url":"../foo.git","ref":"","path":""}}'` - -Usage: pub add [options] [
:][:descriptor] [
:][:descriptor] ...] --h, --help Print this usage information. - --[no-]offline Use cached packages instead of accessing the network. --n, --dry-run Report what dependencies would change but don't change any. - --[no-]precompile Build executables in immediate dependencies. --C, --directory= Run this in the directory . - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-add for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub cache --help.txt b/test/testdata/goldens/help_test/pub cache --help.txt deleted file mode 100644 index fdb0b2c09..000000000 --- a/test/testdata/goldens/help_test/pub cache --help.txt +++ /dev/null @@ -1,17 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub cache --help -Work with the system cache. - -Usage: pub cache [arguments...] --h, --help Print this usage information. - -Available subcommands: - add Install a package. - clean Clears the global PUB_CACHE. - repair Reinstall cached packages. - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-cache for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub cache add --help.txt b/test/testdata/goldens/help_test/pub cache add --help.txt deleted file mode 100644 index 05068f0f9..000000000 --- a/test/testdata/goldens/help_test/pub cache add --help.txt +++ /dev/null @@ -1,14 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub cache add --help -Install a package. - -Usage: pub cache add [--version ] [--all] --h, --help Print this usage information. - --all Install all matching versions. --v, --version Version constraint. - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-cache for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub cache clean --help.txt b/test/testdata/goldens/help_test/pub cache clean --help.txt deleted file mode 100644 index 71dd1d63a..000000000 --- a/test/testdata/goldens/help_test/pub cache clean --help.txt +++ /dev/null @@ -1,12 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub cache clean --help -Clears the global PUB_CACHE. - -Usage: pub cache clean [arguments...] --h, --help Print this usage information. --f, --force Don't ask for confirmation. - -Run "pub help" to see global options. - diff --git a/test/testdata/goldens/help_test/pub cache repair --help.txt b/test/testdata/goldens/help_test/pub cache repair --help.txt deleted file mode 100644 index ac0911530..000000000 --- a/test/testdata/goldens/help_test/pub cache repair --help.txt +++ /dev/null @@ -1,12 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub cache repair --help -Reinstall cached packages. - -Usage: pub cache repair [arguments...] --h, --help Print this usage information. - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-cache for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub deps --help.txt b/test/testdata/goldens/help_test/pub deps --help.txt deleted file mode 100644 index 3e8e27e14..000000000 --- a/test/testdata/goldens/help_test/pub deps --help.txt +++ /dev/null @@ -1,19 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub deps --help -Print package dependencies. - -Usage: pub deps [arguments...] --h, --help Print this usage information. --s, --style How output should be displayed. - [compact, tree (default), list] - --[no-]dev Whether to include dev dependencies. - (defaults to on) - --executables List all available executables. - --json Output dependency information in a json format. --C, --directory= Run this in the directory . - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-deps for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub downgrade --help.txt b/test/testdata/goldens/help_test/pub downgrade --help.txt deleted file mode 100644 index 483e764d5..000000000 --- a/test/testdata/goldens/help_test/pub downgrade --help.txt +++ /dev/null @@ -1,17 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub downgrade --help -Downgrade the current package's dependencies to oldest versions. - - - -Usage: pub downgrade [dependencies...] --h, --help Print this usage information. - --[no-]offline Use cached packages instead of accessing the network. --n, --dry-run Report what dependencies would change but don't change any. --C, --directory= Run this in the directory . - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-downgrade for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub get --help.txt b/test/testdata/goldens/help_test/pub get --help.txt deleted file mode 100644 index f2ee2fbc3..000000000 --- a/test/testdata/goldens/help_test/pub get --help.txt +++ /dev/null @@ -1,17 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub get --help -Get the current package's dependencies. - -Usage: pub get --h, --help Print this usage information. - --[no-]offline Use cached packages instead of accessing the network. --n, --dry-run Report what dependencies would change but don't change any. - --enforce-lockfile Enforce pubspec.lock. Fail resolution if pubspec.lock does not satisfy pubspec.yaml - --[no-]precompile Build executables in immediate dependencies. --C, --directory= Run this in the directory . - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-get for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub global --help.txt b/test/testdata/goldens/help_test/pub global --help.txt deleted file mode 100644 index 6aa723c89..000000000 --- a/test/testdata/goldens/help_test/pub global --help.txt +++ /dev/null @@ -1,18 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub global --help -Work with global packages. - -Usage: pub global [arguments...] --h, --help Print this usage information. - -Available subcommands: - activate Make a package's executables globally available. - deactivate Remove a previously activated package. - list List globally activated packages. - run Run an executable from a globally activated package. - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-global for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub global activate --help.txt b/test/testdata/goldens/help_test/pub global activate --help.txt deleted file mode 100644 index 75fbc3da5..000000000 --- a/test/testdata/goldens/help_test/pub global activate --help.txt +++ /dev/null @@ -1,19 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub global activate --help -Make a package's executables globally available. - -Usage: pub global activate [version-constraint] --h, --help Print this usage information. --s, --source The source used to find the package. - [git, hosted (default), path] - --git-path Path of git package in repository - --git-ref Git branch or commit to be retrieved - --no-executables Do not put executables on PATH. --x, --executable Executable(s) to place on PATH. - --overwrite Overwrite executables from other packages with the same name. --u, --hosted-url A custom pub server URL for the package. Only applies when using the `hosted` source. - -Run "pub help" to see global options. - diff --git a/test/testdata/goldens/help_test/pub global deactivate --help.txt b/test/testdata/goldens/help_test/pub global deactivate --help.txt deleted file mode 100644 index 8b8178b77..000000000 --- a/test/testdata/goldens/help_test/pub global deactivate --help.txt +++ /dev/null @@ -1,11 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub global deactivate --help -Remove a previously activated package. - -Usage: pub global deactivate --h, --help Print this usage information. - -Run "pub help" to see global options. - diff --git a/test/testdata/goldens/help_test/pub global list --help.txt b/test/testdata/goldens/help_test/pub global list --help.txt deleted file mode 100644 index 12244be04..000000000 --- a/test/testdata/goldens/help_test/pub global list --help.txt +++ /dev/null @@ -1,11 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub global list --help -List globally activated packages. - -Usage: pub global list [arguments...] --h, --help Print this usage information. - -Run "pub help" to see global options. - diff --git a/test/testdata/goldens/help_test/pub global run --help.txt b/test/testdata/goldens/help_test/pub global run --help.txt deleted file mode 100644 index df01700fb..000000000 --- a/test/testdata/goldens/help_test/pub global run --help.txt +++ /dev/null @@ -1,13 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub global run --help -Run an executable from a globally activated package. - -Usage: pub global run : [args...] --h, --help Print this usage information. - --[no-]enable-asserts Enable assert statements. - --enable-experiment= Runs the executable in a VM with the given experiments enabled. (Will disable snapshotting, resulting in slower startup). - -Run "pub help" to see global options. - diff --git a/test/testdata/goldens/help_test/pub login --help.txt b/test/testdata/goldens/help_test/pub login --help.txt deleted file mode 100644 index ce7233b40..000000000 --- a/test/testdata/goldens/help_test/pub login --help.txt +++ /dev/null @@ -1,11 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub login --help -Log into pub.dev. - -Usage: pub login --h, --help Print this usage information. - -Run "pub help" to see global options. - diff --git a/test/testdata/goldens/help_test/pub logout --help.txt b/test/testdata/goldens/help_test/pub logout --help.txt deleted file mode 100644 index 3937ef71e..000000000 --- a/test/testdata/goldens/help_test/pub logout --help.txt +++ /dev/null @@ -1,11 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub logout --help -Log out of pub.dev. - -Usage: pub logout [arguments...] --h, --help Print this usage information. - -Run "pub help" to see global options. - diff --git a/test/testdata/goldens/help_test/pub outdated --help.txt b/test/testdata/goldens/help_test/pub outdated --help.txt deleted file mode 100644 index ba6b13a61..000000000 --- a/test/testdata/goldens/help_test/pub outdated --help.txt +++ /dev/null @@ -1,21 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub outdated --help -Analyze your dependencies to find which ones can be upgraded. - -Usage: pub outdated [options] --h, --help Print this usage information. - --[no-]dependency-overrides Show resolutions with `dependency_overrides`. - (defaults to on) - --[no-]dev-dependencies Take dev dependencies into account. - (defaults to on) - --json Output the results using a json format. - --[no-]prereleases Include prereleases in latest version. - --[no-]show-all Include dependencies that are already fulfilling --mode. - --[no-]transitive Show transitive dependencies. --C, --directory= Run this in the directory . - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-outdated for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub publish --help.txt b/test/testdata/goldens/help_test/pub publish --help.txt deleted file mode 100644 index 30ebb0163..000000000 --- a/test/testdata/goldens/help_test/pub publish --help.txt +++ /dev/null @@ -1,16 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub publish --help -Publish the current package to pub.dev. - -Usage: pub publish [options] --h, --help Print this usage information. --n, --dry-run Validate but do not publish the package. --f, --force Publish without confirmation if there are no errors. - --skip-validation Publish without validation and resolution (this will ignore errors). --C, --directory= Run this in the directory . - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-lish for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub remove --help.txt b/test/testdata/goldens/help_test/pub remove --help.txt deleted file mode 100644 index 2032abfa1..000000000 --- a/test/testdata/goldens/help_test/pub remove --help.txt +++ /dev/null @@ -1,23 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub remove --help -Removes dependencies from `pubspec.yaml`. - -Invoking `dart pub remove foo bar` will remove `foo` and `bar` from either -`dependencies` or `dev_dependencies` in `pubspec.yaml`. - -To remove a dependency override of a package prefix the package name with -'override:'. - - -Usage: pub remove [...] --h, --help Print this usage information. - --[no-]offline Use cached packages instead of accessing the network. --n, --dry-run Report what dependencies would change but don't change any. - --[no-]precompile Precompile executables in immediate dependencies. --C, --directory= Run this in the directory . - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-remove for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub run --help.txt b/test/testdata/goldens/help_test/pub run --help.txt deleted file mode 100644 index 7e813149e..000000000 --- a/test/testdata/goldens/help_test/pub run --help.txt +++ /dev/null @@ -1,16 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub run --help -Run an executable from a package. - -Usage: pub run [arguments...] --h, --help Print this usage information. - --[no-]enable-asserts Enable assert statements. - --enable-experiment= Runs the executable in a VM with the given experiments enabled. - (Will disable snapshotting, resulting in slower startup). --C, --directory= Run this in the directory . - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-run for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub token list --help.txt b/test/testdata/goldens/help_test/pub token list --help.txt deleted file mode 100644 index d2ed71298..000000000 --- a/test/testdata/goldens/help_test/pub token list --help.txt +++ /dev/null @@ -1,12 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub token list --help -List servers for which a token exists. - -Usage: pub token list [arguments...] --h, --help Print this usage information. - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-token for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub token remove --help.txt b/test/testdata/goldens/help_test/pub token remove --help.txt deleted file mode 100644 index ba06dbeb3..000000000 --- a/test/testdata/goldens/help_test/pub token remove --help.txt +++ /dev/null @@ -1,13 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub token remove --help -Remove secret token for package repository at . - -Usage: pub token remove | --all --h, --help Print this usage information. - --all Remove all secret tokens. - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-token for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub upgrade --help.txt b/test/testdata/goldens/help_test/pub upgrade --help.txt deleted file mode 100644 index 2721d13ed..000000000 --- a/test/testdata/goldens/help_test/pub upgrade --help.txt +++ /dev/null @@ -1,18 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub upgrade --help -Upgrade the current package's dependencies to latest versions. - -Usage: pub upgrade [dependencies...] --h, --help Print this usage information. - --[no-]offline Use cached packages instead of accessing the network. --n, --dry-run Report what dependencies would change but don't change any. - --[no-]precompile Precompile executables in immediate dependencies. - --tighten Updates lower bounds in pubspec.yaml to match the resolved version. - --major-versions Upgrades packages to their latest resolvable versions, and updates pubspec.yaml. --C, --directory= Run this in the directory . - -Run "pub help" to see global options. -See https://dart.dev/tools/pub/cmd/pub-upgrade for detailed documentation. - diff --git a/test/testdata/goldens/help_test/pub version --help.txt b/test/testdata/goldens/help_test/pub version --help.txt deleted file mode 100644 index 82e9f9fac..000000000 --- a/test/testdata/goldens/help_test/pub version --help.txt +++ /dev/null @@ -1,11 +0,0 @@ -# GENERATED BY: test/help_test.dart - -## Section 0 -$ pub version --help -Print pub version. - -Usage: pub version --h, --help Print this usage information. - -Run "pub help" to see global options. -