node_mutation 1.22.2 → 1.22.4

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: b356f4d7717749c2ab7c3642b8cda4a9bff43a3c23579e79963a0faf5f408962
4
- data.tar.gz: fc6baa97db54a507a1867eebf913231e4df4c614caf1f3ba88860ee5ddf4648d
3
+ metadata.gz: 9485dffc945cb3b645d4abecc7f878550685459ccd2007845471651d6893e2f1
4
+ data.tar.gz: 0ab63429232abd2f357b2c791bb3e5bc66a4762ff4175d6444b8c51dbac99a5d
5
5
  SHA512:
6
- metadata.gz: 49a928c2134940bec43877077af74fce088df6603f624e0b273da6a740b0f5aabc3a682751f5739d6869b32c71c667ba90567130d776acb1ae4a1212d48d4582
7
- data.tar.gz: 47ae1f5eb4ffd36a3e121c7bd7936578c10f9c83785a4abadb67eba4f5b76c9ff9f1edfdcfb0beecb719f87bf436a11dde8474b176b2499b8a8d4567f7220359
6
+ metadata.gz: fc326b1af7d3f13bdd91f24c59d3be4991c20cc751de9bf0b8d48be98dc44fa78c93b4a5ffc75eac2535437ad478a206d54342195737989c17d7eb4121624c8a
7
+ data.tar.gz: 92cea72b3327755abb2b789cd704809b46258c3a6cc7f7e9f8bac678e2907e93d7fe59e5abfd33308029bc71dee24a1d8e23cbf976f2a1d7d9648876d6e24b78
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # NodeMutation
2
2
 
3
+ ## 1.22.4 (2024-01-30)
4
+
5
+ * Revert "add action methods to GroupAction"
6
+
7
+ ## 1.22.3 (2024-01-30)
8
+
9
+ * `child_node_range` supports `arg` `name`
10
+ * Add `action` methods to `GroupAction`
11
+
3
12
  ## 1.22.2 (2023-12-04)
4
13
 
5
14
  * `str` child node range does not include quotes
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- node_mutation (1.22.2)
4
+ node_mutation (1.22.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -71,6 +71,7 @@ GEM
71
71
  PLATFORMS
72
72
  x86_64-darwin-21
73
73
  x86_64-darwin-22
74
+ x86_64-darwin-23
74
75
  x86_64-linux
75
76
 
76
77
  DEPENDENCIES
@@ -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[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[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.22.2"
4
+ VERSION = "1.22.4"
5
5
  end
data/lib/node_mutation.rb CHANGED
@@ -262,7 +262,6 @@ class NodeMutation
262
262
  return NodeMutation::Result.new(affected: false, conflicted: false)
263
263
  end
264
264
 
265
- source = +@source
266
265
  @transform_proc.call(@actions) if @transform_proc
267
266
  sorted_actions = sort_flatten_actions(flatten_actions)
268
267
  conflict_actions = get_conflict_actions(sorted_actions)
@@ -271,7 +270,7 @@ class NodeMutation
271
270
  end
272
271
 
273
272
  actions = sort_flatten_actions(flat_actions(get_filter_actions(conflict_actions)))
274
- new_source = rewrite_source(source, actions)
273
+ new_source = rewrite_source(+@source, actions)
275
274
  result = NodeMutation::Result.new(affected: true, conflicted: !conflict_actions.empty?)
276
275
  result.new_source = new_source
277
276
  result
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.22.2
4
+ version: 1.22.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-04 00:00:00.000000000 Z
11
+ date: 2024-01-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ast node mutation apis
14
14
  email:
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.4.20
76
+ rubygems_version: 3.5.3
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: ast node mutation apis