node_mutation 1.24.1 → 1.24.3

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: 6e67a8d6feebbc0ca9e6dd85003a976250c3718e8dd6f7192ef0847b2cc1385f
4
- data.tar.gz: c4b1d58061ac4661ac1eeb85303438f87d4ff563d8181a0fea8c8ac24e88dde3
3
+ metadata.gz: a1838915f4699a2c9bc566d05d38ed23f892b31a0a44d3812f4fe54b760a213f
4
+ data.tar.gz: 0fc0b9aac1857fc18675578da657a663786eb5ffcb43b2b2f4c27a013487eb78
5
5
  SHA512:
6
- metadata.gz: c99a8e8fce9fa6c610e93aeaa9aa5ad9fe89c5bb6cac19f216c34872c9bd57e2900d0b5e566a5f4e04c967f5383e8ace02d945cb94146602717b110a09ddbcb2
7
- data.tar.gz: ff6f52635d513523c5bf8d617e7e277ee71166e8f0cbee60fe3a94ffe379062e687128cc3378c791940e211a863e8d9585cd07c9e26db95f98ff1a58455b3906
6
+ metadata.gz: 699e09b43684f17ad6d0ab0b3902cc2910eb5ba53a870a5a2dfb6bb1c19b5df770a747c8d8c4e22fb8414cfac7f25acb1e3498465f0f8279abc458544eb4d8b5
7
+ data.tar.gz: 3702e772e0379b37d1adea9b7024ebeafe2ea0e77a8b5263a1d9a32b62d581be58e64d1a735d6ac0b7b6bbc3440cfbd477744d03e68da58f5b426fd5209c470b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # NodeMutation
2
2
 
3
+ ## 1.24.3 (2024-04-07)
4
+
5
+ * Update `prism_ext` to 0.3.0
6
+ * Update `syntax_tree_ext` to 0.8.1
7
+ * Update `parser_node_ext` to 1.3.0
8
+
9
+ ## 1.24.2 (2024-03-26)
10
+
11
+ * `child_node_range` supports `casgn` `name`
12
+
3
13
  ## 1.24.1 (2024-03-05)
4
14
 
5
15
  * Adjust `start` and `end` position of `AppendAction` and `PrependAction`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- node_mutation (1.24.1)
