ast-grep-py 0.39.3__tar.gz → 0.39.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ast-grep-py might be problematic. Click here for more details.

Files changed (98) hide show
  1. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/Cargo.lock +79 -35
  2. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/Cargo.toml +6 -6
  3. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/PKG-INFO +1 -1
  4. ast_grep_py-0.39.4/crates/language/src/hcl.rs +61 -0
  5. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/lib.rs +2 -2
  6. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/pyproject.toml +1 -1
  7. ast_grep_py-0.39.3/crates/language/src/hcl.rs +0 -47
  8. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/README.md +0 -0
  9. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/ast_grep_py/__init__.py +0 -0
  10. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/ast_grep_py/ast_grep_py.pyi +0 -0
  11. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/ast_grep_py/py.typed +0 -0
  12. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/Cargo.toml +0 -0
  13. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/check_var.rs +0 -0
  14. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/combined.rs +0 -0
  15. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/fixer.rs +0 -0
  16. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/label.rs +0 -0
  17. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/lib.rs +0 -0
  18. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/maybe.rs +0 -0
  19. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule/deserialize_env.rs +0 -0
  20. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule/mod.rs +0 -0
  21. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule/nth_child.rs +0 -0
  22. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule/range.rs +0 -0
  23. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule/referent_rule.rs +0 -0
  24. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule/relational_rule.rs +0 -0
  25. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule/selector.rs +0 -0
  26. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule/stop_by.rs +0 -0
  27. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule_collection.rs +0 -0
  28. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule_config.rs +0 -0
  29. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/rule_core.rs +0 -0
  30. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/transform/mod.rs +0 -0
  31. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/transform/parse.rs +0 -0
  32. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/transform/rewrite.rs +0 -0
  33. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/transform/string_case.rs +0 -0
  34. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/config/src/transform/trans.rs +0 -0
  35. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/Cargo.toml +0 -0
  36. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/language.rs +0 -0
  37. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/lib.rs +0 -0
  38. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/match_tree/match_node.rs +0 -0
  39. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/match_tree/mod.rs +0 -0
  40. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/match_tree/strictness.rs +0 -0
  41. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/matcher/kind.rs +0 -0
  42. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/matcher/node_match.rs +0 -0
  43. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/matcher/pattern.rs +0 -0
  44. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/matcher/text.rs +0 -0
  45. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/matcher.rs +0 -0
  46. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/meta_var.rs +0 -0
  47. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/node.rs +0 -0
  48. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/ops.rs +0 -0
  49. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/pinned.rs +0 -0
  50. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/replacer/indent.rs +0 -0
  51. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/replacer/structural.rs +0 -0
  52. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/replacer/template.rs +0 -0
  53. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/replacer.rs +0 -0
  54. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/source.rs +0 -0
  55. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/tree_sitter/mod.rs +0 -0
  56. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/core/src/tree_sitter/traversal.rs +0 -0
  57. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/dynamic/Cargo.toml +0 -0
  58. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/dynamic/src/custom_lang.rs +0 -0
  59. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/dynamic/src/lib.rs +0 -0
  60. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/Cargo.toml +0 -0
  61. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/bash.rs +0 -0
  62. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/cpp.rs +0 -0
  63. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/csharp.rs +0 -0
  64. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/css.rs +0 -0
  65. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/elixir.rs +0 -0
  66. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/go.rs +0 -0
  67. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/haskell.rs +0 -0
  68. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/html.rs +0 -0
  69. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/json.rs +0 -0
  70. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/kotlin.rs +0 -0
  71. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/lua.rs +0 -0
  72. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/nix.rs +0 -0
  73. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/parsers.rs +0 -0
  74. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/php.rs +0 -0
  75. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/python.rs +0 -0
  76. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/ruby.rs +0 -0
  77. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/rust.rs +0 -0
  78. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/scala.rs +0 -0
  79. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/solidity.rs +0 -0
  80. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/swift.rs +0 -0
  81. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/language/src/yaml.rs +0 -0
  82. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/Cargo.toml +0 -0
  83. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/README.md +0 -0
  84. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/ast_grep_py/__init__.py +0 -0
  85. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/ast_grep_py/ast_grep_py.pyi +0 -0
  86. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/ast_grep_py/py.typed +0 -0
  87. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/src/lib.rs +0 -0
  88. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/src/py_lang.rs +0 -0
  89. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/src/py_node.rs +0 -0
  90. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/src/range.rs +0 -0
  91. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/src/unicode_position.rs +0 -0
  92. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/tests/test_fix.py +0 -0
  93. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/tests/test_range.py +0 -0
  94. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/tests/test_register_lang.py +0 -0
  95. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/tests/test_rule.py +0 -0
  96. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/tests/test_simple.py +0 -0
  97. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/tests/test_traversal.py +0 -0
  98. {ast_grep_py-0.39.3 → ast_grep_py-0.39.4}/crates/pyo3/tests/test_wrong_usage.py +0 -0
