From c43315f4eb3b98df6e1dae9e862d1e318fa49d83 Mon Sep 17 00:00:00 2001 From: haruna Date: Sun, 14 Dec 2025 04:42:01 +0900 Subject: [PATCH] Change exclude-newer type into optional string (#17121) ## Summary fix: #17103 ## Test Plan The following settings will be enabled for the schema. ```toml [tool.uv] exclude-newer = "P7D" ``` --- crates/uv-resolver/src/exclude_newer.rs | 1 - uv.schema.json | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/uv-resolver/src/exclude_newer.rs b/crates/uv-resolver/src/exclude_newer.rs index d6688d19c..913b3f22d 100644 --- a/crates/uv-resolver/src/exclude_newer.rs +++ b/crates/uv-resolver/src/exclude_newer.rs @@ -635,7 +635,6 @@ impl schemars::JsonSchema for ExcludeNewerValue { fn json_schema(_generator: &mut schemars::generate::SchemaGenerator) -> schemars::Schema { schemars::json_schema!({ "type": "string", - "pattern": r"^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2}))?$", "description": "Exclude distributions uploaded after the given timestamp.\n\nAccepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and local dates in the same format (e.g., `2006-12-02`), as well as relative durations (e.g., `1 week`, `30 days`, `6 months`). Relative durations are resolved to a timestamp at lock time.", }) } diff --git a/uv.schema.json b/uv.schema.json index c76c7ca01..02497d26a 100644 --- a/uv.schema.json +++ b/uv.schema.json @@ -893,8 +893,7 @@ }, "ExcludeNewerTimestamp": { "description": "Exclude distributions uploaded after the given timestamp.\n\nAccepts both RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`) and local dates in the same format (e.g., `2006-12-02`), as well as relative durations (e.g., `1 week`, `30 days`, `6 months`). Relative durations are resolved to a timestamp at lock time.", - "type": "string", - "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(Z|[+-]\\d{2}:\\d{2}))?$" + "type": "string" }, "ExtraBuildDependencies": { "type": "object",