diff --git a/Cargo.lock b/Cargo.lock index 055cc9b63..63ae9d065 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2373,6 +2373,17 @@ dependencies = [ "regex-syntax 0.8.11", ] +[[package]] +name = "fancy-regex" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d301f5bf187b3c295fce6468d3875037a0bccc5f6b151c63cac2f85babf21912" +dependencies = [ + "bit-set", + "regex-automata", + "regex-syntax 0.8.11", +] + [[package]] name = "fancy_constructor" version = "2.1.1" @@ -6169,7 +6180,7 @@ checksum = "a6e38320d5a8e386647f622067588bdb338c9e6e43eb32cf6f8991dd0e8f0046" dependencies = [ "byteorder", "concurrent_lru", - "fancy-regex", + "fancy-regex 0.17.0", "flate2", "nodejs-built-in-modules", "pathdiff", @@ -11525,7 +11536,7 @@ dependencies = [ name = "yaak-filter" version = "0.1.0" dependencies = [ - "fancy-regex", + "fancy-regex 0.19.2", "indexmap 2.14.2", "serde_json", "sxd-document", diff --git a/crates/yaak-filter/Cargo.toml b/crates/yaak-filter/Cargo.toml index 052e35201..343e0a13e 100644 --- a/crates/yaak-filter/Cargo.toml +++ b/crates/yaak-filter/Cargo.toml @@ -5,7 +5,7 @@ edition = "2024" publish = false [dependencies] -fancy-regex = "0.17" +fancy-regex = "0.19" indexmap = "2" sxd-document = "0.3.2" sxd-xpath = "0.4.2" diff --git a/crates/yaak-filter/src/jsonpath/path.rs b/crates/yaak-filter/src/jsonpath/path.rs index 87d1e2380..56dfaba87 100644 --- a/crates/yaak-filter/src/jsonpath/path.rs +++ b/crates/yaak-filter/src/jsonpath/path.rs @@ -46,7 +46,7 @@ fn regex(pattern: &str) -> Regex { fn replace( re: &Regex, text: &str, - rep: impl FnMut(&Captures<'_>) -> String, + rep: impl FnMut(&Captures<'_, str>) -> String, ) -> Result { re.try_replacen(text, 0, rep) .map(|s| s.into_owned()) diff --git a/crates/yaak-filter/src/jsonpath/regex.rs b/crates/yaak-filter/src/jsonpath/regex.rs index a877991bd..415830037 100644 --- a/crates/yaak-filter/src/jsonpath/regex.rs +++ b/crates/yaak-filter/src/jsonpath/regex.rs @@ -158,7 +158,7 @@ impl JsRegex { } } -fn capture_values<'a>(captures: &Captures<'_>, from: usize) -> Vec> { +fn capture_values<'a>(captures: &Captures<'_, str>, from: usize) -> Vec> { (from..captures.len()) .map(|i| captures.get(i).map_or(JsValue::Undefined, |m| JsValue::string(m.as_str()))) .collect()