mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00:00
Bump deps and touchup (#2066)
This commit is contained in:
parent
4e2a4236f8
commit
7fed9992c9
18 changed files with 258 additions and 227 deletions
366
Cargo.lock
generated
366
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -43,11 +43,11 @@ url = { version = "2.1.1", optional = true }
|
|||
|
||||
clap = "2.33.1"
|
||||
ctrlc = "3.1.4"
|
||||
dunce = "1.0.0"
|
||||
dunce = "1.0.1"
|
||||
futures = { version = "0.3", features = ["compat", "io-compat"] }
|
||||
log = "0.4.8"
|
||||
pretty_env_logger = "0.4.0"
|
||||
starship = "0.42.0"
|
||||
starship = "0.43.0"
|
||||
|
||||
[dev-dependencies]
|
||||
nu-test-support = { version = "0.15.1", path = "./crates/nu-test-support" }
|
||||
|
|
|
@ -10,7 +10,7 @@ license = "MIT"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.110", features = ["derive"] }
|
||||
serde = { version = "1.0.114", features = ["derive"] }
|
||||
lazy_static = "1.4.0"
|
||||
serde_json = "1.0.53"
|
||||
serde_json = "1.0.55"
|
||||
toml = "0.5.6"
|
||||
|
|
|
@ -22,13 +22,13 @@ nu-table = {version = "0.15.1", path = "../nu-table"}
|
|||
ansi_term = "0.12.1"
|
||||
app_dirs = "1.2.1"
|
||||
async-recursion = "0.3.1"
|
||||
async-trait = "0.1.31"
|
||||
async-trait = "0.1.36"
|
||||
directories = "2.0.2"
|
||||
base64 = "0.12.1"
|
||||
base64 = "0.12.3"
|
||||
bigdecimal = { version = "0.1.2", features = ["serde"] }
|
||||
bson = { version = "0.14.1", features = ["decimal128"] }
|
||||
byte-unit = "3.1.3"
|
||||
bytes = "0.5.4"
|
||||
bytes = "0.5.5"
|
||||
calamine = "0.16"
|
||||
cfg-if = "0.1"
|
||||
chrono = { version = "0.4.11", features = ["serde"] }
|
||||
|
@ -37,7 +37,7 @@ csv = "1.1"
|
|||
ctrlc = "3.1.4"
|
||||
derive-new = "0.5.8"
|
||||
dirs = "2.0.2"
|
||||
dunce = "1.0.0"
|
||||
dunce = "1.0.1"
|
||||
eml-parser = "0.1.0"
|
||||
filesize = "0.2.0"
|
||||
futures = { version = "0.3", features = ["compat", "io-compat"] }
|
||||
|
@ -50,15 +50,15 @@ hex = "0.4"
|
|||
htmlescape = "0.3.1"
|
||||
ical = "0.6.*"
|
||||
ichwh = "0.3.4"
|
||||
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||
indexmap = { version = "1.4.0", features = ["serde-1"] }
|
||||
itertools = "0.9.0"
|
||||
codespan-reporting = "0.9.4"
|
||||
codespan-reporting = "0.9.5"
|
||||
log = "0.4.8"
|
||||
meval = "0.2"
|
||||
natural = "0.5.0"
|
||||
num-bigint = { version = "0.2.6", features = ["serde"] }
|
||||
num-traits = "0.2.11"
|
||||
parking_lot = "0.10.2"
|
||||
parking_lot = "0.11.0"
|
||||
pin-utils = "0.1.0"
|
||||
pretty-hex = "0.1.1"
|
||||
pretty_env_logger = "0.4.0"
|
||||
|
@ -66,13 +66,13 @@ ptree = {version = "0.2" }
|
|||
query_interface = "0.3.5"
|
||||
rand = "0.7"
|
||||
regex = "1"
|
||||
roxmltree = "0.11.0"
|
||||
roxmltree = "0.13.0"
|
||||
rustyline = "6.2.0"
|
||||
serde = { version = "1.0.110", features = ["derive"] }
|
||||
serde = { version = "1.0.114", features = ["derive"] }
|
||||
serde-hjson = "0.9.1"
|
||||
serde_bytes = "0.11.4"
|
||||
serde_bytes = "0.11.5"
|
||||
serde_ini = "0.2.0"
|
||||
serde_json = "1.0.53"
|
||||
serde_json = "1.0.55"
|
||||
serde_urlencoded = "0.6.1"
|
||||
serde_yaml = "0.8"
|
||||
shellexpand = "2.0.0"
|
||||
|
@ -80,18 +80,18 @@ strip-ansi-escapes = "0.1.0"
|
|||
tempfile = "3.1.0"
|
||||
term = "0.5.2"
|
||||
termcolor = "1.1.0"
|
||||
textwrap = {version = "0.11.0", features = ["term_size"]}
|
||||
term_size = "0.3.2"
|
||||
toml = "0.5.6"
|
||||
typetag = "0.1.4"
|
||||
typetag = "0.1.5"
|
||||
umask = "1.0.0"
|
||||
unicode-xid = "0.2.0"
|
||||
unicode-xid = "0.2.1"
|
||||
uuid_crate = { package = "uuid", version = "0.8.1", features = ["v4"] }
|
||||
which = "4.0.1"
|
||||
|
||||
trash = { version = "1.0.1", optional = true }
|
||||
clipboard = { version = "0.5", optional = true }
|
||||
starship = "0.42.0"
|
||||
rayon = "1.3.0"
|
||||
starship = "0.43.0"
|
||||
rayon = "1.3.1"
|
||||
encoding_rs = "0.8.23"
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
|
|
|
@ -106,6 +106,7 @@ pub async fn autoview(context: RunnableContext) -> Result<OutputStream, ShellErr
|
|||
};
|
||||
|
||||
let (mut input_stream, context) = RunnableContextWithoutInput::convert(context);
|
||||
let term_width = context.host.lock().width();
|
||||
|
||||
if let Some(x) = input_stream.next().await {
|
||||
match input_stream.next().await {
|
||||
|
@ -263,7 +264,7 @@ pub async fn autoview(context: RunnableContext) -> Result<OutputStream, ShellErr
|
|||
.iter()
|
||||
.fold(0usize, |acc, len| acc + len.len())
|
||||
+ row.entries.iter().count() * 2)
|
||||
> textwrap::termwidth()) =>
|
||||
> term_width) =>
|
||||
{
|
||||
let mut entries = vec![];
|
||||
for (key, value) in row.entries.iter() {
|
||||
|
@ -286,7 +287,7 @@ pub async fn autoview(context: RunnableContext) -> Result<OutputStream, ShellErr
|
|||
let table =
|
||||
nu_table::Table::new(vec![], entries, nu_table::Theme::compact());
|
||||
|
||||
nu_table::draw_table(&table, textwrap::termwidth());
|
||||
nu_table::draw_table(&table, term_width);
|
||||
}
|
||||
|
||||
Value {
|
||||
|
|
|
@ -241,7 +241,7 @@ async fn table(args: CommandArgs, registry: &CommandRegistry) -> Result<OutputSt
|
|||
|
||||
let mut delay_slot = None;
|
||||
|
||||
let termwidth = std::cmp::max(textwrap::termwidth(), 20);
|
||||
let term_width = args.host.lock().width();
|
||||
|
||||
while !finished {
|
||||
let mut new_input: VecDeque<Value> = VecDeque::new();
|
||||
|
@ -294,7 +294,7 @@ async fn table(args: CommandArgs, registry: &CommandRegistry) -> Result<OutputSt
|
|||
if !input.is_empty() {
|
||||
let t = from_list(&input, start_number);
|
||||
|
||||
draw_table(&t, termwidth);
|
||||
draw_table(&t, term_width);
|
||||
}
|
||||
|
||||
start_number += input.len();
|
||||
|
|
4
crates/nu-cli/src/env/host.rs
vendored
4
crates/nu-cli/src/env/host.rs
vendored
|
@ -120,7 +120,9 @@ impl Host for BasicHost {
|
|||
}
|
||||
|
||||
fn width(&self) -> usize {
|
||||
std::cmp::max(textwrap::termwidth(), 20)
|
||||
let (mut term_width, _) = term_size::dimensions().unwrap_or_else(|| (20, 20));
|
||||
term_width -= 1;
|
||||
std::cmp::max(term_width, 20)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,16 +15,16 @@ nu-source = { path = "../nu-source", version = "0.15.1" }
|
|||
ansi_term = "0.12.1"
|
||||
bigdecimal = { version = "0.1.2", features = ["serde"] }
|
||||
derive-new = "0.5.8"
|
||||
codespan-reporting = { version = "0.9.4", features = ["serialization"]}
|
||||
codespan-reporting = { version = "0.9.5", features = ["serialization"]}
|
||||
num-bigint = { version = "0.2.6", features = ["serde"] }
|
||||
num-traits = "0.2.11"
|
||||
serde = { version = "1.0.110", features = ["derive"] }
|
||||
num-traits = "0.2.12"
|
||||
serde = { version = "1.0.114", features = ["derive"] }
|
||||
getset = "0.1.1"
|
||||
|
||||
# implement conversions
|
||||
serde_yaml = "0.8"
|
||||
toml = "0.5.6"
|
||||
serde_json = "1.0.53"
|
||||
serde_json = "1.0.55"
|
||||
glob = "0.3.0"
|
||||
|
||||
[build-dependencies]
|
||||
|
|
|
@ -11,12 +11,12 @@ license = "MIT"
|
|||
[dependencies]
|
||||
num-bigint = { version = "0.2.6", features = ["serde"] }
|
||||
bigdecimal = { version = "0.1.2", features = ["serde"] }
|
||||
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||
parking_lot = "0.10.2"
|
||||
num-traits = "0.2.11"
|
||||
indexmap = { version = "1.4.0", features = ["serde-1"] }
|
||||
parking_lot = "0.11.0"
|
||||
num-traits = "0.2.12"
|
||||
derive-new = "0.5.8"
|
||||
serde = "1.0.110"
|
||||
codespan-reporting = "0.9.4"
|
||||
serde = "1.0.114"
|
||||
codespan-reporting = "0.9.5"
|
||||
log = "0.4.8"
|
||||
shellexpand = "2.0.0"
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@ nu-source = { path = "../nu-source", version = "0.15.1" }
|
|||
nu-errors = { path = "../nu-errors", version = "0.15.1" }
|
||||
nu-value-ext = { path = "../nu-value-ext", version = "0.15.1" }
|
||||
|
||||
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||
serde = { version = "1.0.110", features = ["derive"] }
|
||||
indexmap = { version = "1.4.0", features = ["serde-1"] }
|
||||
serde = { version = "1.0.114", features = ["derive"] }
|
||||
num-bigint = { version = "0.2.6", features = ["serde"] }
|
||||
serde_json = "1.0.53"
|
||||
serde_json = "1.0.55"
|
||||
bigdecimal = { version = "0.1.2", features = ["serde"] }
|
||||
|
||||
[build-dependencies]
|
||||
|
|
|
@ -13,18 +13,18 @@ doctest = false
|
|||
nu-source = { path = "../nu-source", version = "0.15.1" }
|
||||
nu-errors = { path = "../nu-errors", version = "0.15.1" }
|
||||
|
||||
serde = { version = "1.0.110", features = ["derive"] }
|
||||
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||
serde = { version = "1.0.114", features = ["derive"] }
|
||||
indexmap = { version = "1.4.0", features = ["serde-1"] }
|
||||
num-bigint = { version = "0.2.6", features = ["serde"] }
|
||||
bigdecimal = { version = "0.1.2", features = ["serde"] }
|
||||
chrono = { version = "0.4.11", features = ["serde"] }
|
||||
num-traits = "0.2.11"
|
||||
serde_bytes = "0.11.4"
|
||||
num-traits = "0.2.12"
|
||||
serde_bytes = "0.11.5"
|
||||
getset = "0.1.1"
|
||||
derive-new = "0.5.8"
|
||||
ansi_term = "0.12.1"
|
||||
codespan-reporting = "0.9.4"
|
||||
typetag = "0.1.4"
|
||||
codespan-reporting = "0.9.5"
|
||||
typetag = "0.1.5"
|
||||
query_interface = "0.3.5"
|
||||
byte-unit = "3.1.3"
|
||||
natural = "0.5.0"
|
||||
|
@ -34,7 +34,7 @@ itertools = "0.9.0"
|
|||
# implement conversions
|
||||
serde_yaml = "0.8"
|
||||
toml = "0.5.6"
|
||||
serde_json = "1.0.53"
|
||||
serde_json = "1.0.55"
|
||||
|
||||
[build-dependencies]
|
||||
nu-build = { version = "0.15.1", path = "../nu-build" }
|
||||
|
|
|
@ -10,10 +10,10 @@ license = "MIT"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.110", features = ["derive"] }
|
||||
serde = { version = "1.0.114", features = ["derive"] }
|
||||
derive-new = "0.5.8"
|
||||
getset = "0.1.1"
|
||||
codespan-reporting = "0.9.4"
|
||||
codespan-reporting = "0.9.5"
|
||||
termcolor = "1.1.0"
|
||||
pretty = "0.5.2"
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@ nu-source = { path = "../nu-source", version = "0.15.1" }
|
|||
nu-protocol = { path = "../nu-protocol", version = "0.15.1" }
|
||||
|
||||
directories = "2.0.2"
|
||||
dunce = "1.0.0"
|
||||
dunce = "1.0.1"
|
||||
getset = "0.1.1"
|
||||
glob = "0.3.0"
|
||||
tempfile = "3.1.0"
|
||||
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||
indexmap = { version = "1.4.0", features = ["serde-1"] }
|
||||
|
||||
[build-dependencies]
|
||||
nu-build = { version = "0.15.1", path = "../nu-build" }
|
||||
|
|
|
@ -15,9 +15,9 @@ nu-errors = { path = "../nu-errors", version = "0.15.1" }
|
|||
nu-parser = { path = "../nu-parser", version = "0.15.1" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.15.1" }
|
||||
|
||||
num-traits = "0.2.11"
|
||||
num-traits = "0.2.12"
|
||||
itertools = "0.9.0"
|
||||
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||
indexmap = { version = "1.4.0", features = ["serde-1"] }
|
||||
|
||||
[build-dependencies]
|
||||
nu-build = { version = "0.15.1", path = "../nu-build" }
|
||||
|
|
|
@ -17,7 +17,7 @@ nu-errors = { path = "../nu-errors", version = "0.15.1" }
|
|||
futures = { version = "0.3", features = ["compat", "io-compat"] }
|
||||
surf = "1.0.3"
|
||||
url = "2.1.1"
|
||||
base64 = "0.12.1"
|
||||
base64 = "0.12.3"
|
||||
|
||||
[build-dependencies]
|
||||
nu-build = { version = "0.15.1", path = "../nu-build" }
|
||||
|
|
|
@ -17,9 +17,9 @@ nu-errors = { path = "../nu-errors", version = "0.15.1" }
|
|||
futures = { version = "0.3", features = ["compat", "io-compat"] }
|
||||
surf = "1.0.3"
|
||||
url = "2.1.1"
|
||||
serde_json = "1.0.53"
|
||||
base64 = "0.12.1"
|
||||
num-traits = "0.2.11"
|
||||
serde_json = "1.0.55"
|
||||
base64 = "0.12.3"
|
||||
num-traits = "0.2.12"
|
||||
|
||||
[build-dependencies]
|
||||
nu-build = { version = "0.15.1", path = "../nu-build" }
|
||||
|
|
|
@ -21,7 +21,7 @@ syntect = { version = "4.2", default-features = false, features = ["default-fanc
|
|||
ansi_term = "0.12.1"
|
||||
url = "2.1.1"
|
||||
bat = "0.15.4"
|
||||
textwrap = {version = "0.11.0", features = ["term_size"]}
|
||||
term_size = "0.3.2"
|
||||
|
||||
[build-dependencies]
|
||||
nu-build = { version = "0.15.1", path = "../nu-build" }
|
||||
|
|
|
@ -13,7 +13,7 @@ impl TextView {
|
|||
|
||||
#[allow(clippy::cognitive_complexity)]
|
||||
pub fn view_text_value(value: &Value) {
|
||||
let mut term_width: u64 = textwrap::termwidth() as u64;
|
||||
let (mut term_width, _) = term_size::dimensions().unwrap_or_else(|| (20, 20));
|
||||
let mut tab_width: u64 = 4;
|
||||
let mut colored_output = true;
|
||||
let mut true_color = true;
|
||||
|
@ -38,8 +38,8 @@ pub fn view_text_value(value: &Value) {
|
|||
match idx.as_ref() {
|
||||
"term_width" => {
|
||||
term_width = match value.as_u64() {
|
||||
Ok(n) => n,
|
||||
_ => textwrap::termwidth() as u64,
|
||||
Ok(n) => n as usize,
|
||||
_ => term_width as usize,
|
||||
}
|
||||
}
|
||||
"tab_width" => {
|
||||
|
|
Loading…
Reference in a new issue