1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-18 13:22:55 -05:00

fix(outdated): respect --quiet flag for hints (#27317)

This commit is contained in:
Bartek Iwańczuk 2024-12-10 18:22:42 +00:00 committed by GitHub
parent 21a9e2d42b
commit 7bab83d6c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 3 deletions

View file

@ -100,15 +100,14 @@ fn print_outdated_table(packages: &[OutdatedPackage]) {
println!("{package_fill}{current_fill}{update_fill}{latest_fill}",);
}
#[allow(clippy::print_stdout)]
fn print_suggestion(compatible: bool) {
println!();
log::info!("");
let (cmd, txt) = if compatible {
("", "compatible")
} else {
(" --latest", "available")
};
println!(
log::info!(
"{}",
color_print::cformat!(
"<p(245)>Run</> <u>deno outdated --update{}</> <p(245)>to update to the latest {} versions,</>\n<p(245)>or</> <u>deno outdated --help</> <p(245)>for more information.</>",

View file

@ -26,6 +26,11 @@
{
"args": "outdated",
"output": "outdated.out"
},
{
// Respect `--quiet flag and don't print hint how to update
"args": "outdated --quiet",
"output": "outdated_quiet.out"
}
]
},

View file

@ -0,0 +1,15 @@
┌────────────────────────────────────────────────┬─────────┬────────┬────────┐
│ Package │ Current │ Update │ Latest │
├────────────────────────────────────────────────┼─────────┼────────┼────────┤
│ jsr:@denotest/multiple-exports │ 0.2.0 │ 0.2.0 │ 1.0.0 │
├────────────────────────────────────────────────┼─────────┼────────┼────────┤
│ jsr:@denotest/subtract │ 0.2.0 │ 0.2.0 │ 1.0.0 │
├────────────────────────────────────────────────┼─────────┼────────┼────────┤
│ jsr:@denotest/add │ 0.2.0 │ 0.2.1 │ 1.0.0 │
├────────────────────────────────────────────────┼─────────┼────────┼────────┤
│ npm:@denotest/has-patch-versions │ 0.1.0 │ 0.1.1 │ 0.2.0 │
├────────────────────────────────────────────────┼─────────┼────────┼────────┤
│ npm:@denotest/bin │ 0.6.0 │ 0.6.0 │ 1.0.0 │
├────────────────────────────────────────────────┼─────────┼────────┼────────┤
│ npm:@denotest/breaking-change-between-versions │ 1.0.0 │ 1.0.0 │ 2.0.0 │
└────────────────────────────────────────────────┴─────────┴────────┴────────┘