diff --git a/lib/src/command/add.dart b/lib/src/command/add.dart index 7c6c701dc..273c66f90 100644 --- a/lib/src/command/add.dart +++ b/lib/src/command/add.dart @@ -167,7 +167,6 @@ For example (follow the same format including spaces): defaultsTo: true, help: 'Also update dependencies in `example/` after modifying pubspec.yaml in the root package (if it exists).', - hide: true, ); } diff --git a/lib/src/command/downgrade.dart b/lib/src/command/downgrade.dart index 1bdd09230..d9991381d 100644 --- a/lib/src/command/downgrade.dart +++ b/lib/src/command/downgrade.dart @@ -48,7 +48,6 @@ class DowngradeCommand extends PubCommand { 'example', defaultsTo: true, help: 'Also run in `example/` (if it exists).', - hide: true, ); argParser.addOption( diff --git a/lib/src/command/get.dart b/lib/src/command/get.dart index 4e522c05e..dd3bbdc15 100644 --- a/lib/src/command/get.dart +++ b/lib/src/command/get.dart @@ -56,7 +56,6 @@ class GetCommand extends PubCommand { 'example', defaultsTo: true, help: 'Also run in `example/` (if it exists).', - hide: true, ); argParser.addOption( diff --git a/lib/src/command/remove.dart b/lib/src/command/remove.dart index 32e75906b..7f4ac2af0 100644 --- a/lib/src/command/remove.dart +++ b/lib/src/command/remove.dart @@ -59,7 +59,6 @@ To remove a dependency override of a package prefix the package name with 'example', defaultsTo: true, help: 'Also update dependencies in `example/` (if it exists).', - hide: true, ); argParser.addOption( diff --git a/lib/src/command/upgrade.dart b/lib/src/command/upgrade.dart index a817ff41e..44365e870 100644 --- a/lib/src/command/upgrade.dart +++ b/lib/src/command/upgrade.dart @@ -89,7 +89,6 @@ class UpgradeCommand extends PubCommand { 'example', defaultsTo: true, help: 'Also run in `example/` (if it exists).', - hide: true, ); argParser.addOption( diff --git a/test/testdata/goldens/help_test/pub add --help.txt b/test/testdata/goldens/help_test/pub add --help.txt index f6f73fb96..4aca35f98 100644 --- a/test/testdata/goldens/help_test/pub add --help.txt +++ b/test/testdata/goldens/help_test/pub add --help.txt @@ -43,6 +43,8 @@ Usage: pub add [options] [
:][:descriptor] [
:] Run this in the directory . + --[no-]example Also update dependencies in `example/` after modifying pubspec.yaml in the root package (if it exists). + (defaults to on) 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 downgrade --help.txt b/test/testdata/goldens/help_test/pub downgrade --help.txt index a97139569..0b86d3ed4 100644 --- a/test/testdata/goldens/help_test/pub downgrade --help.txt +++ b/test/testdata/goldens/help_test/pub downgrade --help.txt @@ -10,6 +10,8 @@ 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. + --[no-]example Also run in `example/` (if it exists). + (defaults to on) -C, --directory= Run this in the directory . --tighten Updates lower bounds in pubspec.yaml to match the resolved version. diff --git a/test/testdata/goldens/help_test/pub get --help.txt b/test/testdata/goldens/help_test/pub get --help.txt index dd5aaf504..3c68ab101 100644 --- a/test/testdata/goldens/help_test/pub get --help.txt +++ b/test/testdata/goldens/help_test/pub get --help.txt @@ -12,6 +12,8 @@ Usage: pub get has changed. Useful for CI or deploying to production. --[no-]precompile Build executables in immediate dependencies. + --[no-]example Also run in `example/` (if it exists). + (defaults to on) -C, --directory= Run this in the directory . Run "pub help" to see global options. diff --git a/test/testdata/goldens/help_test/pub remove --help.txt b/test/testdata/goldens/help_test/pub remove --help.txt index 2032abfa1..34e1463fc 100644 --- a/test/testdata/goldens/help_test/pub remove --help.txt +++ b/test/testdata/goldens/help_test/pub remove --help.txt @@ -16,6 +16,8 @@ Usage: pub remove [...] --[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. + --[no-]example Also update dependencies in `example/` (if it exists). + (defaults to on) -C, --directory= Run this in the directory . Run "pub help" to see global options. diff --git a/test/testdata/goldens/help_test/pub upgrade --help.txt b/test/testdata/goldens/help_test/pub upgrade --help.txt index ade5a8dc4..90030c7ca 100644 --- a/test/testdata/goldens/help_test/pub upgrade --help.txt +++ b/test/testdata/goldens/help_test/pub upgrade --help.txt @@ -12,6 +12,8 @@ Usage: pub upgrade [dependencies...] --tighten Updates lower bounds in pubspec.yaml to match the resolved version. --unlock-transitive Also upgrades the transitive dependencies of the listed [dependencies] --major-versions Upgrades packages to their latest resolvable versions, and updates pubspec.yaml. + --[no-]example Also run in `example/` (if it exists). + (defaults to on) -C, --directory= Run this in the directory . Run "pub help" to see global options.