synvert 1.2.5 → 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: 5a5aafd01e044e25452de4751866ae7784b2d094dc00a60aea6b3893001cfdfe
4
- data.tar.gz: feebe5fa35b6d849ac9fae2f9264ed8006739cc97763f5674185d8d2180272af
3
+ metadata.gz: a5ee0b74a9d8854edde22295b9f79006d68313dc38b17ded67fb6ea655f965f6
4
+ data.tar.gz: 930c8f0143270b79b1a240c71760d064ee8c3cd0d2397636326f16277440333a
5
5
  SHA512:
6
- metadata.gz: 5c374ab4211680408d85ae820eaab5f06ad6a7dd81cb4af5df8cfc9319cd0546526c5718c85346cfdac5a07e789fd48ca8467821a3464e26f0566bcc5ca4ffb5
7
- data.tar.gz: b954b52b313a2dd0fbebe99d43cce2719227f77f1c2714543593f9082c5997a88b180524bcaf43128a0345b5003fd04566a4c63e0659999f291cf6fe27918b26
6
+ metadata.gz: f361cc57a7ac244bc0df0d14c4d0cbdd12f744eb61eb2638373027b7170a386ee556ee73dbe1da3115521742e7c17ee2731a38b37fdca13916c83b2f9e1a7043
7
+ data.tar.gz: 4d326720a1f23de23b4d46dbd2738a572a2eec2dbe62e4fb060812f8d749b687b26b9ede09ff44e9f106e0312b8ddc05646ae52100c5ee26dee0e0f8d7533168
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.2.6 (2023-02-02)
4
+
5
+ * Output error message
6
+
3
7
  ## 1.2.5 (2023-02-01)
4
8
 
5
9
  * Remove `rewriter.todo`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- synvert (1.2.5)
4
+ synvert (1.2.6)
5
5
  synvert-core (>= 1.18.0)
6
6
 
7
7
  GEM
@@ -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.9.0)
42
+ parser_node_ext (0.10.0)
43
43
  parser
44
44
  public_suffix (4.0.6)
45
45
  rake (13.0.6)
@@ -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
@@ -246,12 +248,22 @@ module Synvert
246
248
  }
247
249
  puts JSON.generate(output)
248
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
249
258
  end
250
259
 
251
260
  # test a snippet
252
261
  def test_snippet(rewriter)
253
262
  results = rewriter.test
254
263
  puts JSON.generate(results)
264
+ rescue StandardError => e
265
+ puts JSON.generate(error: e.message)
266
+ raise
255
267
  end
256
268
 
257
269
  # execute snippet
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Synvert
4
- VERSION = '1.2.5'
4
+ VERSION = '1.2.6'
5
5
  end
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.5
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-02-01 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