node_mutation 1.21.5 → 1.21.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1148a4464a8b1f52500b09be2581a61c0add079b55052ced0e92297885f7082
4
- data.tar.gz: c8e779f8ab34b515c7c991a0b16c3a4aa85c280841fa65d021a1d4fd6a49ec25
3
+ metadata.gz: 6ae5572567e82e089eefff7f7f696230a17e77fbf0af051dd3a4a46ad21bf9a8
4
+ data.tar.gz: 8448ddd41dadbee697ee58a2d506bd7832fe9792d601e3a969cdc5b8869651fb
5
5
  SHA512:
6
- metadata.gz: 662faf8ca577ab83503429153c5af550a4a3134a8138e4f36400aa6fcfb40b27de367c5a837af6dd6a139fe63627f3343d11d5573e2ae0501d0cfaf25fb8adb3
7
- data.tar.gz: deda4075371317fd3c5decfda04bb8752b38f37679c21e1d940f1ebb2ef775f945ee38956ebea0e78717eb386e3dccaf5ff3b76fb50f550e616a246a880e43d6
6
+ metadata.gz: 603b93346813a1e4a0e6a2fed2c3fb5a0569f592b69de6d3f580b055ad1cae301c03c1984c50e567612f9b9f32b6fe706cd1c8276691b895d387044349c9fb93
7
+ data.tar.gz: 7c2ac5164feb10bbb01d0f355c831032dbccbdb6a80eb341884dc350f33dc95409cec2ced8ead61862fadde4ae71f2244414a43b4cd42ea23b70dc62f1082566
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # NodeMutation
2
2
 
3
+ ## 1.21.6 (2023-11-20)
4
+
5
+ * Flat and sort actions after filtering actions when processing
6
+
3
7
  ## 1.21.5 (2023-11-20)
4
8
 
5
9
  * Rewrite the process and test methods
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- node_mutation (1.21.5)
4
+ node_mutation (1.21.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class NodeMutation
4
- VERSION = "1.21.5"
4
+ VERSION = "1.21.6"
5
5
  end
data/lib/node_mutation.rb CHANGED
@@ -277,7 +277,8 @@ class NodeMutation
277
277
  raise ConflictActionError, "mutation actions are conflicted"
278
278
  end
279
279
 
280
- new_source = rewrite_source(source, sort_actions(get_filter_actions(conflict_actions)))
280
+ actions = sort_flatten_actions(flat_actions(get_filter_actions(conflict_actions)))
281
+ new_source = rewrite_source(source, actions)
281
282
  result = NodeMutation::Result.new(affected: true, conflicted: !conflict_actions.empty?)
282
283
  result.new_source = new_source
283
284
  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.21.5
4
+ version: 1.21.6
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-11-19 00:00:00.000000000 Z
11
+ date: 2023-11-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ast node mutation apis
14
14
  email: