Rename flag to --unlock-transitive
diff --git a/lib/src/command/upgrade.dart b/lib/src/command/upgrade.dart
index 1c01237..c0092b2 100644
--- a/lib/src/command/upgrade.dart
+++ b/lib/src/command/upgrade.dart
@@ -71,7 +71,7 @@
);
argParser.addFlag(
- 'transitive',
+ 'unlock-transitive',
help: 'Also upgrades the transitive dependencies '
'of the listed [dependencies]',
);
@@ -115,7 +115,7 @@
/// This allows the user to specify list of names that they want the
/// upgrade command to affect.
Future<List<String>> _computePackagesToUpgrade() async {
- if (argResults.flag('transitive')) {
+ if (argResults.flag('unlock-transitive')) {
final graph = await entrypoint.packageGraph;
return argResults.rest
.expand(
diff --git a/test/upgrade/upgrade_transitive_test.dart b/test/upgrade/upgrade_transitive_test.dart
index 38b8e6a..410b273 100644
--- a/test/upgrade/upgrade_transitive_test.dart
+++ b/test/upgrade/upgrade_transitive_test.dart
@@ -8,7 +8,7 @@
import '../test_pub.dart';
void main() {
- test('without --transitive, the transitive dependencies stay locked',
+ test('without --unlock-transitive, the transitive dependencies stay locked',
() async {
final server = await servePackages();
server.serve('foo', '1.0.0', deps: {'bar': '^1.0.0'});
@@ -34,7 +34,7 @@
);
});
- test('`--transitive` dependencies gets unlocked', () async {
+ test('`--unlock-transitive` dependencies gets unlocked', () async {
final server = await servePackages();
server.serve('foo', '1.0.0', deps: {'bar': '^1.0.0'});
server.serve('bar', '1.0.0');
@@ -54,7 +54,7 @@
server.serve('baz', '1.5.0');
await pubUpgrade(
- args: ['--transitive', 'foo'],
+ args: ['--unlock-transitive', 'foo'],
output: allOf(
contains('> foo 1.5.0'),
contains('> bar 1.5.0'),
@@ -66,8 +66,9 @@
});
test(
- '`--major-versions` without `--transitive` does not allow transitive '
- 'dependencies to be upgraded along with the named packages', () async {
+ '`--major-versions` without `--unlock-transitive` does not allow '
+ 'transitive dependencies to be upgraded along with the named packages',
+ () async {
final server = await servePackages();
server.serve('foo', '1.0.0', deps: {'bar': '^1.0.0'});
server.serve('bar', '1.0.0');
@@ -93,7 +94,7 @@
});
test(
- '`--transitive --major-versions` allows transitive dependencies '
+ '`--unlock-transitive --major-versions` allows transitive dependencies '
'be upgraded along with the named packages', () async {
final server = await servePackages();
server.serve('foo', '1.0.0', deps: {'bar': '^1.0.0'});
@@ -114,7 +115,7 @@
server.serve('baz', '1.5.0');
await pubUpgrade(
- args: ['--major-versions', '--transitive', 'foo'],
+ args: ['--major-versions', '--unlock-transitive', 'foo'],
output: allOf(
contains('> foo 2.0.0'),
contains('> bar 1.5.0'),