nu-table: Bump tabled to 0.12.1 (#9341)

close #9335 

I am not sure whether the fix was better to be delived as a minor bump
but it is what is is.

Could you @fdncred test it somehow?
I did it by checking out back the the original commit before the PR
refered in the issue.

---------

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
Maxim Zhiburt 2023-06-12 01:33:54 +03:00 committed by GitHub
parent 73921f4bd7
commit 85fbacb197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 45 deletions

33
Cargo.lock generated
View File

@ -95,6 +95,15 @@ dependencies = [
"ansitok",
]
[[package]]
name = "ansi-str"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cf4578926a981ab0ca955dc023541d19de37112bc24c1a197bd806d3d86ad1d"
dependencies = [
"ansitok",
]
[[package]]
name = "ansitok"
version = "0.2.0"
@ -2875,7 +2884,7 @@ name = "nu-explore"
version = "0.81.1"
dependencies = [
"ahash 0.8.3",
"ansi-str",
"ansi-str 0.7.2",
"crossterm 0.26.1",
"lscolors",
"nu-ansi-term",
@ -3406,7 +3415,7 @@ version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fdfe703c51ddc52887ad78fc69cd2ea78d895ffcd6e955c9d03566db8ab5bb1"
dependencies = [
"ansi-str",
"ansi-str 0.7.2",
"ansitok",
"bytecount",
"fnv",
@ -5135,30 +5144,16 @@ dependencies = [
[[package]]
name = "tabled"
version = "0.12.0"
version = "0.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da1a2e56bbf7bfdd08aaa7592157a742205459eff774b73bc01809ae2d99dc2a"
checksum = "0ce69a5028cd9576063ec1f48edb2c75339fd835e6094ef3e05b3a079bf594a6"
dependencies = [
"ansi-str",
"ansi-str 0.8.0",
"ansitok",
"papergrid",
"tabled_derive",
"unicode-width",
]
[[package]]
name = "tabled_derive"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99f688a08b54f4f02f0a3c382aefdb7884d3d69609f785bd253dc033243e3fe4"
dependencies = [
"heck",
"proc-macro-error",
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "target-features"
version = "0.1.4"

View File

@ -89,7 +89,7 @@ serde_yaml = "0.9"
sha2 = "0.10"
sqlparser = { version = "0.33", features = ["serde"], optional = true }
sysinfo = "0.29"
tabled = "0.12"
tabled = { version = "0.12.2", features = ["color"], default-features = false }
terminal_size = "0.2"
titlecase = "2.0"
toml = "0.7"

View File

@ -784,22 +784,21 @@ fn test_expand_big_0() {
"│ │ │ │ │ │ │ │ field} │ │ │ │",
"│ │ │ │ │ │ │ pkg-fmt │ tgz │ │ │ │",
"│ │ │ │ │ │ │ pkg-url │ { repo │ │ │ │",
"│ │ │ │ │ │ │ │ │ │ │ │",
"│ │ │ │ │ │ │ │ }/rele │ │ │ │",
"│ │ │ │ │ │ │ │ ases/d │ │ │ │",
"│ │ │ │ │ │ │ │ ownloa │ │ │ │",
"│ │ │ │ │ │ │ │ d/{ │ │ │ │",
"│ │ │ │ │ │ │ │ versio │ │ │ │",
"│ │ │ │ │ │ │ │ n }/{ │ │ │ │",
"│ │ │ │ │ │ │ │ }/rel │ │ │ │",
"│ │ │ │ │ │ │ │ eases/ │ │ │ │",
"│ │ │ │ │ │ │ │ downlo │ │ │ │",
"│ │ │ │ │ │ │ │ ad/{ v │ │ │ │",
"│ │ │ │ │ │ │ │ ersion │ │ │ │",
"│ │ │ │ │ │ │ │ }/{ │ │ │ │",
"│ │ │ │ │ │ │ │ name │ │ │ │",
"│ │ │ │ │ │ │ │ }-{ ve │ │ │ │",
"│ │ │ │ │ │ │ │ rsion │ │ │ │",
"│ │ │ │ │ │ │ │ }-{ │ │ │ │",
"│ │ │ │ │ │ │ │ versio │ │ │ │",
"│ │ │ │ │ │ │ │ n }-{ │ │ │ │",
"│ │ │ │ │ │ │ │ target │ │ │ │",
"│ │ │ │ │ │ │ │ }.{ │ │ │ │",
"│ │ │ │ │ │ │ │ archiv │ │ │ │",
"│ │ │ │ │ │ │ │ e-form │ │ │ │",
"│ │ │ │ │ │ │ │ at } │ │ │ │",
"│ │ │ │ │ │ │ │ }.{ a │ │ │ │",
"│ │ │ │ │ │ │ │ rchive │ │ │ │",
"│ │ │ │ │ │ │ │ -forma │ │ │ │",
"│ │ │ │ │ │ │ │ t } │ │ │ │",
"│ │ │ │ │ │ ╰───────────┴────────╯ │ │ │",
"│ │ │ │ ╰──────────┴────────────────────────╯ │ │",
"│ │ │ name │ nu │ │",
@ -1046,6 +1045,8 @@ fn test_expand_big_0() {
"open sample.toml | table --expand --width=60"
));
_print_lines(&actual.out, 60);
let expected = join_lines([
"╭──────────────────┬───────────────────────────────────────╮",
"│ │ ╭───┬─────────┬────────────╮ │",
@ -1230,9 +1231,8 @@ fn test_expand_big_0() {
"│ package │ │ │ ╭───┬───────────╮ │ │",
"│ │ │ authors │ │ 0 │ The │ │ │",
"│ │ │ │ │ │ Nushell │ │ │",
"│ │ │ │ │ │ Project │ │ │",
"│ │ │ │ │ │ Developer │ │ │",
"│ │ │ │ │ │ s │ │ │",
"│ │ │ │ │ │ Project D │ │ │",
"│ │ │ │ │ │ evelopers │ │ │",
"│ │ │ │ ╰───┴───────────╯ │ │",
"│ │ │ default-run │ nu │ │",
"│ │ │ description │ A new type of │ │",
@ -1266,9 +1266,8 @@ fn test_expand_big_0() {
"│ │ ╭───────────┬───────────────────────╮ │",
"│ patch │ │ │ ╭──────────┬────────╮ │ │",
"│ │ │ crates-io │ │ reedline │ {recor │ │ │",
"│ │ │ │ │ │ d 2 │ │ │",
"│ │ │ │ │ │ fields │ │ │",
"│ │ │ │ │ │ } │ │ │",
"│ │ │ │ │ │ d 2 fi │ │ │",
"│ │ │ │ │ │ elds} │ │ │",
"│ │ │ │ ╰──────────┴────────╯ │ │",
"│ │ ╰───────────┴───────────────────────╯ │",
"│ target │ {record 3 fields} │",
@ -1312,6 +1311,8 @@ fn test_expand_big_0() {
"open sample.toml | table --expand --width=40"
));
_print_lines(&actual.out, 40);
let expected = join_lines([
"╭──────────────────┬───────────────────╮",
"│ bench │ [table 1 row] │",
@ -1607,7 +1608,6 @@ fn table_expande_with_no_header_internally_1() {
let actual = nu!(format!("{} | table --expand --width 136", nu_value.trim()));
println!("{}", actual.out);
assert_eq!(
actual.out,
join_lines([

View File

@ -16,8 +16,7 @@ nu-utils = { path = "../nu-utils", version = "0.81.1" }
nu-engine = { path = "../nu-engine", version = "0.81.1" }
nu-color-config = { path = "../nu-color-config", version = "0.81.1" }
nu-ansi-term = "0.47.0"
tabled = { version = "0.12", features = ["color"], default-features = false }
tabled = { version = "0.12.2", features = ["color"], default-features = false }
ahash = "0.8.3"
[dev-dependencies]

View File

@ -124,7 +124,7 @@ fn wrap_keep_words_test() {
(10, None),
(11, None),
(12, Some("┏━━━━┳━━━━━┓\n┃ 12 ┃ ... ┃\n┃ 3 ┃ ┃\n┃ 45 ┃ ┃\n┃ 67 ┃ ┃\n┃ 8 ┃ ┃\n┣━━━━╋━━━━━┫\n┃ 0 ┃ ... ┃\n┃ 0 ┃ ... ┃\n┗━━━━┻━━━━━┛")),
(13, Some("┏━━━━━┳━━━━━┓\n┃ 123 ┃ ... ┃\n ┃ ┃\n456 ┃ ┃\n78 ┃ ┃\n┣━━━━━╋━━━━━┫\n┃ 0 ┃ ... ┃\n┃ 0 ┃ ... ┃\n┗━━━━━┻━━━━━┛")),
(13, Some("┏━━━━━┳━━━━━┓\n┃ 123 ┃ ... ┃\n45 ┃ ┃\n678 ┃ ┃\n┣━━━━━╋━━━━━┫\n┃ 0 ┃ ... ┃\n┃ 0 ┃ ... ┃\n┗━━━━━┻━━━━━┛")),
(21, Some("┏━━━━━━┳━━━━━━┳━━━━━┓\n┃ 123 ┃ qweq ┃ ... ┃\n┃ 4567 ┃ w ┃ ┃\n┃ 8 ┃ eqwe ┃ ┃\n┣━━━━━━╋━━━━━━╋━━━━━┫\n┃ 0 ┃ 1 ┃ ... ┃\n┃ 0 ┃ 1 ┃ ... ┃\n┗━━━━━━┻━━━━━━┻━━━━━┛")),
(29, Some("┏━━━━━━━━━━┳━━━━━━━━━━┳━━━━━┓\n┃ 123 ┃ qweqw ┃ ... ┃\n┃ 45678 ┃ eqwe ┃ ┃\n┣━━━━━━━━━━╋━━━━━━━━━━╋━━━━━┫\n┃ 0 ┃ 1 ┃ ... ┃\n┃ 0 ┃ 1 ┃ ... ┃\n┗━━━━━━━━━━┻━━━━━━━━━━┻━━━━━┛")),
(49, Some("┏━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━┓\n┃ 123 45678 ┃ qweqw eqwe ┃ xxx xx xx x xx ┃ ... ┃\n┃ ┃ ┃ x xx xx ┃ ┃\n┣━━━━━━━━━━━╋━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━╋━━━━━┫\n┃ 0 ┃ 1 ┃ 2 ┃ ... ┃\n┃ 0 ┃ 1 ┃ 2 ┃ ... ┃\n┗━━━━━━━━━━━┻━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━┻━━━━━┛")),