synvert 1.2.4 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6353d42129c9f69920a5bdb63f23272edc22ec2ce9f7a3c06cc50965575b927
4
- data.tar.gz: 2e47b2bf7f44990bad620cf9e189cac7784bced0b47f64815db76a97e0b099b0
3
+ metadata.gz: a5ee0b74a9d8854edde22295b9f79006d68313dc38b17ded67fb6ea655f965f6
4
+ data.tar.gz: 930c8f0143270b79b1a240c71760d064ee8c3cd0d2397636326f16277440333a
5
5
  SHA512:
6
- metadata.gz: 3fc4e6aabd243596dd601c31de0bbe79d231f6fd019b1951c820b0f6e33e29be6396816dae26c6e4c59045601ec83d7318ec0c610e589f5bd8fd57b5922029d0
7
- data.tar.gz: 28e6cfe63fa0465478d3b8c54531dd6db2e312021117389a17d98b57ac51ccadf230a9c9faa11e8de1878d782530344b0092d0cd7c497822ae0673423aa7e2c1
6
+ metadata.gz: f361cc57a7ac244bc0df0d14c4d0cbdd12f744eb61eb2638373027b7170a386ee556ee73dbe1da3115521742e7c17ee2731a38b37fdca13916c83b2f9e1a7043
7
+ data.tar.gz: 4d326720a1f23de23b4d46dbd2738a572a2eec2dbe62e4fb060812f8d749b687b26b9ede09ff44e9f106e0312b8ddc05646ae52100c5ee26dee0e0f8d7533168
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.2.6 (2023-02-02)
4
+
5
+ * Output error message
6
+
7
+ ## 1.2.5 (2023-02-01)
8
+
9
+ * Remove `rewriter.todo`
10
+ * Update ``synvert-core`` to 1.18.0
11
+
3
12
  ## 1.2.4 (2023-01-21)
4
13
 
5
14
  * Update ``synvert-core`` to 1.17.0
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- synvert (1.2.4)
5
- synvert-core (>= 1.17.0)
4
+ synvert (1.2.6)
5
+ synvert-core (>= 1.18.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (6.1.7.1)
10
+ activesupport (6.1.7.2)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
12
  i18n (>= 1.6, < 2)
13
13
  minitest (>= 5.1)
@@ -16,7 +16,7 @@ GEM
16
16
  addressable (2.8.0)
17
17
  public_suffix (>= 2.0.2, < 5.0)
18
18
  ast (2.4.2)
19
- concurrent-ruby (1.1.10)
19
+ concurrent-ruby (1.2.0)
20
20
  coveralls (0.8.23)
21
21
  json (>= 1.8, < 3)
22
22
  simplecov (~> 0.16.1)
@@ -39,7 +39,7 @@ GEM
39
39
  parallel (1.22.1)
40
40
  parser (3.2.0.0)
41
41
  ast (~> 2.4.1)
42
- parser_node_ext (0.6.1)
42
+ parser_node_ext (0.10.0)
43
43
  parser
44
44
  public_suffix (4.0.6)
45
45
  rake (13.0.6)
@@ -63,20 +63,20 @@ GEM
63
63
  simplecov-html (~> 0.10.0)
64
64
  simplecov-html (0.10.2)
65
65
  sync (0.5.0)
66
- synvert-core (1.17.0)
66
+ synvert-core (1.18.0)
67
67
  activesupport (< 7.0.0)
68
68
  erubis
69
69
  node_mutation (>= 1.8.2)
70
70
  node_query (>= 1.12.0)
71
71
  parallel
72
72
  parser
73
- parser_node_ext (>= 0.6.1)
73
+ parser_node_ext (>= 0.9.0)
74
74
  term-ansicolor (1.7.1)
75
75
  tins (~> 1.0)
76
76
  thor (1.1.0)
77
77
  tins (1.29.1)
78
78
  sync
79
- tzinfo (2.0.5)
79
+ tzinfo (2.0.6)
80
80
  concurrent-ruby (~> 1.0)
81
81
  webmock (3.14.0)
82
82
  addressable (>= 2.8.0)
@@ -85,10 +85,7 @@ GEM
85
85
  zeitwerk (2.6.6)
86
86
 
87
87
  PLATFORMS
88
- x86_64-darwin-20
89
- x86_64-darwin-21
90
- x86_64-darwin-22
91
- x86_64-linux
88
+ ruby
92
89
 
93
90
  DEPENDENCIES
94
91
  bundler
data/lib/synvert/cli.rb CHANGED
@@ -60,6 +60,8 @@ module Synvert
60
60
  puts "file #{e.diagnostic.location.source_buffer.name}"
61
61
  puts "line #{e.diagnostic.location.line}"
62
62
  false
63
+ rescue StandardError
64
+ false
63
65
  end
64
66
 
65
67
  private
@@ -237,23 +239,31 @@ module Synvert
237
239
  rewriter.warnings.each do |warning|
238
240
  puts '[Warn] ' + warning.message
239
241
  end
240
- puts rewriter.todo if rewriter.todo
241
242
  puts "===== #{rewriter.group}/#{rewriter.name} done ====="
242
243
  elsif json_output?
243
244
  rewriter.process
244
245
  output = {
245
246
  affected_files: rewriter.affected_files.union(rewriter.sub_snippets.sum(Set.new, &:affected_files)).to_a,
246
- warnings: rewriter.warnings.union(rewriter.sub_snippets.sum([], &:warnings)),
247
- todo: rewriter.todo
247
+ warnings: rewriter.warnings.union(rewriter.sub_snippets.sum([], &:warnings))
248
248
  }
249
249
  puts JSON.generate(output)
250
250
  end
251
+ rescue StandardError => e
252
+ if plain_output?
253
+ puts "Error: #{e.message}"
254
+ else
255
+ puts JSON.generate(error: e.message)
256
+ end
257
+ raise
251
258
  end
252
259
 
253
260
  # test a snippet
254
261
  def test_snippet(rewriter)
255
262
  results = rewriter.test
256
263
  puts JSON.generate(results)
264
+ rescue StandardError => e
265
+ puts JSON.generate(error: e.message)
266
+ raise
257
267
  end
258
268
 
259
269
  # execute snippet
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Synvert
4
- VERSION = '1.2.4'
4
+ VERSION = '1.2.6'
5
5
  end
data/synvert-ruby.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
  spec.post_install_message = 'Please run `synvert-ruby --sync` first to sync snippets remotely.'
22
22
 
23
- spec.add_runtime_dependency 'synvert-core', '>= 1.17.0'
23
+ spec.add_runtime_dependency 'synvert-core', '>= 1.18.0'
24
24
 
25
25
  spec.add_development_dependency 'bundler'
26
26
  spec.add_development_dependency 'rake'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synvert
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.6
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-01-21 00:00:00.000000000 Z
11
+ date: 2023-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: synvert-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.17.0
19
+ version: 1.18.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.17.0
26
+ version: 1.18.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement