node_mutation 1.21.2 → 1.21.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/Gemfile.lock +1 -1
- data/lib/node_mutation/result.rb +1 -5
- data/lib/node_mutation/version.rb +1 -1
- data/lib/node_mutation.rb +1 -1
- data/sig/node_mutation/adapter.rbs +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c65f57e5d3c315141ac35863689a5391a5c833a794f2f3768f6a12a735f4523
|
4
|
+
data.tar.gz: 2b1db51fcffc7f7a77a5151b3ee08e07679f6e1e622d884546968c5a50a25aeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeba2a1cc46bdd0a501701c78f3a93be88d64009d78fba8d616dfb34813ad137168d1f9b51ca40a7aa5e6c1f486db4a507f7ffe95f5c816c5fbd70b20b7320c9
|
7
|
+
data.tar.gz: 4be674f5fa1abc12c68c0a2f1464465758c8d07523024cb262218d799a96099baace7b340f27044884c67ffbda7e7bcab2e61404e92d92dc753f7eca01fba2f4
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/node_mutation/result.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class NodeMutation::Result
|
4
|
-
attr_accessor :file_path, :new_source
|
4
|
+
attr_accessor :file_path, :new_source, :actions
|
5
5
|
attr_reader :actions
|
6
6
|
|
7
7
|
def initialize(affected:, conflicted:)
|
@@ -18,10 +18,6 @@ class NodeMutation::Result
|
|
18
18
|
@conflicted
|
19
19
|
end
|
20
20
|
|
21
|
-
def actions=(actions)
|
22
|
-
@actions = actions.map(&:to_struct)
|
23
|
-
end
|
24
|
-
|
25
21
|
def to_json(*args)
|
26
22
|
data = { affected: affected?, conflicted: conflicted? }
|
27
23
|
data[:new_source] = new_source if new_source
|
data/lib/node_mutation.rb
CHANGED
@@ -7,13 +7,13 @@ class NodeMutation::Adapter[T]
|
|
7
7
|
|
8
8
|
def child_node_range: (node: T, child_name: String) -> NodeMutation::Struct::Range
|
9
9
|
|
10
|
-
def get_start: (node: T) -> Integer
|
10
|
+
def get_start: (node: T, ?child_name: String) -> Integer
|
11
11
|
|
12
|
-
def get_end: (node: T) -> Integer
|
12
|
+
def get_end: (node: T, ?child_name: String) -> Integer
|
13
13
|
|
14
|
-
def get_start_loc: (node: T) -> NodeMutation::Struct::Location
|
14
|
+
def get_start_loc: (node: T, ?child_name: String) -> NodeMutation::Struct::Location
|
15
15
|
|
16
|
-
def get_end_loc: (node: T) -> NodeMutation::Struct::Location
|
16
|
+
def get_end_loc: (node: T, ?child_name: String) -> NodeMutation::Struct::Location
|
17
17
|
|
18
18
|
def get_indent: (node: T) -> Integer
|
19
19
|
end
|
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.
|
4
|
+
version: 1.21.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-10-
|
11
|
+
date: 2023-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ast node mutation apis
|
14
14
|
email:
|