Update nu-ansi-term, lscolors, and reedline (#9787)

# Description
Now use `nu-ansi-term` 0.49
Small adjustments to accommodate breaking changes.


# User-Facing Changes
None
This commit is contained in:
Stefan Holderbach 2023-07-24 13:16:18 +02:00 committed by GitHub
parent 4d0b6d8821
commit d7ebe5fdc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 32 additions and 37 deletions

41
Cargo.lock generated
View File

@ -2172,11 +2172,11 @@ dependencies = [
[[package]] [[package]]
name = "lscolors" name = "lscolors"
version = "0.14.0" version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18a9df1d1fb6d9e92fa043e9eb9a3ecf6892c7b542bae5137cd1e419e40aa8bf" checksum = "bf7015a04103ad78abb77e4b79ed151e767922d1cfde5f62640471c629a2320d"
dependencies = [ dependencies = [
"nu-ansi-term 0.47.0", "nu-ansi-term",
] ]
[[package]] [[package]]
@ -2513,7 +2513,7 @@ dependencies = [
"miette", "miette",
"mimalloc", "mimalloc",
"nix", "nix",
"nu-ansi-term 0.47.0", "nu-ansi-term",
"nu-cli", "nu-cli",
"nu-cmd-base", "nu-cmd-base",
"nu-cmd-dataframe", "nu-cmd-dataframe",
@ -2550,18 +2550,9 @@ dependencies = [
[[package]] [[package]]
name = "nu-ansi-term" name = "nu-ansi-term"
version = "0.47.0" version = "0.49.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1df031e117bca634c262e9bd3173776844b6c17a90b3741c9163663b4385af76" checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68"
dependencies = [
"windows-sys 0.45.0",
]
[[package]]
name = "nu-ansi-term"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db8e83967c32f9210ce85ac7e9c4b731048c1f51c4262e08bad01af30097a424"
dependencies = [ dependencies = [
"windows-sys 0.48.0", "windows-sys 0.48.0",
] ]
@ -2578,7 +2569,7 @@ dependencies = [
"is_executable", "is_executable",
"log", "log",
"miette", "miette",
"nu-ansi-term 0.47.0", "nu-ansi-term",
"nu-cmd-base", "nu-cmd-base",
"nu-cmd-lang", "nu-cmd-lang",
"nu-color-config", "nu-color-config",
@ -2632,7 +2623,7 @@ dependencies = [
"ahash 0.8.3", "ahash 0.8.3",
"fancy-regex", "fancy-regex",
"htmlescape", "htmlescape",
"nu-ansi-term 0.48.0", "nu-ansi-term",
"nu-cmd-base", "nu-cmd-base",
"nu-cmd-lang", "nu-cmd-lang",
"nu-command", "nu-command",
@ -2655,7 +2646,7 @@ version = "0.82.1"
dependencies = [ dependencies = [
"fancy-regex", "fancy-regex",
"itertools", "itertools",
"nu-ansi-term 0.47.0", "nu-ansi-term",
"nu-engine", "nu-engine",
"nu-parser", "nu-parser",
"nu-protocol", "nu-protocol",
@ -2667,7 +2658,7 @@ dependencies = [
name = "nu-color-config" name = "nu-color-config"
version = "0.82.1" version = "0.82.1"
dependencies = [ dependencies = [
"nu-ansi-term 0.47.0", "nu-ansi-term",
"nu-engine", "nu-engine",
"nu-json", "nu-json",
"nu-protocol", "nu-protocol",
@ -2717,7 +2708,7 @@ dependencies = [
"native-tls", "native-tls",
"nix", "nix",
"notify-debouncer-full", "notify-debouncer-full",
"nu-ansi-term 0.47.0", "nu-ansi-term",
"nu-cmd-base", "nu-cmd-base",
"nu-cmd-lang", "nu-cmd-lang",
"nu-color-config", "nu-color-config",
@ -2794,7 +2785,7 @@ dependencies = [
"ansi-str", "ansi-str",
"crossterm", "crossterm",
"lscolors", "lscolors",
"nu-ansi-term 0.47.0", "nu-ansi-term",
"nu-color-config", "nu-color-config",
"nu-engine", "nu-engine",
"nu-json", "nu-json",
@ -2865,7 +2856,7 @@ name = "nu-pretty-hex"
version = "0.82.1" version = "0.82.1"
dependencies = [ dependencies = [
"heapless", "heapless",
"nu-ansi-term 0.47.0", "nu-ansi-term",
"rand", "rand",
] ]
@ -2922,7 +2913,7 @@ dependencies = [
name = "nu-table" name = "nu-table"
version = "0.82.1" version = "0.82.1"
dependencies = [ dependencies = [
"nu-ansi-term 0.47.0", "nu-ansi-term",
"nu-color-config", "nu-color-config",
"nu-engine", "nu-engine",
"nu-protocol", "nu-protocol",
@ -4140,13 +4131,13 @@ dependencies = [
[[package]] [[package]]
name = "reedline" name = "reedline"
version = "0.21.0" version = "0.21.0"
source = "git+https://github.com/nushell/reedline.git?branch=main#cf841beb92affc7cb5cdc16bddefdebcd001f8c9" source = "git+https://github.com/nushell/reedline.git?branch=main#f15f0fb413f57fa9da86d656cf8c2eb761b3cfdf"
dependencies = [ dependencies = [
"chrono", "chrono",
"crossterm", "crossterm",
"fd-lock", "fd-lock",
"itertools", "itertools",
"nu-ansi-term 0.47.0", "nu-ansi-term",
"rusqlite", "rusqlite",
"serde", "serde",
"serde_json", "serde_json",

View File

@ -66,7 +66,7 @@ nu-table = { path = "./crates/nu-table", version = "0.82.1" }
nu-term-grid = { path = "./crates/nu-term-grid", version = "0.82.1" } nu-term-grid = { path = "./crates/nu-term-grid", version = "0.82.1" }
nu-std = { path = "./crates/nu-std", version = "0.82.1" } nu-std = { path = "./crates/nu-std", version = "0.82.1" }
nu-utils = { path = "./crates/nu-utils", version = "0.82.1" } nu-utils = { path = "./crates/nu-utils", version = "0.82.1" }
nu-ansi-term = "0.47.0" nu-ansi-term = "0.49.0"
reedline = { version = "0.21.0", features = ["bashisms", "sqlite"]} reedline = { version = "0.21.0", features = ["bashisms", "sqlite"]}
mimalloc = { version = "0.1.37", default-features = false, optional = true} mimalloc = { version = "0.1.37", default-features = false, optional = true}

View File

@ -24,7 +24,7 @@ nu-parser = { path = "../nu-parser", version = "0.82.1" }
nu-protocol = { path = "../nu-protocol", version = "0.82.1" } nu-protocol = { path = "../nu-protocol", version = "0.82.1" }
nu-utils = { path = "../nu-utils", version = "0.82.1" } nu-utils = { path = "../nu-utils", version = "0.82.1" }
nu-color-config = { path = "../nu-color-config", version = "0.82.1" } nu-color-config = { path = "../nu-color-config", version = "0.82.1" }
nu-ansi-term = "0.47.0" nu-ansi-term = "0.49.0"
reedline = { version = "0.21.0", features = ["bashisms", "sqlite"]} reedline = { version = "0.21.0", features = ["bashisms", "sqlite"]}
chrono = { default-features = false, features = ["std"], version = "0.4" } chrono = { default-features = false, features = ["std"], version = "0.4" }

View File

@ -22,7 +22,7 @@ nu-utils = { path = "../nu-utils", version = "0.82.1" }
# Potential dependencies for extras # Potential dependencies for extras
num-traits = "0.2" num-traits = "0.2"
ahash = "0.8.3" ahash = "0.8.3"
nu-ansi-term = "0.48.0" nu-ansi-term = "0.49.0"
fancy-regex = "0.11.0" fancy-regex = "0.11.0"
rust-embed = "6.7.0" rust-embed = "6.7.0"
serde = "1.0.164" serde = "1.0.164"

View File

@ -16,7 +16,7 @@ nu-engine = { path = "../nu-engine", version = "0.82.1" }
nu-parser = { path = "../nu-parser", version = "0.82.1" } nu-parser = { path = "../nu-parser", version = "0.82.1" }
nu-protocol = { path = "../nu-protocol", version = "0.82.1" } nu-protocol = { path = "../nu-protocol", version = "0.82.1" }
nu-utils = { path = "../nu-utils", version = "0.82.1" } nu-utils = { path = "../nu-utils", version = "0.82.1" }
nu-ansi-term = "0.47.0" nu-ansi-term = "0.49.0"
fancy-regex = "0.11" fancy-regex = "0.11"
itertools = "0.10" itertools = "0.10"

View File

@ -12,7 +12,7 @@ bench = false
[dependencies] [dependencies]
nu-protocol = { path = "../nu-protocol", version = "0.82.1" } nu-protocol = { path = "../nu-protocol", version = "0.82.1" }
nu-ansi-term = "0.47.0" nu-ansi-term = "0.49.0"
nu-utils = { path = "../nu-utils", version = "0.82.1" } nu-utils = { path = "../nu-utils", version = "0.82.1" }
nu-engine = { path = "../nu-engine", version = "0.82.1" } nu-engine = { path = "../nu-engine", version = "0.82.1" }
nu-json = { path="../nu-json", version = "0.82.1" } nu-json = { path="../nu-json", version = "0.82.1" }

View File

@ -26,5 +26,6 @@ fn merge_styles(base: Style, extra: Style) -> Style {
is_reverse: extra.is_reverse || base.is_reverse, is_reverse: extra.is_reverse || base.is_reverse,
is_hidden: extra.is_hidden || base.is_hidden, is_hidden: extra.is_hidden || base.is_hidden,
is_strikethrough: extra.is_strikethrough || base.is_strikethrough, is_strikethrough: extra.is_strikethrough || base.is_strikethrough,
prefix_with_reset: false,
} }
} }

View File

@ -186,6 +186,7 @@ impl TextStyle {
is_reverse: style.is_reverse, is_reverse: style.is_reverse,
is_hidden: style.is_hidden, is_hidden: style.is_hidden,
is_strikethrough: style.is_strikethrough, is_strikethrough: style.is_strikethrough,
prefix_with_reset: false,
}), }),
} }
} }
@ -235,6 +236,7 @@ impl TextStyle {
is_reverse: style.is_reverse, is_reverse: style.is_reverse,
is_hidden: style.is_hidden, is_hidden: style.is_hidden,
is_strikethrough: style.is_strikethrough, is_strikethrough: style.is_strikethrough,
prefix_with_reset: false,
}) })
} }
} }

View File

@ -13,7 +13,7 @@ version = "0.82.1"
bench = false bench = false
[dependencies] [dependencies]
nu-ansi-term = "0.47.0" nu-ansi-term = "0.49.0"
nu-cmd-base = { path = "../nu-cmd-base", version = "0.82.1" } nu-cmd-base = { path = "../nu-cmd-base", version = "0.82.1" }
nu-color-config = { path = "../nu-color-config", version = "0.82.1" } nu-color-config = { path = "../nu-color-config", version = "0.82.1" }
nu-engine = { path = "../nu-engine", version = "0.82.1" } nu-engine = { path = "../nu-engine", version = "0.82.1" }
@ -53,7 +53,7 @@ indicatif = "0.17"
is-terminal = "0.4.8" is-terminal = "0.4.8"
itertools = "0.10" itertools = "0.10"
log = "0.4" log = "0.4"
lscolors = { version = "0.14", default-features = false, features = ["nu-ansi-term"] } lscolors = { version = "0.15", default-features = false, features = ["nu-ansi-term"] }
md5 = { package = "md-5", version = "0.10" } md5 = { package = "md-5", version = "0.10" }
miette = { version = "5.10", features = ["fancy-no-backtrace"] } miette = { version = "5.10", features = ["fancy-no-backtrace"] }
mime = "0.3" mime = "0.3"

View File

@ -11,7 +11,7 @@ version = "0.82.1"
bench = false bench = false
[dependencies] [dependencies]
nu-ansi-term = "0.47.0" nu-ansi-term = "0.49.0"
nu-protocol = { path = "../nu-protocol", version = "0.82.1" } nu-protocol = { path = "../nu-protocol", version = "0.82.1" }
nu-parser = { path = "../nu-parser", version = "0.82.1" } nu-parser = { path = "../nu-parser", version = "0.82.1" }
nu-color-config = { path = "../nu-color-config", version = "0.82.1" } nu-color-config = { path = "../nu-color-config", version = "0.82.1" }
@ -25,4 +25,4 @@ strip-ansi-escapes = "0.1"
crossterm = "0.26" crossterm = "0.26"
ratatui = "0.20" ratatui = "0.20"
ansi-str = "0.8" ansi-str = "0.8"
lscolors = { version = "0.14", default-features = false, features = ["nu-ansi-term"] } lscolors = { version = "0.15", default-features = false, features = ["nu-ansi-term"] }

View File

@ -317,6 +317,7 @@ const fn color(foreground: Option<Color>, background: Option<Color>) -> Style {
is_reverse: false, is_reverse: false,
is_strikethrough: false, is_strikethrough: false,
is_underline: false, is_underline: false,
prefix_with_reset: false,
} }
} }

