@@ -475,7 +475,7 @@ pub enum DenoSubcommand {
475
475
476
476
#[ derive( Clone , Debug , PartialEq , Eq ) ]
477
477
pub enum OutdatedKind {
478
- Update { latest : bool } ,
478
+ Update { latest : bool , interactive : bool } ,
479
479
PrintOutdated { compatible : bool } ,
480
480
}
481
481
@@ -2660,7 +2660,7 @@ Specific version requirements to update to can be specified:
2660
2660
. long ( "latest" )
2661
2661
. action ( ArgAction :: SetTrue )
2662
2662
. help (
2663
- "Update to the latest version, regardless of semver constraints" ,
2663
+ "Consider the latest version, regardless of semver constraints" ,
2664
2664
)
2665
2665
. conflicts_with ( "compatible" ) ,
2666
2666
)
@@ -2669,15 +2669,21 @@ Specific version requirements to update to can be specified:
2669
2669
. long ( "update" )
2670
2670
. short ( 'u' )
2671
2671
. action ( ArgAction :: SetTrue )
2672
- . conflicts_with ( "compatible" )
2673
2672
. help ( "Update dependency versions" ) ,
2674
2673
)
2674
+ . arg (
2675
+ Arg :: new ( "interactive" )
2676
+ . long ( "interactive" )
2677
+ . short ( 'i' )
2678
+ . action ( ArgAction :: SetTrue )
2679
+ . requires ( "update" )
2680
+ . help ( "Interactively select which dependencies to update" )
2681
+ )
2675
2682
. arg (
2676
2683
Arg :: new ( "compatible" )
2677
2684
. long ( "compatible" )
2678
2685
. action ( ArgAction :: SetTrue )
2679
- . help ( "Only output versions that satisfy semver requirements" )
2680
- . conflicts_with ( "update" ) ,
2686
+ . help ( "Only consider versions that satisfy semver requirements" )
2681
2687
)
2682
2688
. arg (
2683
2689
Arg :: new ( "recursive" )
@@ -4462,7 +4468,11 @@ fn outdated_parse(
4462
4468
let update = matches. get_flag ( "update" ) ;
4463
4469
let kind = if update {
4464
4470
let latest = matches. get_flag ( "latest" ) ;
4465
- OutdatedKind :: Update { latest }
4471
+ let interactive = matches. get_flag ( "interactive" ) ;
4472
+ OutdatedKind :: Update {
4473
+ latest,
4474
+ interactive,
4475
+ }
4466
4476
} else {
4467
4477
let compatible = matches. get_flag ( "compatible" ) ;
4468
4478
OutdatedKind :: PrintOutdated { compatible }
@@ -11646,31 +11656,43 @@ Usage: deno repl [OPTIONS] [-- [ARGS]...]\n"
11646
11656
svec ! [ "--update" ] ,
11647
11657
OutdatedFlags {
11648
11658
filters : vec ! [ ] ,
11649
- kind : OutdatedKind :: Update { latest : false } ,
11659
+ kind : OutdatedKind :: Update {
11660
+ latest : false ,
11661
+ interactive : false ,
11662
+ } ,
11650
11663
recursive : false ,
11651
11664
} ,
11652
11665
) ,
11653
11666
(
11654
11667
svec ! [ "--update" , "--latest" ] ,
11655
11668
OutdatedFlags {
11656
11669
filters : vec ! [ ] ,
11657
- kind : OutdatedKind :: Update { latest : true } ,
11670
+ kind : OutdatedKind :: Update {
11671
+ latest : true ,
11672
+ interactive : false ,
11673
+ } ,
11658
11674
recursive : false ,
11659
11675
} ,
11660
11676
) ,
11661
11677
(
11662
11678
svec ! [ "--update" , "--recursive" ] ,
11663
11679
OutdatedFlags {
11664
11680
filters : vec ! [ ] ,
11665
- kind : OutdatedKind :: Update { latest : false } ,
11681
+ kind : OutdatedKind :: Update {
11682
+ latest : false ,
11683
+ interactive : false ,
11684
+ } ,
11666
11685
recursive : true ,
11667
11686
} ,
11668
11687
) ,
11669
11688
(
11670
11689
svec ! [ "--update" , "@foo/bar" ] ,
11671
11690
OutdatedFlags {
11672
11691
filters : svec ! [ "@foo/bar" ] ,
11673
- kind : OutdatedKind :: Update { latest : false } ,
11692
+ kind : OutdatedKind :: Update {
11693
+ latest : false ,
11694
+ interactive : false ,
11695
+ } ,
11674
11696
recursive : false ,
11675
11697
} ,
11676
11698
) ,
@@ -11682,6 +11704,17 @@ Usage: deno repl [OPTIONS] [-- [ARGS]...]\n"
11682
11704
recursive : false ,
11683
11705
} ,
11684
11706
) ,
11707
+ (
11708
+ svec ! [ "--update" , "--latest" , "--interactive" ] ,
11709
+ OutdatedFlags {
11710
+ filters : svec ! [ ] ,
11711
+ kind : OutdatedKind :: Update {
11712
+ latest : true ,
11713
+ interactive : true ,
11714
+ } ,
11715
+ recursive : false ,
11716
+ } ,
11717
+ ) ,
11685
11718
] ;
11686
11719
for ( input, expected) in cases {
11687
11720
let mut args = svec ! [ "deno" , "outdated" ] ;
0 commit comments