diff --git a/Cargo.toml b/Cargo.toml index 7a5c1bda0..897e8e673 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ description = "Tool to compute and export code metrics" license = "MPL-2.0" [dependencies] -aho-corasick = "^1.0" +aho-corasick = "^1.1" crossbeam = { version = "^0.8", features = ["crossbeam-channel"] } globset = "^0.4" num = "^0.4" @@ -19,17 +19,17 @@ num-derive = "^0.4" num-format = "^0.4" num-traits = "^0.2" petgraph = "^0.8" -regex = "^1.7" +regex = "^1.12" serde = { version = "^1.0", features = ["derive"] } -termcolor = "^1.2" -walkdir = "^2.3" +termcolor = "^1.4" +walkdir = "^2.5" -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.9" tree-sitter-java = "=0.23.5" tree-sitter-kotlin-ng = "1.1.0" tree-sitter-typescript = "=0.23.2" -tree-sitter-javascript = "=0.23.1" -tree-sitter-python = "=0.23.6" +tree-sitter-javascript = "=0.25.0" +tree-sitter-python = "=0.25.0" tree-sitter-rust = "=0.23.2" tree-sitter-preproc = { path = "./tree-sitter-preproc", version = "=0.20.3" } tree-sitter-ccomment = { path = "./tree-sitter-ccomment", version = "=0.20.3" } @@ -37,8 +37,8 @@ tree-sitter-mozcpp = { path = "./tree-sitter-mozcpp", version = "=0.20.4" } tree-sitter-mozjs = { path = "./tree-sitter-mozjs", version = "=0.20.3" } [dev-dependencies] -insta = { version = "1.29.0", features = ["yaml", "json", "redactions"] } -pretty_assertions = "^1.3" +insta = { version = "1.47.2", features = ["yaml", "json", "redactions"] } +pretty_assertions = "^1.4" [profile.dev.package.insta] opt-level = 3 diff --git a/enums/Cargo.toml b/enums/Cargo.toml index d2dcc438e..6545d2c0c 100644 --- a/enums/Cargo.toml +++ b/enums/Cargo.toml @@ -8,13 +8,13 @@ edition = "2024" clap = { version = "^4.0", features = ["derive"] } askama = "^0.14" -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.9" tree-sitter-java = "=0.23.5" tree-sitter-kotlin-ng = "1.1.0" tree-sitter-typescript = "=0.23.2" -tree-sitter-javascript = "=0.23.1" -tree-sitter-python = "=0.23.6" -tree-sitter-rust = "=0.23.2" +tree-sitter-javascript = "=0.25.0" +tree-sitter-python = "=0.25.0" +tree-sitter-rust = "=0.24.2" tree-sitter-preproc = { path = "../tree-sitter-preproc", version = "=0.20.3" } tree-sitter-ccomment = { path = "../tree-sitter-ccomment", version = "=0.20.3" } tree-sitter-mozcpp = { path = "../tree-sitter-mozcpp", version = "=0.20.4" } diff --git a/rust-code-analysis-cli/Cargo.toml b/rust-code-analysis-cli/Cargo.toml index c276ccff8..abb35020b 100644 --- a/rust-code-analysis-cli/Cargo.toml +++ b/rust-code-analysis-cli/Cargo.toml @@ -12,12 +12,12 @@ license = "MPL-2.0" name = "rust-code-analysis-cli" [dependencies] -clap = { version = "^4.0", features = ["derive"] } +clap = { version = "^4.6", features = ["derive"] } globset = "^0.4" -regex = "^1.7" +regex = "^1.12" rust-code-analysis = { path = "..", version = "=0.0.25" } serde = "^1.0" serde_cbor = "^0.11" serde_json = "^1.0" -serde_yaml = "^0.9" -toml = "^0.9" +serde_yml = "0.0.12" +toml = "^1.1" diff --git a/rust-code-analysis-cli/src/formats.rs b/rust-code-analysis-cli/src/formats.rs index 2f5a3a54a..a4f764bf5 100644 --- a/rust-code-analysis-cli/src/formats.rs +++ b/rust-code-analysis-cli/src/formats.rs @@ -212,7 +212,7 @@ struct Yaml; impl WriteOnStdout for Yaml { fn format(content: T) -> String { - serde_yaml::to_string(&content).unwrap() + serde_yml::to_string(&content).unwrap() } } @@ -220,7 +220,7 @@ impl WriteFile for Yaml { const EXTENSION: &'static str = ".yml"; fn with_writer(content: T, path: PathBuf, output_path: &Path) { - serde_yaml::to_writer(Self::open_file(path, output_path), &content).unwrap() + serde_yml::to_writer(Self::open_file(path, output_path), &content).unwrap() } } diff --git a/rust-code-analysis-web/Cargo.toml b/rust-code-analysis-web/Cargo.toml index 6c4edfbe3..1d9fd0635 100644 --- a/rust-code-analysis-web/Cargo.toml +++ b/rust-code-analysis-web/Cargo.toml @@ -9,13 +9,13 @@ description = "Run a web service to compute and export code metrics" license = "MPL-2.0" [dependencies] -actix-rt = "^2.6" -actix-web = "^4.2" -clap = { version = "^4.0", features = ["derive"] } +actix-rt = "^2.11" +actix-web = "^4.13" +clap = { version = "^4.6", features = ["derive"] } futures = "^0.3" rust-code-analysis = { path = "..", version = "=0.0.25" } serde = "^1.0" serde_json = "^1.0" [dev-dependencies] -pretty_assertions = "^1.3" +pretty_assertions = "^1.4" diff --git a/src/node.rs b/src/node.rs index 49b8df104..2fa1bd9a3 100644 --- a/src/node.rs +++ b/src/node.rs @@ -116,7 +116,7 @@ impl<'a> Node<'a> { } pub(crate) fn child(&self, pos: usize) -> Option> { - self.0.child(pos).map(Node) + self.0.child(pos as u32).map(Node) } pub(crate) fn children(&self) -> impl ExactSizeIterator> + use<'a> { diff --git a/tree-sitter-ccomment/Cargo.toml b/tree-sitter-ccomment/Cargo.toml index d9df06f4e..74153720d 100644 --- a/tree-sitter-ccomment/Cargo.toml +++ b/tree-sitter-ccomment/Cargo.toml @@ -21,10 +21,10 @@ include = [ path = "bindings/rust/lib.rs" [dependencies] -tree-sitter-language="0.1.0" +tree-sitter-language="0.1.7" [build-dependencies] -cc = "^1.0" +cc = "^1.2" [dev-dependencies] -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.9" diff --git a/tree-sitter-mozcpp/Cargo.toml b/tree-sitter-mozcpp/Cargo.toml index 7924acb47..c2d361dbc 100644 --- a/tree-sitter-mozcpp/Cargo.toml +++ b/tree-sitter-mozcpp/Cargo.toml @@ -21,10 +21,10 @@ include = [ path = "bindings/rust/lib.rs" [dependencies] -tree-sitter-language="0.1.0" +tree-sitter-language="0.1.7" [build-dependencies] -cc = "^1.0" +cc = "^1.2" # This dependency is not used at all for this crate, but it is here so that # dependabot can send notifications when there are updates for this grammar tree-sitter-cpp = "0.23.4" @@ -33,4 +33,4 @@ tree-sitter-cpp = "0.23.4" build = ["tree-sitter-cpp"] [dev-dependencies] -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.9" diff --git a/tree-sitter-mozjs/Cargo.toml b/tree-sitter-mozjs/Cargo.toml index b1f3915fe..01cd12e49 100644 --- a/tree-sitter-mozjs/Cargo.toml +++ b/tree-sitter-mozjs/Cargo.toml @@ -21,16 +21,16 @@ include = [ path = "bindings/rust/lib.rs" [dependencies] -tree-sitter-language="0.1.0" +tree-sitter-language="0.1.7" [build-dependencies] -cc = "^1.0" +cc = "^1.2" # This dependency is not used at all for this crate, but it is here so that # dependabot can send notifications when there are updates for this grammar -tree-sitter-javascript = "0.23.1" +tree-sitter-javascript = "0.25.0" [package.metadata.cargo-udeps.ignore] build = ["tree-sitter-javascript"] [dev-dependencies] -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.9" diff --git a/tree-sitter-preproc/Cargo.toml b/tree-sitter-preproc/Cargo.toml index 85a564fce..a8b5957b0 100644 --- a/tree-sitter-preproc/Cargo.toml +++ b/tree-sitter-preproc/Cargo.toml @@ -21,10 +21,10 @@ include = [ path = "bindings/rust/lib.rs" [dependencies] -tree-sitter-language="0.1.0" +tree-sitter-language="0.1.7" [build-dependencies] -cc = "^1.0" +cc = "^1.2" [dev-dependencies] -tree-sitter = "=0.25.3" +tree-sitter = "=0.26.9"