View File

@ -14,7 +14,7 @@ path = "src/lib.rs"
bench = false bench = false
[dependencies] [dependencies]
nu-ansi-term = "0.47.0" nu-ansi-term = "0.49.0"
[dev-dependencies] [dev-dependencies]
heapless = { version = "0.7", default-features = false } heapless = { version = "0.7", default-features = false }

View File

@ -15,7 +15,7 @@ nu-protocol = { path = "../nu-protocol", version = "0.82.1" }
nu-utils = { path = "../nu-utils", version = "0.82.1" } nu-utils = { path = "../nu-utils", version = "0.82.1" }
nu-engine = { path = "../nu-engine", version = "0.82.1" } nu-engine = { path = "../nu-engine", version = "0.82.1" }
nu-color-config = { path = "../nu-color-config", version = "0.82.1" } nu-color-config = { path = "../nu-color-config", version = "0.82.1" }
nu-ansi-term = "0.47.0" nu-ansi-term = "0.49.0"
tabled = { version = "0.12.2", features = ["color"], default-features = false } tabled = { version = "0.12.2", features = ["color"], default-features = false }
[dev-dependencies] [dev-dependencies]

View File

@ -18,7 +18,7 @@ bench = false
[dependencies] [dependencies]
log = "0.4" log = "0.4"
lscolors = { version = "0.14", default-features = false, features = ["nu-ansi-term"] } lscolors = { version = "0.15", default-features = false, features = ["nu-ansi-term"] }
num-format = { version = "0.4" } num-format = { version = "0.4" }
strip-ansi-escapes = "0.1" strip-ansi-escapes = "0.1"
sys-locale = "0.3" sys-locale = "0.3"