diff --git a/Cargo.lock b/Cargo.lock index 5c5544f..c36a42c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,9 +130,12 @@ checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "cc" -version = "1.0.98" +version = "1.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -552,9 +555,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -575,9 +578,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rustc-demangle" @@ -818,62 +821,70 @@ dependencies = [ [[package]] name = "tree-sitter" -version = "0.22.6" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7cc499ceadd4dcdf7ec6d4cbc34ece92c3fa07821e287aedecd4416c516dca" +checksum = "20f4cd3642c47a85052a887d86704f4eac272969f61b686bdd3f772122aabaff" dependencies = [ "cc", "regex", + "regex-syntax", + "tree-sitter-language", ] [[package]] name = "tree-sitter-go" -version = "0.21.2" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d702a98d3c7e70e466456e58ff2b1ac550bf1e29b97e5770676d2fdabec00d" +checksum = "caf57626e4c9b6d6efaf8a8d5ee1241c5f178ae7bfdf693713ae6a774f01424e" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] [[package]] name = "tree-sitter-javascript" -version = "0.21.2" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080880908cb6e8d03cb9ceaeecec9a3d3a2f4e122e74642509bbb22aaefd991b" +checksum = "59e1f62f8babb640b909f30675d1addeb1f17802f2a4d2af287569753b243977" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] +[[package]] +name = "tree-sitter-language" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2545046bd1473dac6c626659cc2567c6c0ff302fc8b84a56c4243378276f7f57" + [[package]] name = "tree-sitter-python" -version = "0.21.0" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4066c6cf678f962f8c2c4561f205945c84834cce73d981e71392624fdc390a9" +checksum = "65661b1a3e24139e2e54207e47d910ab07e28790d78efc7d5dc3a11ce2a110eb" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] [[package]] name = "tree-sitter-rust" -version = "0.21.2" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "277690f420bf90741dea984f3da038ace46c4fe6047cba57a66822226cde1c93" +checksum = "cffbbcb780348fbae8395742ae5b34c1fd794e4085d43aac9f259387f9a84dc8" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] [[package]] name = "tree-sitter-swift" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75fd4af840121c5add7a20372be867c04fc398edf3edb2c64286b56f2da28c43" +checksum = "d65aeb41726119416567d0333ec17580ac4abfb96db1f67c4bd638c65f9992fe" dependencies = [ "cc", - "tree-sitter", + "tree-sitter-language", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d753c8c..bcf856f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,9 +18,7 @@ rust-version = "1.79.0" [dependencies] miette = { version = "7.2.0", features = ["fancy"] } -tree-sitter = "0.22.6" -tree-sitter-javascript = "0.21.2" -tree-sitter-python = "0.21.0" +tree-sitter = "0.23.0" unic-ucd-name = "0.9.0" toml = "0.8.14" serde = { version = "1.0.203", features = ["derive"] } @@ -28,12 +26,16 @@ walkdir = "2.5.0" anyhow = "1.0.86" glob = "0.3.1" phf = { version = "0.11.2", features = ["macros"] } -tree-sitter-rust = "0.21.2" clap = { version = "4.5.16", features = ["derive"] } log = "0.4.22" env_logger = "0.11.5" -tree-sitter-go = "0.21.2" -tree-sitter-swift = "0.5.0" + +# Grammars +tree-sitter-go = "0.23.1" +tree-sitter-javascript = "0.23.0" +tree-sitter-python = "0.23.2" +tree-sitter-rust = "0.23.0" +tree-sitter-swift = "0.6.0" [dev-dependencies] trycmd = "0.15.5" diff --git a/src/config.rs b/src/config.rs index 064ae78..5f11986 100644 --- a/src/config.rs +++ b/src/config.rs @@ -132,11 +132,11 @@ impl Language { pub fn grammar(&self) -> tree_sitter::Language { match self { - Language::Go => tree_sitter_go::language(), - Language::Javascript => tree_sitter_javascript::language(), - Language::Python => tree_sitter_python::language(), - Language::Rust => tree_sitter_rust::language(), - Language::Swift => tree_sitter_swift::language(), + Language::Go => tree_sitter_go::LANGUAGE.into(), + Language::Javascript => tree_sitter_javascript::LANGUAGE.into(), + Language::Python => tree_sitter_python::LANGUAGE.into(), + Language::Rust => tree_sitter_rust::LANGUAGE.into(), + Language::Swift => tree_sitter_swift::LANGUAGE.into(), } } }