node_mutation 1.22.2 → 1.22.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +2 -1
- data/lib/node_mutation/adapter/parser.rb +1 -1
- data/lib/node_mutation/version.rb +1 -1
- data/lib/node_mutation.rb +1 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9485dffc945cb3b645d4abecc7f878550685459ccd2007845471651d6893e2f1
|
|
4
|
+
data.tar.gz: 0ab63429232abd2f357b2c791bb3e5bc66a4762ff4175d6444b8c51dbac99a5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
@@ -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)
|
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.
|
|
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:
|
|
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.
|
|
76
|
+
rubygems_version: 3.5.3
|
|
77
77
|
signing_key:
|
|
78
78
|
specification_version: 4
|
|
79
79
|
summary: ast node mutation apis
|