polyglot-piranha 0.3.25__tar.gz → 0.3.27__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.
Files changed (161) hide show
  1. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/Cargo.lock +127 -76
  2. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/Cargo.toml +4 -1
  3. polyglot_piranha-0.3.27/PKG-INFO +124 -0
  4. polyglot_piranha-0.3.27/README.md +108 -0
  5. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/lib.rs +27 -9
  6. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/main.rs +8 -1
  7. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/concrete_syntax.rs +1 -1
  8. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/default_configs.rs +5 -3
  9. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/language.rs +14 -4
  10. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/matches.rs +51 -1
  11. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/piranha_arguments.rs +2 -2
  12. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/source_code_unit.rs +1 -1
  13. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/unit_tests/source_code_unit_test.rs +156 -1
  14. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/mod.rs +2 -2
  15. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_python.rs +7 -4
  16. polyglot_piranha-0.3.27/src/tests/test_piranha_yaml.rs +24 -0
  17. polyglot_piranha-0.3.25/PKG-INFO +0 -57
  18. polyglot_piranha-0.3.25/README.md +0 -41
  19. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/EnumWithClassSymbol.java +0 -41
  20. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/PiranhaRuntimeException.java +0 -25
  21. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/PiranhaUtils.java +0 -151
  22. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/UsageCounter.java +0 -164
  23. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/XPFlagCleaner.java +0 -1607
  24. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/config/Config.java +0 -477
  25. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/config/MethodRecord.java +0 -121
  26. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/config/PiranhaConfigurationException.java +0 -12
  27. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/config/PiranhaEnumRecord.java +0 -79
  28. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/config/PiranhaMethodRecord.java +0 -107
  29. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/config/PiranhaRecord.java +0 -74
  30. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/testannotations/AnnotationArgument.java +0 -65
  31. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/testannotations/AnnotationResolutionException.java +0 -14
  32. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/testannotations/ResolvedTestAnnotation.java +0 -73
  33. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/testannotations/TestAnnotationResolver.java +0 -295
  34. polyglot_piranha-0.3.25/legacy/java/piranha/src/main/java/com/uber/piranha/testannotations/TestAnnotationSpecRecord.java +0 -152
  35. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/java/com/uber/piranha/ConfigurationTest.java +0 -1845
  36. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/java/com/uber/piranha/CorePiranhaTest.java +0 -1197
  37. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/java/com/uber/piranha/EnumConstantTest.java +0 -1256
  38. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/java/com/uber/piranha/PiranhaTestingHelpers.java +0 -60
  39. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/java/com/uber/piranha/TestCaseCleanUpTest.java +0 -836
  40. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/java/com/uber/piranha/TreatmentGroupsTest.java +0 -173
  41. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPFlagCleanerNegativeCases.java +0 -114
  42. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPFlagCleanerPositiveCases.java +0 -289
  43. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPFlagCleanerPositiveCasesControl.java +0 -193
  44. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPFlagCleanerPositiveCasesTreatment.java +0 -197
  45. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPMethodChainCases.java +0 -97
  46. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPMethodChainCasesControl.java +0 -73
  47. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPMethodChainCasesDoNotAllowMethodChain.java +0 -82
  48. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPMethodChainCasesDoNotallowArgMatchingAndMethodChain.java +0 -86
  49. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPMethodChainCasesTreatment.java +0 -73
  50. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPMethodChainCasesTreatmentDoNotAllowMatchingArgMethodInvc.java +0 -74
  51. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/XPTest.java +0 -68
  52. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/mock/BoolParam.java +0 -5
  53. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/mock/BoolParameter.java +0 -7
  54. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/mock/OverlappingNameInterface.java +0 -9
  55. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/mock/PVal.java +0 -9
  56. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/mock/Parameter.java +0 -8
  57. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/mock/SomeOtherInterface.java +0 -9
  58. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/mock/SomeParamRev.java +0 -9
  59. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/com/uber/piranha/mock/StaticMthds.java +0 -8
  60. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/invalid/piranha.properties +0 -6
  61. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/invalid/properties_test_invalid.json +0 -7
  62. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/invalid/properties_test_invalid_2.json +0 -13
  63. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/invalid/properties_test_invalid_3.json +0 -13
  64. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/invalid/properties_test_invalid_4.json +0 -13
  65. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_enum_no_arg.json +0 -16
  66. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_method_chain_control.json +0 -30
  67. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_method_chain_treated.json +0 -30
  68. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_no_flag_method_name.json +0 -29
  69. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_no_flag_method_name_no_method_chain.json +0 -29
  70. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_no_method_chain.json +0 -30
  71. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_argument.json +0 -34
  72. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_clean_by_setters_ignore_others.json +0 -60
  73. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_noFlag.json +0 -12
  74. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_noTreatmentGroup.json +0 -38
  75. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_receive.json +0 -29
  76. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_receive_argument.json +0 -76
  77. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_return.json +0 -38
  78. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_return_argument.json +0 -76
  79. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_return_receive.json +0 -76
  80. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_return_receive_argument.json +0 -172
  81. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_with_enum_no_match.json +0 -15
  82. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_with_enum_wrong_arg.json +0 -15
  83. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_test_without_enum.json +0 -9
  84. polyglot_piranha-0.3.25/legacy/java/piranha/src/test/resources/config/properties_unnecessary_instance_method.json +0 -74
  85. polyglot_piranha-0.3.25/legacy/java/sample/src/main/java/com/uber/mylib/MyClass.java +0 -50
  86. polyglot_piranha-0.3.25/legacy/java/sample/src/main/resources/com/uber/mylib/MyClass.bak +0 -50
  87. polyglot_piranha-0.3.25/legacy/java/sample/src/main/resources/com/uber/mylib/MyClass.expect +0 -46
  88. polyglot_piranha-0.3.25/legacy/javascript/src/config_checker.js +0 -69
  89. polyglot_piranha-0.3.25/legacy/javascript/src/piranha.js +0 -139
  90. polyglot_piranha-0.3.25/legacy/javascript/src/refactor.js +0 -727
  91. polyglot_piranha-0.3.25/legacy/javascript/src/source_checker.js +0 -41
  92. polyglot_piranha-0.3.25/legacy/objc/src/XPFlagRefactoring/CMakeLists.txt +0 -21
  93. polyglot_piranha-0.3.25/legacy/objc/src/XPFlagRefactoring/README.txt +0 -16
  94. polyglot_piranha-0.3.25/legacy/objc/src/XPFlagRefactoring/XPFlagRefactoring.cpp +0 -770
  95. polyglot_piranha-0.3.25/legacy/objc/src/XPFlagRefactoring/XPFlagRefactoring.exports +0 -0
  96. polyglot_piranha-0.3.25/site/src/components/AdditionalContent/index.js +0 -68
  97. polyglot_piranha-0.3.25/site/src/components/AdditionalContent/styles.module.css +0 -25
  98. polyglot_piranha-0.3.25/site/src/components/HomepageFeatures/index.js +0 -55
  99. polyglot_piranha-0.3.25/site/src/components/HomepageFeatures/styles.module.css +0 -11
  100. polyglot_piranha-0.3.25/site/src/css/custom.css +0 -29
  101. polyglot_piranha-0.3.25/site/src/pages/index.js +0 -48
  102. polyglot_piranha-0.3.25/site/src/pages/index.module.css +0 -23
  103. polyglot_piranha-0.3.25/src/tests/test_piranha_ruby.rs +0 -32
  104. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/LICENSE +0 -0
  105. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/plugins/pyproject.toml +0 -0
  106. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/pyproject.toml +0 -0
  107. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/go/edges.toml +0 -0
  108. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/go/rules.toml +0 -0
  109. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/go/scope_config.toml +0 -0
  110. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/java/edges.toml +0 -0
  111. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/java/rules.toml +0 -0
  112. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/java/scope_config.toml +0 -0
  113. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/java_cs/edges.toml +0 -0
  114. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/java_cs/rules.toml +0 -0
  115. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/java_cs/scope_config.toml +0 -0
  116. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/kt/edges.toml +0 -0
  117. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/kt/rules.toml +0 -0
  118. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/kt/scope_config.toml +0 -0
  119. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/ruby/edges.toml +0 -0
  120. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/ruby/rules.toml +0 -0
  121. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/ruby/scope_config.toml +0 -0
  122. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/scala/scope_config.toml +0 -0
  123. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/swift/edges.toml +0 -0
  124. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/swift/rules.toml +0 -0
  125. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/cleanup_rules/swift/scope_config.toml +0 -0
  126. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/df/README.md +0 -0
  127. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/df/analysis.rs +0 -0
  128. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/df/mod.rs +0 -0
  129. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/df/tag_analysis.rs +0 -0
  130. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/df/unit_tests/tag_analysis_test.rs +0 -0
  131. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/df/utils.rs +0 -0
  132. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/capture_group_patterns.rs +0 -0
  133. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/edit.rs +0 -0
  134. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/filter.rs +0 -0
  135. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/mod.rs +0 -0
  136. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/outgoing_edges.rs +0 -0
  137. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/piranha_output.rs +0 -0
  138. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/rule.rs +0 -0
  139. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/rule_graph.rs +0 -0
  140. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/rule_store.rs +0 -0
  141. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/scopes.rs +0 -0
  142. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/unit_tests/concrete_syntax_test.rs +0 -0
  143. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/unit_tests/piranha_arguments_test.rs +0 -0
  144. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/unit_tests/rule_graph_validation_test.rs +0 -0
  145. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/unit_tests/rule_test.rs +0 -0
  146. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/models/unit_tests/scopes_test.rs +0 -0
  147. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_go.rs +0 -0
  148. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_java.rs +0 -0
  149. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_kt.rs +0 -0
  150. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_scala.rs +0 -0
  151. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_scm.rs +0 -0
  152. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_strings.rs +0 -0
  153. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_swift.rs +0 -0
  154. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_thrift.rs +0 -0
  155. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_ts.rs +0 -0
  156. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/tests/test_piranha_tsx.rs +0 -0
  157. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/utilities/mod.rs +0 -0
  158. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/utilities/regex_utilities.rs +0 -0
  159. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/utilities/tree_sitter_utilities.rs +0 -0
  160. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/utilities/unit_tests/tree_sitter_utilities_test.rs +0 -0
  161. {polyglot_piranha-0.3.25 → polyglot_piranha-0.3.27}/src/utilities/unit_tests/utilities_test.rs +0 -0
