synvert-core 1.27.0 → 1.27.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +5 -5
- data/lib/synvert/core/rewriter/instance.rb +6 -5
- data/lib/synvert/core/rewriter.rb +2 -2
- data/lib/synvert/core/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/synvert-core-ruby.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76a57aa5fe7a0dfc34c17b5afb0be7657f08b29e7efa7aceb85350a5d7571260
|
4
|
+
data.tar.gz: 6706bbbce5a521aaa00b625ae1c0052241485f7eb230f5c99af68466b0effc7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b87be0f4fc6ce7aa88c96644182cb7c479a89104cee0a43779b1e2345cc1e24709e360970896890000042e2f80d8fd297eec435a499ebd28feb1abd283ff6f5
|
7
|
+
data.tar.gz: bc08baeaa494b5307428ec5e2ce4e88d639f8262200fed27d8b5dae4da646e5c0b470be3ceb7f6e55650b4fdcd0daefcb48ca921fafa43763ce34ed91c24e08c
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
synvert-core (1.27.
|
4
|
+
synvert-core (1.27.1)
|
5
5
|
activesupport (< 7.0.0)
|
6
|
-
node_mutation (>= 1.18.
|
6
|
+
node_mutation (>= 1.18.2)
|
7
7
|
node_query (>= 1.13.2)
|
8
8
|
parallel
|
9
9
|
parser
|
10
|
-
parser_node_ext (>= 1.1.
|
10
|
+
parser_node_ext (>= 1.1.1)
|
11
11
|
syntax_tree
|
12
12
|
syntax_tree_ext (>= 0.3.1)
|
13
13
|
|
@@ -50,7 +50,7 @@ GEM
|
|
50
50
|
method_source (1.0.0)
|
51
51
|
minitest (5.18.0)
|
52
52
|
nenv (0.3.0)
|
53
|
-
node_mutation (1.18.
|
53
|
+
node_mutation (1.18.2)
|
54
54
|
node_query (1.13.2)
|
55
55
|
notiffany (0.1.3)
|
56
56
|
nenv (~> 0.1)
|
@@ -58,7 +58,7 @@ GEM
|
|
58
58
|
parallel (1.23.0)
|
59
59
|
parser (3.2.2.1)
|
60
60
|
ast (~> 2.4.1)
|
61
|
-
parser_node_ext (1.1.
|
61
|
+
parser_node_ext (1.1.1)
|
62
62
|
parser
|
63
63
|
prettier_print (1.2.1)
|
64
64
|
pry (0.14.1)
|
@@ -47,7 +47,7 @@ module Synvert::Core
|
|
47
47
|
puts @file_path if Configuration.show_run_process
|
48
48
|
|
49
49
|
absolute_file_path = File.join(Configuration.root_path, @file_path)
|
50
|
-
|
50
|
+
loop do
|
51
51
|
source = read_source(absolute_file_path)
|
52
52
|
encoded_source = Engine.encode(File.extname(file_path), source)
|
53
53
|
@current_mutation = NodeMutation.new(source)
|
@@ -66,9 +66,10 @@ module Synvert::Core
|
|
66
66
|
write_source(absolute_file_path, result.new_source)
|
67
67
|
end
|
68
68
|
break unless result.conflicted?
|
69
|
-
rescue Parser::SyntaxError
|
69
|
+
rescue Parser::SyntaxError => e
|
70
70
|
puts "[Warn] file #{file_path} was not parsed correctly."
|
71
|
-
|
71
|
+
puts e.message
|
72
|
+
break
|
72
73
|
end
|
73
74
|
end
|
74
75
|
end
|
@@ -93,9 +94,9 @@ module Synvert::Core
|
|
93
94
|
result = @current_mutation.test
|
94
95
|
result.file_path = file_path
|
95
96
|
result
|
96
|
-
rescue Parser::SyntaxError
|
97
|
+
rescue Parser::SyntaxError => e
|
97
98
|
puts "[Warn] file #{file_path} was not parsed correctly."
|
98
|
-
|
99
|
+
puts e.message
|
99
100
|
end
|
100
101
|
end
|
101
102
|
|
@@ -253,13 +253,13 @@ module Synvert::Core
|
|
253
253
|
|
254
254
|
if @options[:write_to_file]
|
255
255
|
handle_one_file(Array(file_patterns)) do |file_path|
|
256
|
-
instance =
|
256
|
+
instance = Instance.new(self, file_path, &block)
|
257
257
|
instance.process
|
258
258
|
end
|
259
259
|
else
|
260
260
|
results =
|
261
261
|
handle_one_file(Array(file_patterns)) do |file_path|
|
262
|
-
instance =
|
262
|
+
instance = Instance.new(self, file_path, &block)
|
263
263
|
instance.test
|
264
264
|
end
|
265
265
|
merge_test_results(results)
|
data/lib/synvert/core/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/synvert-core-ruby.gemspec
CHANGED
@@ -21,9 +21,9 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_runtime_dependency "activesupport", "< 7.0.0"
|
23
23
|
spec.add_runtime_dependency "node_query", ">= 1.13.2"
|
24
|
-
spec.add_runtime_dependency "node_mutation", ">= 1.18.
|
24
|
+
spec.add_runtime_dependency "node_mutation", ">= 1.18.2"
|
25
25
|
spec.add_runtime_dependency "parser"
|
26
|
-
spec.add_runtime_dependency "parser_node_ext", ">= 1.1.
|
26
|
+
spec.add_runtime_dependency "parser_node_ext", ">= 1.1.1"
|
27
27
|
spec.add_runtime_dependency "syntax_tree"
|
28
28
|
spec.add_runtime_dependency "syntax_tree_ext", ">= 0.3.1"
|
29
29
|
spec.add_runtime_dependency "parallel"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synvert-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.27.
|
4
|
+
version: 1.27.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.18.
|
47
|
+
version: 1.18.2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.18.
|
54
|
+
version: 1.18.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: parser
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.1.
|
75
|
+
version: 1.1.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.1.
|
82
|
+
version: 1.1.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: syntax_tree
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
requirements: []
|
210
|
-
rubygems_version: 3.4.
|
210
|
+
rubygems_version: 3.4.10
|
211
211
|
signing_key:
|
212
212
|
specification_version: 4
|
213
213
|
summary: convert ruby code to better syntax.
|