Skip to content

Commit

Permalink
replace unmaintained ansi_term with anssiterm due to https://osv.dev/…
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Stingler committed Dec 25, 2024
1 parent e9d5da2 commit b186470
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 20 deletions.
9 changes: 4 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ raur = "7.0.0"
srcinfo = "1.2.0"


ansi_term = "0.12.1"
ansiterm = "0.12.2"
anyhow = { version = "1.0.93", features = ["backtrace"] }
chrono = { version = "0.4.38", default-features = false, features = ["clock"] }
dirs = "5.0.1"
Expand Down Expand Up @@ -55,7 +55,6 @@ tr = "0.1.10"
unicode-width = "0.2.0"
regex-lite = "0.1.6"
signal-hook = "0.3.17"
once_cell = "1.20.2"
bitflags = "2.6.0"
toml = { version = "0.8.19", features = ["preserve_order"] }

Expand Down
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use std::str::FromStr;
use alpm::{
AnyDownloadEvent, AnyQuestion, Depend, DownloadEvent, DownloadResult, LogLevel, Question,
};
use ansi_term::Color::{Blue, Cyan, Green, Purple, Red, Yellow};
use ansi_term::Style;
use ansiterm::Color::{Blue, Cyan, Green, Purple, Red, Yellow};
use ansiterm::Style;
use anyhow::{anyhow, bail, ensure, Context, Error, Result};

use bitflags::bitflags;
Expand Down Expand Up @@ -136,7 +136,7 @@ impl Colors {
code: Style::new().fg(Cyan),
news_date: Style::new().fg(Cyan).bold(),
old_version: Style::new().fg(Red),
install_version: Style::new().fg(ansi_term::Color::Fixed(243)),
install_version: Style::new().fg(ansiterm::Color::Fixed(243)),
new_version: Style::new().fg(Green),
number_menu: Style::new().fg(Purple),
group: Style::new().fg(Blue).bold(),
Expand Down
2 changes: 1 addition & 1 deletion src/devel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::iter::FromIterator;
use std::time::Duration;

use alpm_utils::{DbListExt, Target};
use ansi_term::Style;
use ansiterm::Style;
use anyhow::{anyhow, bail, Context, Result};
use aur_depends::Base;
use futures::future::{join_all, select_ok, FutureExt};
Expand Down
2 changes: 1 addition & 1 deletion src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::result::Result as StdResult;

use alpm::Version;
use alpm_utils::{AsTarg, DbListExt, Targ};
use ansi_term::Style;
use ansiterm::Style;
use anyhow::{bail, ensure, Context, Result};
use aur_depends::AurBase;

Expand Down
4 changes: 2 additions & 2 deletions src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::repo;
use alpm::Ver;
use aur_depends::{Actions, Base};

use ansi_term::Style;
use ansiterm::Style;
use chrono::{Local, TimeZone, Utc};
use tr::tr;
use unicode_width::UnicodeWidthStr;
Expand Down Expand Up @@ -107,7 +107,7 @@ pub fn print_indent<S: AsRef<str>>(
println!();
}

use ansi_term::Color;
use ansiterm::Color;

pub fn color_repo(enabled: bool, name: &str) -> String {
if !enabled {
Expand Down
2 changes: 1 addition & 1 deletion src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::fmt::{date, opt, print_indent};
use crate::util::split_repo_aur_info;

use alpm_utils::Targ;
use ansi_term::Style;
use ansiterm::Style;
use anyhow::Error;

use globset::GlobSet;
Expand Down
2 changes: 1 addition & 1 deletion src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::{args, exec, news, print_error, printtr, repo};
use alpm::{Alpm, Depend, Version};
use alpm_utils::depends::{satisfies, satisfies_nover, satisfies_provide, satisfies_provide_nover};
use alpm_utils::{DbListExt, Targ};
use ansi_term::Style;
use ansiterm::Style;
use anyhow::{bail, ensure, Context, Result};
use aur_depends::{Actions, Base, Conflict, DepMissing, RepoPackage};
use log::debug;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use std::io::Write;
use std::path::PathBuf;
use std::process::Command;

use ansi_term::Style;
use ansiterm::Style;
use anyhow::{bail, Error, Result};
use cini::Ini;
use fmt::print_target;
Expand Down
2 changes: 1 addition & 1 deletion src/news.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::fmt::print_indent;

use std::str::Chars;

use ansi_term::Style;
use ansiterm::Style;
use anyhow::{bail, Result};
use htmlescape::decode_html;
use rss::Channel;
Expand Down
2 changes: 1 addition & 1 deletion src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::path::{Path, PathBuf};
use std::process::Command;

use alpm::{AlpmListMut, Db};
use ansi_term::Style;
use ansiterm::Style;
use anyhow::{Context, Error, Result};
use nix::unistd::{Gid, Uid, User};
use tr::tr;
Expand Down
2 changes: 1 addition & 1 deletion src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::fmt::{color_repo, print_indent};
use crate::util::{input, NumberMenu};
use crate::{info, printtr};

use ansi_term::Style;
use ansiterm::Style;
use anyhow::{ensure, Context, Result};
use indicatif::HumanBytes;
use raur::{Raur, SearchBy};
Expand Down

0 comments on commit b186470

Please sign in to comment.