@@ -13,9 +13,9 @@ dependencies = [
13
13
 
14
14
  [[package]]
15
15
  name = "anstream"
16
- version = "0.6.14"
16
+ version = "0.6.15"
17
17
  source = "registry+https://github.com/rust-lang/crates.io-index"
18
- checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b"
18
+ checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
19
19
  dependencies = [
20
20
  "anstyle",
21
21
  "anstyle-parse",
@@ -28,33 +28,33 @@ dependencies = [
28
28
 
29
29
  [[package]]
30
30
  name = "anstyle"
31
- version = "1.0.7"
31
+ version = "1.0.8"
32
32
  source = "registry+https://github.com/rust-lang/crates.io-index"
33
- checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b"
33
+ checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
34
34
 
35
35
  [[package]]
36
36
  name = "anstyle-parse"
37
- version = "0.2.4"
37
+ version = "0.2.5"
38
38
  source = "registry+https://github.com/rust-lang/crates.io-index"
39
- checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4"
39
+ checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
40
40
  dependencies = [
41
41
  "utf8parse",
42
42
  ]
43
43
 
44
44
  [[package]]
45
45
  name = "anstyle-query"
46
- version = "1.1.0"
46
+ version = "1.1.1"
47
47
  source = "registry+https://github.com/rust-lang/crates.io-index"
48
- checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391"
48
+ checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
49
49
  dependencies = [
50
50
  "windows-sys 0.52.0",
51
51
  ]
52
52
 
53
53
  [[package]]
54
54
  name = "anstyle-wincon"
55
- version = "3.0.3"
55
+ version = "3.0.4"
56
56
  source = "registry+https://github.com/rust-lang/crates.io-index"
57
- checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19"
57
+ checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
58
58
  dependencies = [
59
59
  "anstyle",
60
60
  "windows-sys 0.52.0",
@@ -68,13 +68,14 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
68
68
 
69
69
  [[package]]
70
70
  name = "assert_cmd"
71
- version = "2.0.14"
71
+ version = "2.0.16"
72
72
  source = "registry+https://github.com/rust-lang/crates.io-index"
73
- checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8"
73
+ checksum = "dc1835b7f27878de8525dc71410b5a31cdcc5f230aed5ba5df968e09c201b23d"
74
74
  dependencies = [
75
75
  "anstyle",
76
76
  "bstr",
77
77
  "doc-comment",
78
+ "libc",
78
79
  "predicates",
79
80
  "predicates-core",
80
81
  "predicates-tree",
@@ -95,9 +96,9 @@ checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
95
96
 
96
97
  [[package]]
97
98
  name = "bstr"
98
- version = "1.9.1"
99
+ version = "1.10.0"
99
100
  source = "registry+https://github.com/rust-lang/crates.io-index"
100
- checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706"
101
+ checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c"
101
102
  dependencies = [
102
103
  "memchr",
103
104
  "regex-automata",
@@ -116,11 +117,17 @@ version = "1.0.0"
116
117
  source = "registry+https://github.com/rust-lang/crates.io-index"
117
118
  checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
118
119
 
120
+ [[package]]
121
+ name = "cfg_aliases"
122
+ version = "0.2.1"
123
+ source = "registry+https://github.com/rust-lang/crates.io-index"
124
+ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
125
+
119
126
  [[package]]
120
127
  name = "clap"
121
- version = "4.5.9"
128
+ version = "4.5.16"
122
129
  source = "registry+https://github.com/rust-lang/crates.io-index"
123
- checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462"
130
+ checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019"
124
131
  dependencies = [
125
132
  "clap_builder",
126
133
  "clap_derive",
@@ -128,9 +135,9 @@ dependencies = [
128
135
 
129
136
  [[package]]
130
137
  name = "clap_builder"
131
- version = "4.5.9"
138
+ version = "4.5.15"
132
139
  source = "registry+https://github.com/rust-lang/crates.io-index"
133
- checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942"
140
+ checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6"
134
141
  dependencies = [
135
142
  "anstream",
136
143
  "anstyle",
@@ -140,27 +147,27 @@ dependencies = [
140
147
 
141
148
  [[package]]
142
149
  name = "clap_derive"
143
- version = "4.5.8"
150
+ version = "4.5.13"
144
151
  source = "registry+https://github.com/rust-lang/crates.io-index"
145
- checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085"
152
+ checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0"
146
153
  dependencies = [
147
154
  "heck 0.5.0",
148
155
  "proc-macro2",
149
156
  "quote",
150
- "syn 2.0.71",
157
+ "syn 2.0.77",
151
158
  ]
152
159
 
153
160
  [[package]]
154
161
  name = "clap_lex"
155
- version = "0.7.1"
162
+ version = "0.7.2"
156
163
  source = "registry+https://github.com/rust-lang/crates.io-index"
157
- checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70"
164
+ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
158
165
 
159
166
  [[package]]
160
167
  name = "colorchoice"
161
- version = "1.0.1"
168
+ version = "1.0.2"
162
169
  source = "registry+https://github.com/rust-lang/crates.io-index"
163
- checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422"
170
+ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
164
171
 
165
172
  [[package]]
166
173
  name = "colored"
@@ -228,6 +235,16 @@ version = "0.8.20"
228
235
  source = "registry+https://github.com/rust-lang/crates.io-index"
229
236
  checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
230
237
 
238
+ [[package]]
239
+ name = "ctrlc"
240
+ version = "3.4.5"
241
+ source = "registry+https://github.com/rust-lang/crates.io-index"
242
+ checksum = "90eeab0aa92f3f9b4e87f258c72b139c207d251f9cbc1080a0086b86a8870dd3"
243
+ dependencies = [
244
+ "nix",
245
+ "windows-sys 0.59.0",
246
+ ]
247
+
231
248
  [[package]]
232
249
  name = "darling"
233
250
  version = "0.14.4"
@@ -390,9 +407,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
390
407
 
391
408
  [[package]]
392
409
  name = "hermit-abi"
393
- version = "0.3.9"
410
+ version = "0.4.0"
394
411
  source = "registry+https://github.com/rust-lang/crates.io-index"
395
- checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
412
+ checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
396
413
 
397
414
  [[package]]
398
415
  name = "humantime"
@@ -408,9 +425,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
408
425
 
409
426
  [[package]]
410
427
  name = "indexmap"
411
- version = "2.2.6"
428
+ version = "2.5.0"
412
429
  source = "registry+https://github.com/rust-lang/crates.io-index"
413
- checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
430
+ checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5"
414
431
  dependencies = [
415
432
  "equivalent",
416
433
  "hashbrown",
@@ -424,9 +441,9 @@ checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
424
441
 
425
442
  [[package]]
426
443
  name = "is-terminal"
427
- version = "0.4.12"
444
+ version = "0.4.13"
428
445
  source = "registry+https://github.com/rust-lang/crates.io-index"
429
- checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
446
+ checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"
430
447
  dependencies = [
431
448
  "hermit-abi",
432
449
  "libc",
@@ -435,9 +452,9 @@ dependencies = [
435
452
 
436
453
  [[package]]
437
454
  name = "is_terminal_polyfill"
438
- version = "1.70.0"
455
+ version = "1.70.1"
439
456
  source = "registry+https://github.com/rust-lang/crates.io-index"
440
- checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800"
457
+ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
441
458
 
442
459
  [[package]]
443
460
  name = "itertools"
@@ -478,9 +495,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
478
495
 
479
496
  [[package]]
480
497
  name = "libc"
481
- version = "0.2.155"
498
+ version = "0.2.158"
482
499
  source = "registry+https://github.com/rust-lang/crates.io-index"
483
- checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
500
+ checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
484
501
 
485
502
  [[package]]
486
503
  name = "lock_api"
@@ -513,6 +530,18 @@ dependencies = [
513
530
  "autocfg",
514
531
  ]
515
532
 
533
+ [[package]]
534
+ name = "nix"
535
+ version = "0.29.0"
536
+ source = "registry+https://github.com/rust-lang/crates.io-index"
537
+ checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
538
+ dependencies = [
539
+ "bitflags",
540
+ "cfg-if",
541
+ "cfg_aliases",
542
+ "libc",
543
+ ]
544
+
516
545
  [[package]]
517
546
  name = "normalize-line-endings"
518
547
  version = "0.3.0"
@@ -559,12 +588,13 @@ dependencies = [
559
588
 
560
589
  [[package]]
561
590
  name = "piranha"
562
- version = "0.3.25"
591
+ version = "0.3.27"
563
592
  dependencies = [
564
593
  "assert_cmd",
565
594
  "cc",
566
595
  "clap",
567
596
  "colored",
597
+ "ctrlc",
568
598
  "derive_builder",
569
599
  "env_logger",
570
600
  "getset",
@@ -596,19 +626,20 @@ dependencies = [
596
626
  "tree-sitter-thrift",
597
627
  "tree-sitter-traversal",
598
628
  "tree-sitter-typescript",
629
+ "tree-sitter-yaml",
599
630
  ]
600
631
 
601
632
  [[package]]
602
633
  name = "portable-atomic"
603
- version = "1.6.0"
634
+ version = "1.7.0"
604
635
  source = "registry+https://github.com/rust-lang/crates.io-index"
605
- checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"
636
+ checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265"
606
637
 
607
638
  [[package]]
608
639
  name = "predicates"
609
- version = "3.1.0"
640
+ version = "3.1.2"
610
641
  source = "registry+https://github.com/rust-lang/crates.io-index"
611
- checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8"
642
+ checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97"
612
643
  dependencies = [
613
644
  "anstyle",
614
645
  "difflib",
@@ -620,15 +651,15 @@ dependencies = [
620
651
 
621
652
  [[package]]
622
653
  name = "predicates-core"
623
- version = "1.0.6"
654
+ version = "1.0.8"
624
655
  source = "registry+https://github.com/rust-lang/crates.io-index"
625
- checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174"
656
+ checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931"
626
657
 
627
658
  [[package]]
628
659
  name = "predicates-tree"
629
- version = "1.0.9"
660
+ version = "1.0.11"
630
661
  source = "registry+https://github.com/rust-lang/crates.io-index"
631
- checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf"
662
+ checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13"
632
663
  dependencies = [
633
664
  "predicates-core",
634
665
  "termtree",
@@ -725,7 +756,7 @@ dependencies = [
725
756
  "proc-macro2",
726
757
  "pyo3-macros-backend",
727
758
  "quote",
728
- "syn 2.0.71",
759
+ "syn 2.0.77",
729
760
  ]
730
761
 
731
762
  [[package]]
@@ -738,14 +769,14 @@ dependencies = [
738
769
  "proc-macro2",
739
770
  "pyo3-build-config",
740
771
  "quote",
741
- "syn 2.0.71",
772
+ "syn 2.0.77",
742
773
  ]
743
774
 
744
775
  [[package]]
745
776
  name = "quote"
746
- version = "1.0.36"
777
+ version = "1.0.37"
747
778
  source = "registry+https://github.com/rust-lang/crates.io-index"
748
- checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
779
+ checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
749
780
  dependencies = [
750
781
  "proc-macro2",
751
782
  ]
@@ -818,9 +849,9 @@ dependencies = [
818
849
 
819
850
  [[package]]
820
851
  name = "regex"
821
- version = "1.10.5"
852
+ version = "1.10.6"
822
853
  source = "registry+https://github.com/rust-lang/crates.io-index"
823
- checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
854
+ checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
824
855
  dependencies = [
825
856
  "aho-corasick",
826
857
  "memchr",
@@ -868,40 +899,41 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
868
899
 
869
900
  [[package]]
870
901
  name = "serde"
871
- version = "1.0.204"
902
+ version = "1.0.209"
872
903
  source = "registry+https://github.com/rust-lang/crates.io-index"
873
- checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12"
904
+ checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
874
905
  dependencies = [
875
906
  "serde_derive",
876
907
  ]
877
908
 
878
909
  [[package]]
879
910
  name = "serde_derive"
880
- version = "1.0.204"
911
+ version = "1.0.209"
881
912
  source = "registry+https://github.com/rust-lang/crates.io-index"
882
- checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
913
+ checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
883
914
  dependencies = [
884
915
  "proc-macro2",
885
916
  "quote",
886
- "syn 2.0.71",
917
+ "syn 2.0.77",
887
918
  ]
888
919
 
889
920
  [[package]]
890
921
  name = "serde_json"
891
- version = "1.0.120"
922
+ version = "1.0.127"
892
923
  source = "registry+https://github.com/rust-lang/crates.io-index"
893
- checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5"
924
+ checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
894
925
  dependencies = [
895
926
  "itoa",
927
+ "memchr",
896
928
  "ryu",
897
929
  "serde",
898
930
  ]
899
931
 
900
932
  [[package]]
901
933
  name = "serde_spanned"
902
- version = "0.6.6"
934
+ version = "0.6.7"
903
935
  source = "registry+https://github.com/rust-lang/crates.io-index"
904
- checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0"
936
+ checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d"
905
937
  dependencies = [
906
938
  "serde",
907
939
  ]
@@ -937,9 +969,9 @@ dependencies = [
937
969
 
938
970
  [[package]]
939
971
  name = "syn"
940
- version = "2.0.71"
972
+ version = "2.0.77"
941
973
  source = "registry+https://github.com/rust-lang/crates.io-index"
942
- checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462"
974
+ checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
943
975
  dependencies = [
944
976
  "proc-macro2",
945
977
  "quote",
@@ -948,9 +980,9 @@ dependencies = [
948
980
 
949
981
  [[package]]
950
982
  name = "target-lexicon"
951
- version = "0.12.15"
983
+ version = "0.12.16"
952
984
  source = "registry+https://github.com/rust-lang/crates.io-index"
953
- checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2"
985
+ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
954
986
 
955
987
  [[package]]
956
988
  name = "tempdir"
@@ -979,9 +1011,9 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
979
1011
 
980
1012
  [[package]]
981
1013
  name = "toml"
982
- version = "0.8.14"
1014
+ version = "0.8.19"
983
1015
  source = "registry+https://github.com/rust-lang/crates.io-index"
984
- checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335"
1016
+ checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
985
1017
  dependencies = [
986
1018
  "serde",
987
1019
  "serde_spanned",
@@ -991,18 +1023,18 @@ dependencies = [
991
1023
 
992
1024
  [[package]]
993
1025
  name = "toml_datetime"
994
- version = "0.6.6"
1026
+ version = "0.6.8"
995
1027
  source = "registry+https://github.com/rust-lang/crates.io-index"
996
- checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
1028
+ checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
997
1029
  dependencies = [
998
1030
  "serde",
999
1031
  ]
1000
1032
 
1001
1033
  [[package]]
1002
1034
  name = "toml_edit"
1003
- version = "0.22.15"
1035
+ version = "0.22.20"
1004
1036
  source = "registry+https://github.com/rust-lang/crates.io-index"
1005
- checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1"
1037
+ checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d"
1006
1038
  dependencies = [
1007
1039
  "indexmap",
1008
1040
  "serde",
@@ -1137,6 +1169,16 @@ dependencies = [
1137
1169
  "tree-sitter",
1138
1170
  ]
1139
1171
 
1172
+ [[package]]
1173
+ name = "tree-sitter-yaml"
1174
+ version = "0.0.1"
1175
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1176
+ checksum = "324767d0ad6bc588467aa4b98f6f5cd6eda64ece1eae568f8fcf5b899bcf0fe9"
1177
+ dependencies = [
1178
+ "cc",
1179
+ "tree-sitter",
1180
+ ]
1181
+
1140
1182
  [[package]]
1141
1183
  name = "unicode-ident"
1142
1184
  version = "1.0.12"
@@ -1157,9 +1199,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
1157
1199
 
1158
1200
  [[package]]
1159
1201
  name = "version_check"
1160
- version = "0.9.4"
1202
+ version = "0.9.5"
1161
1203
  source = "registry+https://github.com/rust-lang/crates.io-index"
1162
- checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
1204
+ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
1163
1205
 
1164
1206
  [[package]]
1165
1207
  name = "wait-timeout"
@@ -1188,11 +1230,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1188
1230
 
1189
1231
  [[package]]
1190
1232
  name = "winapi-util"
1191
- version = "0.1.8"
1233
+ version = "0.1.9"
1192
1234
  source = "registry+https://github.com/rust-lang/crates.io-index"
1193
- checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b"
1235
+ checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
1194
1236
  dependencies = [
1195
- "windows-sys 0.52.0",
1237
+ "windows-sys 0.59.0",
1196
1238
  ]
1197
1239
 
1198
1240
  [[package]]
@@ -1219,6 +1261,15 @@ dependencies = [
1219
1261
  "windows-targets 0.52.6",
1220
1262
  ]
1221
1263
 
1264
+ [[package]]
1265
+ name = "windows-sys"
1266
+ version = "0.59.0"
1267
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1268
+ checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
1269
+ dependencies = [
1270
+ "windows-targets 0.52.6",
1271
+ ]
1272
+
1222
1273
  [[package]]
1223
1274
  name = "windows-targets"
1224
1275
  version = "0.48.5"
@@ -1342,9 +1393,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
1342
1393
 
1343
1394
  [[package]]
1344
1395
  name = "winnow"
1345
- version = "0.6.13"
1396
+ version = "0.6.18"
1346
1397
  source = "registry+https://github.com/rust-lang/crates.io-index"
1347
- checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1"
1398
+ checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f"
1348
1399
  dependencies = [
1349
1400
  "memchr",
1350
1401
  ]
@@ -2,7 +2,7 @@
2
2
  authors = ["Uber Technologies Inc."]
3
3
  name = "piranha"
4
4
  description = "Polyglot Piranha is a library for performing structural find and replace with deep cleanup."
5
- version = "0.3.25"
5
+ version = "0.3.27"
6
6
  edition = "2021"
7
7
  include = ["pyproject.toml", "src/"]
8
8
  exclude = ["legacy"]
@@ -44,6 +44,7 @@ log = "0.4.16"
44
44
  env_logger = "0.10.0"
45
45
  tempdir = "0.3"
46
46
  serde_json = "1.0.82"
47
+ ctrlc = "3.4"
47
48
 
48
49
  # TODO: Update if we upgrade tree-sitter to >=0.21
49
50
  tree-sitter-kotlin = "=0.3.5"
@@ -59,6 +60,8 @@ tree-sitter-thrift = "0.5.0"
59
60
  tree-sitter-strings = { git = "https://github.com/uber/tree-sitter-strings.git" }
60
61
  tree-sitter-query = "0.1.0"
61
62
  tree-sitter-scala = "0.20.1"
63
+ # newer versions of "tree-sitter-yaml" require that we bump "tree-sitter" version
64
+ tree-sitter-yaml = "0.0.1"
62
65
  derive_builder = "0.12.0"
63
66
  getset = "0.1.2"
64
67
  pyo3 = "0.20.0"
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.3
2
+ Name: polyglot_piranha
3
+ Version: 0.3.27
4
+ License-File: LICENSE
5
+ License-File: NOTICE
6
+ Summary: Polyglot Piranha is a library for performing structural find and replace with deep cleanup.
7
+ Keywords: refactoring,code update,structural find-replace,structural search and replace,structural search
8
+ Author: Uber Technologies Inc.
9
+ License: Apache-2.0
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
12
+ Project-URL: homepage, https://github.com/uber/piranha
13
+ Project-URL: documentation, https://github.com/uber/piranha
14
+ Project-URL: repository, https://github.com/uber/piranha
15
+
16
+ # PolyglotPiranha
17
+
18
+ PolyglotPiranha is a lightweight code transformation toolset for automating large scale changes. At Uber, it is mostly used to clean up stale feature flags.
19
+
20
+
21
+ ## Installation
22
+
23
+ To install Polyglot Piranha, you can use it as a Python library or as a command-line tool.
24
+
25
+ ### Python API
26
+
27
+ To install the Python API, run the following command:
28
+
29
+ ```bash
30
+ pip install polyglot-piranha
31
+ ```
32
+
33
+ ### Command-line Interface
34
+
35
+ To install the command-line interface, follow these steps:
36
+
37
+ 1. Install [Rust](https://www.rust-lang.org/tools/install)
38
+ 2. Clone the repository: `git clone https://github.com/uber/piranha.git`
39
+ 3. Navigate to the cloned directory: `cd piranha`
40
+ 4. Build the project: `cargo build --release` (or `cargo build --release --no-default-features` for macOS)
41
+ 5. The binary will be generated under `target/release`
42
+
43
+ ## Example Usage
44
+
45
+ ```python
46
+ from polyglot_piranha import execute_piranha, PiranhaArguments, Rule, RuleGraph, OutgoingEdges
47
+
48
+ # Original code snippet
49
+ code = """
50
+ if (obj.isLocEnabled() || x > 0) {
51
+ // do something
52
+ } else {
53
+ // do something else!
54
+ }
55
+ """
56
+
57
+ # Define the rule to replace the method call
58
+ r1 = Rule(
59
+ name="replace_method",
60
+ query="cs :[x].isLocEnabled()", # cs indicates we are using concrete syntax
61
+ replace_node="*",
62
+ replace="true",
63
+ is_seed_rule=True
64
+ )
65
+
66
+ # Define the edges for the rule graph.
67
+ # In this case, boolean_literal_cleanup is already defined for java [see src/cleanup_rules]
68
+ edge = OutgoingEdges("replace_method", to=["boolean_literal_cleanup"], scope="parent")
69
+
70
+ # Create Piranha arguments
71
+ piranha_arguments = PiranhaArguments(
72
+ code_snippet=code,
73
+ language="java",
74
+ rule_graph=RuleGraph(rules=[r1], edges=[edge])
75
+ )
76
+
77
+ # Execute Piranha and print the transformed code
78
+ piranha_summary = execute_piranha(piranha_arguments)
79
+ print(piranha_summary[0].content)
80
+ ```
81
+
82
+
83
+ ## Documentation
84
+
85
+ For more examples and explanations of the toolset, please check our demos and extended [POLYGLOT_README.md](POLYGLOT_README.md) file.
86
+
87
+
88
+ ## Feature Flags
89
+
90
+
91
+ Feature flags are commonly used to enable gradual rollout or experiment with new features. In a few cases, even after the purpose of the flag is accomplished, the code pertaining to the feature flag is not removed. We refer to such flags as stale flags. The presence of code pertaining to stale flags can have the following drawbacks:
92
+ - Unnecessary code clutter increases the overall complexity w.r.t maintenance resulting in reduced developer productivity
93
+ - The flags can interfere with other experimental flags (e.g., due to nesting under a flag that is always false)
94
+ - Presence of unused code in the source as well as the binary
95
+ - Stale flags can also cause bugs
96
+
97
+ PolyglotPiranha is a tool that can automatically refactor code related to stale flags. At a higher level, the input to the tool is the name of the flag and the expected behavior, after specifying a list of APIs related to flags in a properties file. Piranha will use these inputs to automatically refactor the code according to the expected behavior.
98
+
99
+ PolyglotPiranha (as of May 2022) is a common refactoring tool to support multiple languages and feature flag APIs.
100
+ For legacy language-specific implementations please check following [tag](https://github.com/uber/piranha/releases/tag/last-version-having-legacy-piranha).
101
+
102
+
103
+
104
+ A few additional links on Piranha:
105
+
106
+ - Research paper published at [PLDI 2024](https://dl.acm.org/doi/10.1145/3656429) on PolyglotPiranha.
107
+ - A technical [report](report.pdf) detailing our experiences with using Piranha at Uber.
108
+ - A [blogpost](https://eng.uber.com/piranha/) presenting more information on Piranha.
109
+ - 6 minute [video](https://www.youtube.com/watch?v=V5XirDs6LX8&feature=emb_logo) overview of Piranha.
110
+
111
+ ## Support
112
+
113
+ If you have any questions on how to use Piranha or find any bugs, please [open a GitHub issue](https://github.com/uber/piranha/issues).
114
+
115
+ ## Contributors
116
+
117
+ We'd love for you to contribute to Piranha! Please note that once
118
+ you create a pull request, you will be asked to sign our [Uber Contributor License Agreement](https://cla-assistant.io/uber/piranha).
119
+
120
+ We are also looking for contributions to extend Piranha to other languages (C++, C#, Kotlin).
121
+
122
+ ## License
123
+ Piranha is licensed under the Apache 2.0 license. See the LICENSE file for more information.
124
+