nushell/crates/nu-protocol/Cargo.toml

45 lines
1.2 KiB
TOML
Raw Normal View History

[package]
authors = ["The Nushell Project Developers"]
description = "Nushell's internal protocols, including its abstract syntax tree"
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-protocol"
edition = "2021"
license = "MIT"
2020-07-05 22:12:44 +02:00
name = "nu-protocol"
2023-12-14 20:55:48 +01:00
version = "0.88.2"
2021-09-02 03:29:43 +02:00
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
bench = false
2021-09-02 03:29:43 +02:00
[dependencies]
2023-12-14 20:55:48 +01:00
nu-utils = { path = "../nu-utils", version = "0.88.2" }
nu-path = { path = "../nu-path", version = "0.88.2" }
nu-system = { path = "../nu-system", version = "0.88.2" }
byte-unit = "4.0"
Add custom datetime format through `strftime` strings (#9500) - improves usability of datetime's in displayed text - # Description Creates a config point for specifying long / short date time formats. Defaults to humanized as we have today. Provides for adding strftime formats into config.nu such as: ```nu datetime_format: { normal: "%Y-%m-%d %H:%M:%S" table: "%Y-%m-%d" } ``` Example: ```bash > $env.config.datetime_format ┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ normal ┃ %a, %d %b %Y %H:%M:%S %z ┃ ┃ table ┃ %m/%d/%y %I:%M:%S%p ┃ ┗━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━┛ > let a = (date now) > echo $a Thu, 22 Jun 2023 10:21:23 -0700 > echo [$a] ┏━━━┳━━━━━━━━━━━━━━━━━━━━━┓ ┃ 0 ┃ 06/22/23 10:21:23AM ┃ ┗━━━┻━━━━━━━━━━━━━━━━━━━━━┛ ``` # User-Facing Changes Any place converting a datetime to a user displayed value should be impacted. # Tests + Formatting - `cargo fmt --all -- --check` Done - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect -A clippy::result_large_err` Done - `cargo test --workspace` Done - `cargo run -- crates/nu-std/tests/run.nu` Not done - doesn't seem to work ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr ``` - Done --------- Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com> Co-authored-by: Antoine Stevan <44101798+amtoine@users.noreply.github.com>
2023-06-23 22:05:04 +02:00
chrono = { version = "0.4", features = [ "serde", "std", "unstable-locales" ], default-features = false }
chrono-humanize = "0.2"
fancy-regex = "0.12"
indexmap = "2.1"
lru = "0.12"
miette = { version = "5.10", features = ["fancy-no-backtrace"] }
num-format = "0.4"
serde = { version = "1.0", default-features = false }
serde_json = { version = "1.0", optional = true }
thiserror = "1.0"
typetag = "0.2"
[features]
plugin = ["serde_json"]
[dev-dependencies]
serde_json = "1.0"
strum = "0.25"
strum_macros = "0.25"
2023-12-14 20:55:48 +01:00
nu-test-support = { path = "../nu-test-support", version = "0.88.2" }
rstest = "0.18"
[package.metadata.docs.rs]
all-features = true