@@ -109,7 +109,7 @@ dependencies = [
109
109
 
110
110
  [[package]]
111
111
  name = "ast-grep"
112
- version = "0.39.3"
112
+ version = "0.39.4"
113
113
  dependencies = [
114
114
  "ansi_term",
115
115
  "anyhow",
@@ -143,7 +143,7 @@ dependencies = [
143
143
 
144
144
  [[package]]
145
145
  name = "ast-grep-config"
146
- version = "0.39.3"
146
+ version = "0.39.4"
147
147
  dependencies = [
148
148
  "ast-grep-core",
149
149
  "bit-set",
@@ -158,7 +158,7 @@ dependencies = [
158
158
 
159
159
  [[package]]
160
160
  name = "ast-grep-core"
161
- version = "0.39.3"
161
+ version = "0.39.4"
162
162
  dependencies = [
163
163
  "bit-set",
164
164
  "regex",
@@ -169,7 +169,7 @@ dependencies = [
169
169
 
170
170
  [[package]]
171
171
  name = "ast-grep-dynamic"
172
- version = "0.39.3"
172
+ version = "0.39.4"
173
173
  dependencies = [
174
174
  "ast-grep-core",
175
175
  "ignore",
@@ -183,7 +183,7 @@ dependencies = [
183
183
 
184
184
  [[package]]
185
185
  name = "ast-grep-language"
186
- version = "0.39.3"
186
+ version = "0.39.4"
187
187
  dependencies = [
188
188
  "ast-grep-core",
189
189
  "ignore",
@@ -218,8 +218,9 @@ dependencies = [
218
218
 
219
219
  [[package]]
220
220
  name = "ast-grep-lsp"
221
- version = "0.39.3"
221
+ version = "0.39.4"
222
222
  dependencies = [
223
+ "anyhow",
223
224
  "ast-grep-config",
224
225
  "ast-grep-core",
225
226
  "ast-grep-language",
@@ -232,7 +233,7 @@ dependencies = [
232
233
 
233
234
  [[package]]
234
235
  name = "ast-grep-napi"
235
- version = "0.39.3"
236
+ version = "0.39.4"
236
237
  dependencies = [
237
238
  "ast-grep-config",
238
239
  "ast-grep-core",
@@ -248,7 +249,7 @@ dependencies = [
248
249
 
249
250
  [[package]]
250
251
  name = "ast-grep-py"
251
- version = "0.39.3"
252
+ version = "0.39.4"
252
253
  dependencies = [
253
254
  "anyhow",
254
255
  "ast-grep-config",
@@ -365,9 +366,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
365
366
 
366
367
  [[package]]
367
368
  name = "clap"
368
- version = "4.5.42"
369
+ version = "4.5.44"
369
370
  source = "registry+https://github.com/rust-lang/crates.io-index"
370
- checksum = "ed87a9d530bb41a67537289bafcac159cb3ee28460e0a4571123d2a778a6a882"
371
+ checksum = "1c1f056bae57e3e54c3375c41ff79619ddd13460a17d7438712bd0d83fda4ff8"
371
372
  dependencies = [
372
373
  "clap_builder",
373
374
  "clap_derive",
@@ -375,9 +376,9 @@ dependencies = [
375
376
 
376
377
  [[package]]
377
378
  name = "clap_builder"
378
- version = "4.5.42"
379
+ version = "4.5.44"
379
380
  source = "registry+https://github.com/rust-lang/crates.io-index"
380
- checksum = "64f4f3f3c77c94aff3c7e9aac9a2ca1974a5adf392a8bb751e827d6d127ab966"
381
+ checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8"
381
382
  dependencies = [
382
383
  "anstream",
383
384
  "anstyle",
@@ -387,9 +388,9 @@ dependencies = [
387
388
 
388
389
  [[package]]
389
390
  name = "clap_complete"
390
- version = "4.5.55"
391
+ version = "4.5.56"
391
392
  source = "registry+https://github.com/rust-lang/crates.io-index"
392
- checksum = "a5abde44486daf70c5be8b8f8f1b66c49f86236edf6fa2abadb4d961c4c6229a"
393
+ checksum = "67e4efcbb5da11a92e8a609233aa1e8a7d91e38de0be865f016d14700d45a7fd"
393
394
  dependencies = [
394
395
  "clap",
395
396
  ]
@@ -587,8 +588,18 @@ version = "0.4.2"
587
588
  source = "registry+https://github.com/rust-lang/crates.io-index"
588
589
  checksum = "a4735f265ba6a1188052ca32d461028a7d1125868be18e287e756019da7607b5"
589
590
  dependencies = [
590
- "ctor-proc-macro",
591
- "dtor",
591
+ "ctor-proc-macro 0.0.5",
592
+ "dtor 0.0.6",
593
+ ]
594
+
595
+ [[package]]
596
+ name = "ctor"
597
+ version = "0.5.0"
598
+ source = "registry+https://github.com/rust-lang/crates.io-index"
599
+ checksum = "67773048316103656a637612c4a62477603b777d91d9c62ff2290f9cde178fdb"
600
+ dependencies = [
601
+ "ctor-proc-macro 0.0.6",
602
+ "dtor 0.1.0",
592
603
  ]
593
604
 
594
605
  [[package]]
@@ -597,6 +608,12 @@ version = "0.0.5"
597
608
  source = "registry+https://github.com/rust-lang/crates.io-index"
598
609
  checksum = "4f211af61d8efdd104f96e57adf5e426ba1bc3ed7a4ead616e15e5881fd79c4d"
599
610
 
611
+ [[package]]
612
+ name = "ctor-proc-macro"
613
+ version = "0.0.6"
614
+ source = "registry+https://github.com/rust-lang/crates.io-index"
615
+ checksum = "e2931af7e13dc045d8e9d26afccc6fa115d64e115c9c84b1166288b46f6782c2"
616
+
600
617
  [[package]]
601
618
  name = "dashmap"
602
619
  version = "6.1.0"
@@ -659,7 +676,16 @@ version = "0.0.6"
659
676
  source = "registry+https://github.com/rust-lang/crates.io-index"
660
677
  checksum = "97cbdf2ad6846025e8e25df05171abfb30e3ababa12ee0a0e44b9bbe570633a8"
661
678
  dependencies = [
662
- "dtor-proc-macro",
679
+ "dtor-proc-macro 0.0.5",
680
+ ]
681
+
682
+ [[package]]
683
+ name = "dtor"
684
+ version = "0.1.0"
685
+ source = "registry+https://github.com/rust-lang/crates.io-index"
686
+ checksum = "e58a0764cddb55ab28955347b45be00ade43d4d6f3ba4bf3dc354e4ec9432934"
687
+ dependencies = [
688
+ "dtor-proc-macro 0.0.6",
663
689
  ]
664
690
 
665
691
  [[package]]
@@ -668,6 +694,12 @@ version = "0.0.5"
668
694
  source = "registry+https://github.com/rust-lang/crates.io-index"
669
695
  checksum = "7454e41ff9012c00d53cf7f475c5e3afa3b91b7c90568495495e8d9bf47a1055"
670
696
 
697
+ [[package]]
698
+ name = "dtor-proc-macro"
699
+ version = "0.0.6"
700
+ source = "registry+https://github.com/rust-lang/crates.io-index"
701
+ checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5"
702
+
671
703
  [[package]]
672
704
  name = "dyn-clone"
673
705
  version = "1.0.19"
@@ -687,7 +719,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
687
719
  checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e"
688
720
  dependencies = [
689
721
  "libc",
690
- "windows-sys 0.59.0",
722
+ "windows-sys 0.52.0",
691
723
  ]
692
724
 
693
725
  [[package]]
@@ -1084,13 +1116,13 @@ dependencies = [
1084
1116
 
1085
1117
  [[package]]
1086
1118
  name = "napi"
1087
- version = "3.1.4"
1119
+ version = "3.2.3"
1088
1120
  source = "registry+https://github.com/rust-lang/crates.io-index"
1089
- checksum = "bb4ea803c02e45ebdc6bb45627279e8bdc4e16662e442080cbbc97a8e54d49f7"
1121
+ checksum = "a9d2b1d275c7acd9d996e479f31ce1bd224d1958b3c696f47ba08dda0272dc62"
1090
1122
  dependencies = [
1091
1123
  "anyhow",
1092
1124
  "bitflags 2.9.0",
1093
- "ctor",
1125
+ "ctor 0.5.0",
1094
1126
  "napi-build",
1095
1127
  "napi-sys",
1096
1128
  "nohash-hasher",
@@ -1107,12 +1139,12 @@ checksum = "dcae8ad5609d14afb3a3b91dee88c757016261b151e9dcecabf1b2a31a6cab14"
1107
1139
 
1108
1140
  [[package]]
1109
1141
  name = "napi-derive"
1110
- version = "3.1.2"
1142
+ version = "3.2.2"
1111
1143
  source = "registry+https://github.com/rust-lang/crates.io-index"
1112
- checksum = "7e6d190d5e09d449b2b38127cdcdb7aed860599e492a15c73f977d5d87df69a5"
1144
+ checksum = "dd086ffe0174e091069fdd793c77b49e26fdd578cf497b11e906423942e354d4"
1113
1145
  dependencies = [
1114
1146
  "convert_case 0.8.0",
1115
- "ctor",
1147
+ "ctor 0.4.2",
1116
1148
  "napi-derive-backend",
1117
1149
  "proc-macro2",
1118
1150
  "quote",
@@ -1121,9 +1153,9 @@ dependencies = [
1121
1153
 
1122
1154
  [[package]]
1123
1155
  name = "napi-derive-backend"
1124
- version = "2.0.3"
1156
+ version = "2.1.2"
1125
1157
  source = "registry+https://github.com/rust-lang/crates.io-index"
1126
- checksum = "15158ced16693eaa0c709e4c9768ca08eb56325691e68510db8440d27ccd41d1"
1158
+ checksum = "ec60e1468ee7419894d30cb9aa494cafe2019e080938bda168cb6b7478f7fe2f"
1127
1159
  dependencies = [
1128
1160
  "convert_case 0.8.0",
1129
1161
  "proc-macro2",
@@ -1446,7 +1478,7 @@ dependencies = [
1446
1478
  "errno",
1447
1479
  "libc",
1448
1480
  "linux-raw-sys",
1449
- "windows-sys 0.59.0",
1481
+ "windows-sys 0.52.0",
1450
1482
  ]
1451
1483
 
1452
1484
  [[package]]
@@ -1534,9 +1566,9 @@ dependencies = [
1534
1566
 
1535
1567
  [[package]]
1536
1568
  name = "serde_json"
1537
- version = "1.0.141"
1569
+ version = "1.0.142"
1538
1570
  source = "registry+https://github.com/rust-lang/crates.io-index"
1539
- checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3"
1571
+ checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7"
1540
1572
  dependencies = [
1541
1573
  "indexmap",
1542
1574
  "itoa",
@@ -1684,7 +1716,7 @@ dependencies = [
1684
1716
  "getrandom",
1685
1717
  "once_cell",
1686
1718
  "rustix",
1687
- "windows-sys 0.59.0",
1719
+ "windows-sys 0.52.0",
1688
1720
  ]
1689
1721
 
1690
1722
  [[package]]
@@ -1793,6 +1825,18 @@ dependencies = [
1793
1825
  "mio 1.0.3",
1794
1826
  "pin-project-lite",
1795
1827
  "slab",
1828
+ "tokio-macros",
1829
+ ]
1830
+
1831
+ [[package]]
1832
+ name = "tokio-macros"
1833
+ version = "2.5.0"
1834
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1835
+ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
1836
+ dependencies = [
1837
+ "proc-macro2",
1838
+ "quote",
1839
+ "syn",
1796
1840
  ]
1797
1841
 
1798
1842
  [[package]]
@@ -1819,9 +1863,9 @@ dependencies = [
1819
1863
 
1820
1864
  [[package]]
1821
1865
  name = "toml_edit"
1822
- version = "0.23.2"
1866
+ version = "0.23.3"
1823
1867
  source = "registry+https://github.com/rust-lang/crates.io-index"
1824
- checksum = "d1dee9dc43ac2aaf7d3b774e2fba5148212bf2bd9374f4e50152ebe9afd03d42"
1868
+ checksum = "17d3b47e6b7a040216ae5302712c94d1cf88c95b47efa80e2c59ce96c878267e"
1825
1869
  dependencies = [
1826
1870
  "indexmap",
1827
1871
  "toml_datetime",
@@ -1832,9 +1876,9 @@ dependencies = [
1832
1876
 
1833
1877
  [[package]]
1834
1878
  name = "toml_parser"
1835
- version = "1.0.1"
1879
+ version = "1.0.2"
1836
1880
  source = "registry+https://github.com/rust-lang/crates.io-index"
1837
- checksum = "97200572db069e74c512a14117b296ba0a80a30123fbbb5aa1f4a348f639ca30"
1881
+ checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10"
1838
1882
  dependencies = [
1839
1883
  "winnow",
1840
1884
  ]
@@ -2290,7 +2334,7 @@ version = "0.1.9"
2290
2334
  source = "registry+https://github.com/rust-lang/crates.io-index"
2291
2335
  checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
2292
2336
  dependencies = [
2293
- "windows-sys 0.59.0",
2337
+ "windows-sys 0.48.0",
2294
2338
  ]
2295
2339
 
2296
2340
  [[package]]
@@ -7,7 +7,7 @@ resolver = "2"
7
7
  lto = true
8
8
 
9
9
  [workspace.package]
10
- version = "0.39.3"
10
+ version = "0.39.4"
11
11
  authors = ["Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com>"]
12
12
  edition = "2021"
13
13
  license = "MIT"
@@ -18,11 +18,11 @@ rust-version = "1.79"
18
18
  readme = "README.md"
19
19
 
20
20
  [workspace.dependencies]
21
- ast-grep-core = { path = "crates/core", version = "0.39.3", default-features = false }
22
- ast-grep-config = { path = "crates/config", version = "0.39.3" }
23
- ast-grep-dynamic = { path = "crates/dynamic", version = "0.39.3" }
24
- ast-grep-language = { path = "crates/language", version = "0.39.3" }
25
- ast-grep-lsp = { path = "crates/lsp", version = "0.39.3" }
21
+ ast-grep-core = { path = "crates/core", version = "0.39.4", default-features = false }
22
+ ast-grep-config = { path = "crates/config", version = "0.39.4" }
23
+ ast-grep-dynamic = { path = "crates/dynamic", version = "0.39.4" }
24
+ ast-grep-language = { path = "crates/language", version = "0.39.4" }
25
+ ast-grep-lsp = { path = "crates/lsp", version = "0.39.4" }
26
26
 
27
27
  bit-set = { version = "0.8.0" }
28
28
  ignore = { version = "0.4.22" }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ast-grep-py
3
- Version: 0.39.3
3
+ Version: 0.39.4
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Environment :: Console
6
6
  Classifier: Intended Audience :: Developers
@@ -0,0 +1,61 @@
1
+ #![cfg(test)]
2
+ use super::*;
3
+ use crate::test::{test_match_lang, test_replace_lang};
4
+
5
+ fn test_match(s1: &str, s2: &str) {
6
+ test_match_lang(s1, s2, Hcl)
7
+ }
8
+
9
+ #[test]
10
+ fn test_hcl_pattern() {
11
+ test_match("$A = $B", r#"foo = "bar""#);
12
+ test_match(
13
+ "resource $TYPE $NAME $BODY",
14
+ r#"resource "aws_instance" "example" { ami = "ami-123" }"#,
15
+ );
16
+ test_match(
17
+ "$BLOCK $BODY",
18
+ r#"terraform { required_providers { aws = { source = "hashicorp/aws" } } }"#,
19
+ );
20
+ test_match(
21
+ "variable $NAME $CONFIG",
22
+ r#"variable "region" { default = "us-west-2" }"#,
23
+ );
24
+ test_match(
25
+ "output $NAME $VALUE",
26
+ r#"output "instance_ip" { value = aws_instance.example.public_ip }"#,
27
+ );
28
+ test_match("$VAR = [$$$ITEMS]", r#"tags = ["production", "web"]"#);
29
+ test_match(
30
+ "$VAR = { $$$PAIRS }",
31
+ r#"labels = { environment = "prod", team = "backend" }"#,
32
+ );
33
+ test_match(r#"$VAR = "$CONTENT""#, r#"name = "instance""#);
34
+ }
35
+
36
+ fn test_replace(src: &str, pattern: &str, replacer: &str) -> String {
37
+ test_replace_lang(src, pattern, replacer, Hcl)
38
+ }
39
+
40
+ #[test]
41
+ fn test_hcl_replace() {
42
+ let ret = test_replace(r#"foo = "bar""#, r#"$A = $B"#, r#"$B = $A"#);
43
+ assert_eq!(ret, r#""bar" = foo"#);
44
+
45
+ let ret = test_replace(
46
+ r#"resource "aws_instance" "example" { ami = "ami-123" }"#,
47
+ r#"resource $TYPE $NAME $BODY"#,
48
+ r#"resource $NAME $TYPE $BODY"#,
49
+ );
50
+ assert_eq!(
51
+ ret,
52
+ r#"resource "example" "aws_instance" { ami = "ami-123" }"#
53
+ );
54
+
55
+ let ret = test_replace(
56
+ r#"variable "region" { default = "us-west-2" }"#,
57
+ r#"variable "region" { default = $DEFAULT }"#,
58
+ r#"variable "region" { default = "eu-west-1" }"#,
59
+ );
60
+ assert_eq!(ret, r#"variable "region" { default = "eu-west-1" }"#);
61
+ }
@@ -276,8 +276,8 @@ impl SupportLang {
276
276
  pub const fn all_langs() -> &'static [SupportLang] {
277
277
  use SupportLang::*;
278
278
  &[
279
- Bash, C, Cpp, CSharp, Css, Elixir, Go, Haskell, Hcl, Html, Java, JavaScript, Json, Kotlin, Lua,
280
- Nix, Php, Python, Ruby, Rust, Scala, Solidity, Swift, Tsx, TypeScript, Yaml,
279
+ Bash, C, Cpp, CSharp, Css, Elixir, Go, Haskell, Hcl, Html, Java, JavaScript, Json, Kotlin,
280
+ Lua, Nix, Php, Python, Ruby, Rust, Scala, Solidity, Swift, Tsx, TypeScript, Yaml,
281
281
  ]
282
282
  }
283
283
 
@@ -5,7 +5,7 @@ build-backend = "maturin"
5
5
  [project]
6
6
  name = "ast-grep-py"
7
7
  requires-python = ">=3.8"
8
- version = "0.39.3"
8
+ version = "0.39.4"
9
9
  description = "Structural Search and Rewrite code at large scale using precise AST pattern."
10
10
  authors = [{ name = "Herrington Darkholme", email = "2883231+HerringtonDarkholme@users.noreply.github.com" }]
11
11
  maintainers = [{ name = "Herrington Darkholme", email = "2883231+HerringtonDarkholme@users.noreply.github.com" }]
@@ -1,47 +0,0 @@
1
- #![cfg(test)]
2
- use super::*;
3
- use crate::test::{test_match_lang,test_replace_lang};
4
-
5
- fn test_match(s1: &str, s2: &str) {
6
- test_match_lang(s1, s2, Hcl)
7
- }
8
-
9
- #[test]
10
- fn test_hcl_pattern() {
11
- test_match("$A = $B", "foo = \"bar\"");
12
- test_match("resource $TYPE $NAME $BODY", "resource \"aws_instance\" \"example\" { ami = \"ami-123\" }");
13
- test_match("$BLOCK $BODY", "terraform { required_providers { aws = { source = \"hashicorp/aws\" } } }");
14
- test_match("variable $NAME $CONFIG", "variable \"region\" { default = \"us-west-2\" }");
15
- test_match("output $NAME $VALUE", "output \"instance_ip\" { value = aws_instance.example.public_ip }");
16
- test_match("$VAR = [$$$ITEMS]", "tags = [\"production\", \"web\"]");
17
- test_match("$VAR = { $$$PAIRS }", "labels = { environment = \"prod\", team = \"backend\" }");
18
- test_match("$VAR = \"$CONTENT\"", "name = \"instance\"");
19
- }
20
-
21
- fn test_replace(src: &str, pattern: &str, replacer: &str) -> String {
22
- test_replace_lang(src, pattern, replacer, Hcl)
23
- }
24
-
25
- #[test]
26
- fn test_hcl_replace() {
27
- let ret = test_replace(
28
- "foo = \"bar\"",
29
- "$A = $B",
30
- "$B = $A"
31
- );
32
- assert_eq!(ret, "\"bar\" = foo");
33
-
34
- let ret = test_replace(
35
- "resource \"aws_instance\" \"example\" { ami = \"ami-123\" }",
36
- "resource $TYPE $NAME $BODY",
37
- "resource $NAME $TYPE $BODY",
38
- );
39
- assert_eq!(ret, "resource \"example\" \"aws_instance\" { ami = \"ami-123\" }");
40
-
41
- let ret = test_replace(
42
- "variable \"region\" { default = \"us-west-2\" }",
43
- "variable \"region\" { default = $DEFAULT }",
44
- "variable \"region\" { default = \"eu-west-1\" }",
45
- );
46
- assert_eq!(ret, "variable \"region\" { default = \"eu-west-1\" }");
47
- }
File without changes