4
+ node_mutation (1.24.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -37,11 +37,11 @@ GEM
37
37
  parser (3.3.0.5)
38
38
  ast (~> 2.4.1)
39
39
  racc
40
- parser_node_ext (1.2.2)
40
+ parser_node_ext (1.3.0)
41
41
  parser
42
42
  prettier_print (1.2.1)
43
- prism (0.24.0)
44
- prism_ext (0.2.3)
43
+ prism (0.25.0)
44
+ prism_ext (0.3.0)
45
45
  prism
46
46
  pry (0.14.1)
47
47
  coderay (~> 1.1)
@@ -67,7 +67,7 @@ GEM
67
67
  shellany (0.0.1)
68
68
  syntax_tree (6.2.0)
69
69
  prettier_print (>= 1.2.0)
70
- syntax_tree_ext (0.7.2)
70
+ syntax_tree_ext (0.8.1)
71
71
  syntax_tree
72
72
  thor (1.2.1)
73
73
 
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # NodeMutation
2
2
 
3
+ [![Build Status](https://github.com/synvert-hq/node-mutation-ruby/actions/workflows/main.yml/badge.svg)](https://github.com/synvert-hq/node-mutation-ruby/actions/workflows/main.yml)
4
+ [![Gem Version](https://img.shields.io/gem/v/node_mutation.svg)](https://rubygems.org/gems/node_mutation)
5
+
3
6
  NodeMutation provides a set of APIs to rewrite node source code.
4
7
 
5
8
  ## Installation
@@ -81,14 +84,14 @@ mutation.replace node, '{{arguments.-1.on_value}}', with: ':update'
81
84
  source # after_commit :do_index, on: :update, if: :indexable?
82
85
  ```
83
86
 
84
- See more in [ParserAdapter](https://xinminlabs.github.io/node-mutation-ruby/NodeMutation/ParserAdapter.html) and [SyntaxTreeAdapter](https://xinminlabs.github.io/node-mutation-ruby/NodeMutation/SyntaxTreeAdapter.html)
87
+ See more in [ParserAdapter](https://synvert-hq.github.io/node-mutation-ruby/NodeMutation/ParserAdapter.html) and [SyntaxTreeAdapter](https://synvert-hq.github.io/node-mutation-ruby/NodeMutation/SyntaxTreeAdapter.html)
85
88
 
86
89
  ## Configuration
87
90
 
88
91
  ### adapter
89
92
 
90
93
  Different parsers, like parse and ripper, will generate different AST nodes, to make NodeMutation work for them all,
91
- we define an [Adapter](https://github.com/xinminlabs/node-mutation-ruby/blob/main/lib/node_mutation/adapter.rb) interface,
94
+ we define an [Adapter](https://github.com/synvert-hq/node-mutation-ruby/blob/main/lib/node_mutation/adapter.rb) interface,
92
95
  if you implement the Adapter interface, you can set it as NodeMutation's adapter.
93
96
 
94
97
  ### strategy
@@ -116,4 +119,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
116
119
 
117
120
  ## Contributing
118
121
 
119
- Bug reports and pull requests are welcome on GitHub at https://github.com/xinminlabs/node_mutation.
122
+ Bug reports and pull requests are welcome on GitHub at https://github.com/synvert-hq/node_mutation.
@@ -175,7 +175,7 @@ class NodeMutation::ParserAdapter < NodeMutation::Adapter
175
175
  node.arguments.last.loc.expression.end_pos + 1
176
176
  )
177
177
  end
178
- when %i[arg name], %i[class name], %i[const name], %i[cvar name], %i[def name], %i[defs name],
178
+ when %i[arg name], %i[class name], %i[const name], %i[cvar name], %i[casgn name], %i[def name], %i[defs name],
179
179
  %i[gvar name], %i[ivar name], %i[lvar name]
180
180
 
181
181
  NodeMutation::Struct::Range.new(node.loc.name.begin_pos, node.loc.name.end_pos)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class NodeMutation
4
- VERSION = "1.24.1"
4
+ VERSION = "1.24.3"
5
5
  end
@@ -10,12 +10,12 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = "ast node mutation apis"
12
12
  spec.description = "ast node mutation apis"
13
- spec.homepage = "https://github.com/xinminlabs/node-mutation-ruby"
13
+ spec.homepage = "https://github.com/synvert-hq/node-mutation-ruby"
14
14
  spec.required_ruby_version = ">= 2.6.0"
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = "https://github.com/xinminlabs/node-mutation-ruby"
18
- spec.metadata["changelog_uri"] = "https://github.com/xinminlabs/node-mutation-ruby/blob/master/CHANGELOG.md"
17
+ spec.metadata["source_code_uri"] = "https://github.com/synvert-hq/node-mutation-ruby"
18
+ spec.metadata["changelog_uri"] = "https://github.com/synvert-hq/node-mutation-ruby/blob/master/CHANGELOG.md"
19
19
 
20
20
  # Specify which files should be added to the gem when it is released.
21
21
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: node_mutation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.24.1
4
+ version: 1.24.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-05 00:00:00.000000000 Z
11
+ date: 2024-04-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ast node mutation apis
14
14
  email:
@@ -53,12 +53,12 @@ files:
53
53
  - sig/node_mutation/result.rbs
54
54
  - sig/node_mutation/strategy.rbs
55
55
  - sig/node_mutation/struct.rbs
56
- homepage: https://github.com/xinminlabs/node-mutation-ruby
56
+ homepage: https://github.com/synvert-hq/node-mutation-ruby
57
57
  licenses: []
58
58
  metadata:
59
- homepage_uri: https://github.com/xinminlabs/node-mutation-ruby
60
- source_code_uri: https://github.com/xinminlabs/node-mutation-ruby
61
- changelog_uri: https://github.com/xinminlabs/node-mutation-ruby/blob/master/CHANGELOG.md
59
+ homepage_uri: https://github.com/synvert-hq/node-mutation-ruby
60
+ source_code_uri: https://github.com/synvert-hq/node-mutation-ruby
61
+ changelog_uri: https://github.com/synvert-hq/node-mutation-ruby/blob/master/CHANGELOG.md
62
62
  post_install_message:
63
63
  rdoc_options: []
64
64
  require_paths: