Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace ansi-term with ansiterm #5

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crosstermion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include = ["src/**/*", "LICENSE.md", "README.md", "CHANGELOG.md"]
[features]
default = []

color = ["ansi_term"]
color = ["ansiterm"]

input-async = ["futures-channel", "async-channel", "futures-lite", "futures-core" ]
input-async-crossterm = ["crossterm/event-stream", "input-async"]
Expand All @@ -35,7 +35,7 @@ futures-core = { version = "0.3.5", optional = true, default-features = false }
futures-lite = { version = "2.1.0", optional = true }
tui = { package = "ratatui", version = "0.24.0", optional = true, default-features = false }
tui-react = { version = "^0.21.0", optional = true, default-features = false, path = "../tui-react" }
ansi_term = { version = "0.12.1", optional = true, default-features = false }
ansiterm = { version = "0.12.2", optional = true, default-features = false }
async-channel = { version = "2.1.1", optional = true }

[target."cfg(windows)".dependencies]
Expand Down
6 changes: 3 additions & 3 deletions crosstermion/src/color.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::borrow::Cow;
use std::ffi::OsStr;

#[cfg(feature = "ansi_term")]
#[cfg(feature = "ansiterm")]
mod _impl {
use ansi_term::{ANSIGenericString, Style};
use ansiterm::{ANSIGenericString, Style};

pub struct Brush {
may_paint: bool,
Expand Down Expand Up @@ -40,7 +40,7 @@ mod _impl {
}
}

#[cfg(feature = "ansi_term")]
#[cfg(feature = "ansiterm")]
pub use _impl::*;

/// Return true if we should colorize the output, based on [clicolors spec](https://bixense.com/clicolors/) and [no-color spec](https://no-color.org)
Expand Down
4 changes: 2 additions & 2 deletions crosstermion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub mod cursor;
pub mod color;

// Reexports
#[cfg(feature = "ansi_term")]
pub use ansi_term;
#[cfg(feature = "ansiterm")]
pub use ansiterm as ansi_term;
#[cfg(feature = "crossterm")]
pub use crossterm;
#[cfg(feature = "termion")]
Expand Down
Loading