mirror of
https://github.com/jj-vcs/jj.git
synced 2025-12-23 06:01:01 +00:00
time_util: replace use of chrono-english by interim
https://rustsec.org/advisories/RUSTSEC-2024-0395 recommends switching from `chrono-english` to `interim` because the former is unmaintained.
This commit is contained in:
parent
f4d89fb6df
commit
e392448288
5 changed files with 72 additions and 25 deletions
85
Cargo.lock
generated
85
Cargo.lock
generated
|
|
@ -208,6 +208,12 @@ version = "0.21.7"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
|
||||
|
||||
[[package]]
|
||||
name = "beef"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1"
|
||||
|
||||
[[package]]
|
||||
name = "bit-set"
|
||||
version = "0.5.3"
|
||||
|
|
@ -346,22 +352,10 @@ checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c"
|
|||
dependencies = [
|
||||
"android-tzdata",
|
||||
"iana-time-zone",
|
||||
"js-sys",
|
||||
"num-traits",
|
||||
"wasm-bindgen",
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chrono-english"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f73d909da7eb4a7d88c679c3f5a1bc09d965754e0adb2e7627426cef96a00d6f"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"scanlex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ciborium"
|
||||
version = "0.2.2"
|
||||
|
|
@ -2170,6 +2164,16 @@ dependencies = [
|
|||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "interim"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9ce9099a85f468663d3225bf87e85d0548968441e1db12248b996b24f0f5b5a"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"logos",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "io-close"
|
||||
version = "0.3.7"
|
||||
|
|
@ -2332,7 +2336,6 @@ dependencies = [
|
|||
"blake2",
|
||||
"bstr",
|
||||
"chrono",
|
||||
"chrono-english",
|
||||
"clru",
|
||||
"criterion",
|
||||
"digest",
|
||||
|
|
@ -2348,6 +2351,7 @@ dependencies = [
|
|||
"indexmap",
|
||||
"indoc",
|
||||
"insta",
|
||||
"interim",
|
||||
"itertools 0.13.0",
|
||||
"jj-lib-proc-macros",
|
||||
"maplit",
|
||||
|
|
@ -2537,6 +2541,40 @@ version = "0.4.22"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
||||
|
||||
[[package]]
|
||||
name = "logos"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab6f536c1af4c7cc81edf73da1f8029896e7e1e16a219ef09b184e76a296f3db"
|
||||
dependencies = [
|
||||
"logos-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "logos-codegen"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "189bbfd0b61330abea797e5e9276408f2edbe4f822d7ad08685d67419aafb34e"
|
||||
dependencies = [
|
||||
"beef",
|
||||
"fnv",
|
||||
"lazy_static",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"regex-syntax 0.8.5",
|
||||
"rustc_version",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "logos-derive"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ebfe8e1a19049ddbfccbd14ac834b215e11b85b90bab0c2dba7c7b92fb5d5cba"
|
||||
dependencies = [
|
||||
"logos-codegen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lru"
|
||||
version = "0.12.4"
|
||||
|
|
@ -3352,6 +3390,15 @@ version = "0.1.24"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
|
||||
dependencies = [
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "0.38.44"
|
||||
|
|
@ -3435,12 +3482,6 @@ dependencies = [
|
|||
"vec_map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scanlex"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "088c5d71572124929ea7549a8ce98e1a6fd33d0a38367b09027b382e67c033db"
|
||||
|
||||
[[package]]
|
||||
name = "scm-record"
|
||||
version = "0.8.0"
|
||||
|
|
@ -3464,6 +3505,12 @@ version = "1.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.219"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ chrono = { version = "0.4.40", default-features = false, features = [
|
|||
"std",
|
||||
"clock",
|
||||
] }
|
||||
chrono-english = { version = "0.1.7" }
|
||||
clru = "0.6.2"
|
||||
criterion = "0.5.1"
|
||||
crossterm = { version = "0.28", default-features = false, features = ["windows"] }
|
||||
|
|
@ -68,6 +67,7 @@ ignore = "0.4.23"
|
|||
indexmap = { version = "2.8.0", features = ["serde"] }
|
||||
indoc = "2.0.6"
|
||||
insta = { version = "1.42.2", features = ["filters"] }
|
||||
interim = { version = "0.2.1", features = ["chrono_0_4"] }
|
||||
itertools = "0.13.0"
|
||||
libc = { version = "0.2.171" }
|
||||
maplit = "1.0.2"
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ fn test_log_author_timestamp_after_before() {
|
|||
| ^------------^
|
||||
|
|
||||
= Invalid date pattern
|
||||
2: expected week day or month name
|
||||
2: expected unsupported identifier as position 0..7
|
||||
[EOF]
|
||||
[exit status: 1]
|
||||
"#);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ async-trait = { workspace = true }
|
|||
blake2 = { workspace = true }
|
||||
bstr = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
chrono-english = { workspace = true }
|
||||
clru = { workspace = true }
|
||||
digest = { workspace = true }
|
||||
dunce = { workspace = true }
|
||||
|
|
@ -50,6 +49,7 @@ hashbrown = { workspace = true }
|
|||
hex = { workspace = true }
|
||||
ignore = { workspace = true }
|
||||
indexmap = { workspace = true }
|
||||
interim = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
jj-lib-proc-macros = { workspace = true }
|
||||
maplit = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ use chrono::DateTime;
|
|||
use chrono::FixedOffset;
|
||||
use chrono::Local;
|
||||
use chrono::TimeZone;
|
||||
use chrono_english::parse_date_string;
|
||||
use chrono_english::DateError;
|
||||
use chrono_english::Dialect;
|
||||
use interim::parse_date_string;
|
||||
use interim::DateError;
|
||||
use interim::Dialect;
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::backend::MillisSinceEpoch;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue