Compare commits

..

1 Commits

Author SHA1 Message Date
89445ddcf3 fix(deps): update rust crate askama to 0.15.0
Some checks failed
Continuous integration / Check (push) Failing after 1m15s
Continuous integration / Test Suite (push) Failing after 1m40s
Continuous integration / Rustfmt (push) Successful in 1m31s
Continuous integration / build (push) Failing after 28s
Continuous integration / Trunk (push) Successful in 7m39s
Continuous integration / Disallow unused dependencies (push) Failing after 5m4s
2025-12-29 02:47:15 +00:00
4 changed files with 55 additions and 53 deletions

80
Cargo.lock generated
View File

@@ -183,11 +183,11 @@ checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a"
[[package]]
name = "askama"
version = "0.14.0"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f75363874b771be265f4ffe307ca705ef6f3baa19011c149da8674a87f1b75c4"
checksum = "bb7125972258312e79827b60c9eb93938334100245081cf701a2dee981b17427"
dependencies = [
"askama_derive",
"askama_macros",
"itoa 1.0.17",
"percent-encoding",
"serde",
@@ -196,9 +196,9 @@ dependencies = [
[[package]]
name = "askama_derive"
version = "0.14.0"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "129397200fe83088e8a68407a8e2b1f826cf0086b21ccdb866a722c8bcd3a94f"
checksum = "8ba5e7259a1580c61571e3116ebaaa01e3c001b2132b17c4cc5c70780ca3e994"
dependencies = [
"askama_parser",
"basic-toml",
@@ -212,14 +212,24 @@ dependencies = [
]
[[package]]
name = "askama_parser"
version = "0.14.0"
name = "askama_macros"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6ab5630b3d5eaf232620167977f95eb51f3432fc76852328774afbd242d4358"
checksum = "236ce20b77cb13506eaf5024899f4af6e12e8825f390bd943c4c37fd8f322e46"
dependencies = [
"memchr",
"askama_derive",
]
[[package]]
name = "askama_parser"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3c63392767bb2df6aa65a6e1e3b80fd89bb7af6d58359b924c0695620f1512e"
dependencies = [
"rustc-hash",
"serde",
"serde_derive",
"unicode-ident",
"winnow",
]
@@ -3075,20 +3085,6 @@ dependencies = [
[[package]]
name = "letterbox-notmuch"
version = "0.17.55"
source = "sparse+https://git.z.xinu.tv/api/packages/wathiede/cargo/"
checksum = "e4d1d65ae37e0b9efbee0daf341e7e5ea2db8ae78e4ea429359c671163636283"
dependencies = [
"log",
"mailparse",
"serde",
"serde_json",
"thiserror 2.0.17",
"tracing",
]
[[package]]
name = "letterbox-notmuch"
version = "0.17.56"
dependencies = [
"itertools",
"log",
@@ -3101,14 +3097,28 @@ dependencies = [
"tracing",
]
[[package]]
name = "letterbox-notmuch"
version = "0.17.55"
source = "sparse+https://git.z.xinu.tv/api/packages/wathiede/cargo/"
checksum = "e4d1d65ae37e0b9efbee0daf341e7e5ea2db8ae78e4ea429359c671163636283"
dependencies = [
"log",
"mailparse",
"serde",
"serde_json",
"thiserror 2.0.17",
"tracing",
]
[[package]]
name = "letterbox-procmail2notmuch"
version = "0.17.56"
version = "0.17.55"
dependencies = [
"anyhow",
"clap",
"letterbox-notmuch 0.17.55",
"letterbox-shared 0.17.55",
"letterbox-notmuch 0.17.55 (sparse+https://git.z.xinu.tv/api/packages/wathiede/cargo/)",
"letterbox-shared 0.17.55 (sparse+https://git.z.xinu.tv/api/packages/wathiede/cargo/)",
"serde",
"sqlx",
"tokio 1.48.0",
@@ -3116,7 +3126,7 @@ dependencies = [
[[package]]
name = "letterbox-server"
version = "0.17.56"
version = "0.17.55"
dependencies = [
"ammonia",
"anyhow",
@@ -3139,8 +3149,8 @@ dependencies = [
"html-escape",
"html2text",
"ical",
"letterbox-notmuch 0.17.56",
"letterbox-shared 0.17.56",
"letterbox-notmuch 0.17.55",
"letterbox-shared 0.17.55",
"linkify",
"lol_html",
"mailparse",
@@ -3167,8 +3177,6 @@ dependencies = [
[[package]]
name = "letterbox-shared"
version = "0.17.55"
source = "sparse+https://git.z.xinu.tv/api/packages/wathiede/cargo/"
checksum = "efcc3a59edbda7b3a9ac419bafafd5da8fea7a757fcffd5bfd88b28fba1ad97f"
dependencies = [
"build-info",
"letterbox-notmuch 0.17.55",
@@ -3181,10 +3189,12 @@ dependencies = [
[[package]]
name = "letterbox-shared"
version = "0.17.56"
version = "0.17.55"
source = "sparse+https://git.z.xinu.tv/api/packages/wathiede/cargo/"
checksum = "efcc3a59edbda7b3a9ac419bafafd5da8fea7a757fcffd5bfd88b28fba1ad97f"
dependencies = [
"build-info",
"letterbox-notmuch 0.17.56",
"letterbox-notmuch 0.17.55 (sparse+https://git.z.xinu.tv/api/packages/wathiede/cargo/)",
"regex",
"serde",
"sqlx",
@@ -3194,7 +3204,7 @@ dependencies = [
[[package]]
name = "letterbox-web"
version = "0.17.56"
version = "0.17.55"
dependencies = [
"build-info",
"build-info-build",
@@ -3206,7 +3216,7 @@ dependencies = [
"graphql_client",
"human_format",
"itertools",
"letterbox-shared 0.17.56",
"letterbox-shared 0.17.55",
"log",
"seed",
"seed_hooks",

View File

@@ -8,7 +8,7 @@ authors = ["Bill Thiede <git@xinu.tv>"]
edition = "2021"
license = "UNLICENSED"
publish = ["xinu"]
version = "0.17.56"
version = "0.17.55"
repository = "https://git.z.xinu.tv/wathiede/letterbox"
[profile.dev]

View File

@@ -16,7 +16,7 @@ chrono-tz = "0.10"
html2text = "0.16"
ammonia = "4.1.0"
anyhow = "1.0.98"
askama = { version = "0.14.0", features = ["derive"] }
askama = { version = "0.15.0", features = ["derive"] }
async-graphql = { version = "7", features = ["log", "chrono"] }
async-graphql-axum = "7.0.16"
async-trait = "0.1.88"

View File

@@ -195,16 +195,8 @@ pub fn extract_calendar_metadata_from_mail(
}
}
if let (Some(sm), Some(em)) = (month_num(start_month), month_num(end_month)) {
// If start month is later in calendar year than end month, start is in previous year
let sm_num: u32 = sm.parse().unwrap_or(1);
let em_num: u32 = em.parse().unwrap_or(1);
let end_year = year.parse::<i32>().unwrap_or_else(|_| chrono::Local::now().year());
let start_year: i32 = if sm_num > em_num {
end_year - 1
} else {
end_year
};
let start = format!("{}{}{}", start_year, sm, format!("{:0>2}", start_day));
let current_year = chrono::Local::now().year().to_string();
let start = format!("{}{}{}", current_year, sm, format!("{:0>2}", start_day));
let mut end_date_val = chrono::NaiveDate::parse_from_str(&format!("{}-{}-{}", year, em, format!("{:0>2}", end_day)), "%Y-%m-%d").ok();
if let Some(d) = end_date_val.as_mut() {
*d = d.succ_opt().unwrap_or(*d);
@@ -2315,8 +2307,8 @@ mod tests {
Some("calendar-notification@google.com".to_string())
);
// Dates: from subject, Thu Sep 11 to Fri Jan 30, 2026
// Start date is Sep 11, 2025 (one year before end since Sep > Jan)
assert_eq!(meta.start_date, Some("20250911".to_string()));
let current_year = chrono::Local::now().year();
assert_eq!(meta.start_date, Some(format!("{}0911", current_year)));
assert_eq!(meta.end_date, Some("20260131".to_string()));
}
#[test]
@@ -2416,8 +2408,8 @@ mod tests {
Some("calendar-notification@google.com".to_string())
);
// Dates: from subject, Thu Sep 11 to Fri Jan 30, 2026
// Start date is Sep 11, 2025 (one year before end since Sep > Jan)
assert_eq!(meta.start_date, Some("20250911".to_string()));
let current_year = chrono::Local::now().year();
assert_eq!(meta.start_date, Some(format!("{}0911", current_year)));
assert_eq!(meta.end_date, Some("20260131".to_string()));
// Debug: print the rendered HTML for inspection
if let Some(ref html) = meta.body_html {
@@ -2450,8 +2442,8 @@ mod tests {
Some("calendar-notification@google.com".to_string())
);
// Assert that the start and end dates are present
// Start date is Sep 11, 2025 (one year before end since Sep > Jan)
assert_eq!(meta.start_date, Some("20250911".to_string()));
let current_year = chrono::Local::now().year();
assert_eq!(meta.start_date, Some(format!("{}0911", current_year)));
assert_eq!(meta.end_date, Some("20260131".to_string()));
// Assert that the HTML body contains recurrence info
if let Some(ref html) = meta.body_html {