polyglot-piranha 0.3.32__tar.gz → 0.3.33__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.
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/Cargo.lock +2 -2
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/Cargo.toml +2 -2
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/PKG-INFO +1 -1
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/concrete_syntax_test.rs +17 -1
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/LICENSE +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/NOTICE +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/README.md +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/plugins/pyproject.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/pyproject.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/go/edges.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/go/rules.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/go/scope_config.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/java/edges.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/java/rules.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/java/scope_config.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/java_cs/edges.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/java_cs/rules.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/java_cs/scope_config.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/kt/edges.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/kt/rules.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/kt/scope_config.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/ruby/edges.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/ruby/rules.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/ruby/scope_config.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/scala/scope_config.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/swift/edges.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/swift/rules.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/swift/scope_config.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/df/README.md +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/df/analysis.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/df/mod.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/df/tag_analysis.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/df/unit_tests/tag_analysis_test.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/df/utils.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/lib.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/main.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/capture_group_patterns.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/concrete_syntax.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/default_configs.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/edit.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/filter.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/language.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/matches.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/mod.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/outgoing_edges.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/piranha_arguments.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/piranha_output.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/rule.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/rule_graph.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/rule_store.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/scopes.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/source_code_unit.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/piranha_arguments_test.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/rule_graph_validation_test.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/rule_test.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/scopes_test.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/source_code_unit_test.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/testdata/custom_builtin/edges.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/testdata/custom_builtin/rules.toml +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/mod.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_go.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_java.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_kt.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_python.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_scala.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_scm.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_strings.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_swift.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_thrift.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_ts.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_tsx.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/tests/test_piranha_yaml.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/utilities/mod.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/utilities/regex_utilities.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/utilities/tree_sitter_utilities.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/utilities/unit_tests/tree_sitter_utilities_test.rs +0 -0
- {polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/utilities/unit_tests/utilities_test.rs +0 -0
@@ -595,7 +595,7 @@ dependencies = [
|
|
595
595
|
|
596
596
|
[[package]]
|
597
597
|
name = "piranha"
|
598
|
-
version = "0.3.
|
598
|
+
version = "0.3.33"
|
599
599
|
dependencies = [
|
600
600
|
"assert_cmd",
|
601
601
|
"cc",
|
@@ -1087,7 +1087,7 @@ dependencies = [
|
|
1087
1087
|
[[package]]
|
1088
1088
|
name = "tree-sitter-kotlin"
|
1089
1089
|
version = "0.3.5"
|
1090
|
-
source = "git+https://github.com/danieltrt/tree-sitter-kotlin?rev=
|
1090
|
+
source = "git+https://github.com/danieltrt/tree-sitter-kotlin?rev=5e0b07cb2ba628842028313b60b97699cc5e0fee#5e0b07cb2ba628842028313b60b97699cc5e0fee"
|
1091
1091
|
dependencies = [
|
1092
1092
|
"cc",
|
1093
1093
|
"tree-sitter",
|
@@ -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.
|
5
|
+
version = "0.3.33"
|
6
6
|
edition = "2021"
|
7
7
|
include = ["pyproject.toml", "src/"]
|
8
8
|
exclude = ["legacy"]
|
@@ -49,7 +49,7 @@ ctrlc = "3.4"
|
|
49
49
|
# TODO: Update if we upgrade tree-sitter to >=0.21
|
50
50
|
# Kotlin's grammar needs to fix the way it parses unary expressions (currently -a + b gets parsed as - (a +b)).
|
51
51
|
# Once we upstream the fix, we can point to the official version.
|
52
|
-
tree-sitter-kotlin = { git = "https://github.com/danieltrt/tree-sitter-kotlin", rev = "
|
52
|
+
tree-sitter-kotlin = { git = "https://github.com/danieltrt/tree-sitter-kotlin", rev = "5e0b07cb2ba628842028313b60b97699cc5e0fee" }
|
53
53
|
tree-sitter-java = "0.20.2"
|
54
54
|
# TODO: Update after: https://github.com/alex-pinkus/tree-sitter-swift/issues/278 resolves
|
55
55
|
tree-sitter-swift = { git = "https://github.com/satyam1749/tree-sitter-swift.git", rev = "08a28993599f1968bc81631a89690503e1db7704" }
|
{polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/concrete_syntax_test.rs
RENAMED
@@ -14,7 +14,10 @@
|
|
14
14
|
use crate::models::capture_group_patterns::ConcreteSyntax;
|
15
15
|
use crate::models::concrete_syntax::get_all_matches_for_concrete_syntax;
|
16
16
|
use crate::models::default_configs::GO;
|
17
|
-
use crate::models::{
|
17
|
+
use crate::models::{
|
18
|
+
default_configs::{JAVA, KOTLIN},
|
19
|
+
language::PiranhaLanguage,
|
20
|
+
};
|
18
21
|
|
19
22
|
fn run_test(
|
20
23
|
code: &str, pattern: &str, expected_matches: usize, expected_vars: Vec<Vec<(&str, &str)>>,
|
@@ -39,6 +42,19 @@ fn run_test(
|
|
39
42
|
}
|
40
43
|
}
|
41
44
|
|
45
|
+
#[test]
|
46
|
+
fn test_single_match_kotlin() {
|
47
|
+
run_test(
|
48
|
+
"class Something : BaseParameters(namespace = \"data\") {
|
49
|
+
val something_else: Boolean by parameter(\"something_else\")
|
50
|
+
}",
|
51
|
+
"val :[stale_property_name] : Boolean by parameter(\"something_else\")",
|
52
|
+
1,
|
53
|
+
vec![vec![("stale_property_name", "something_else")]],
|
54
|
+
KOTLIN,
|
55
|
+
);
|
56
|
+
}
|
57
|
+
|
42
58
|
#[test]
|
43
59
|
fn test_single_match() {
|
44
60
|
run_test(
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/java/scope_config.toml
RENAMED
File without changes
|
File without changes
|
File without changes
|
{polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/java_cs/scope_config.toml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/ruby/scope_config.toml
RENAMED
File without changes
|
{polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/scala/scope_config.toml
RENAMED
File without changes
|
File without changes
|
File without changes
|
{polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/cleanup_rules/swift/scope_config.toml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/piranha_arguments_test.rs
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/models/unit_tests/source_code_unit_test.rs
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{polyglot_piranha-0.3.32 → polyglot_piranha-0.3.33}/src/utilities/unit_tests/utilities_test.rs
RENAMED
File without changes
|