node_query 1.15.2 → 1.15.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 +10 -0
- data/Gemfile.lock +3 -3
- data/README.md +5 -4
- data/lib/node_query/adapter/prism.rb +1 -1
- data/lib/node_query/node_rules.rb +1 -1
- data/lib/node_query/version.rb +1 -1
- data/node_query.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 033ac29de15656a8eb6e5a20eced18efa53253afa3c263c4a0947028404a0030
|
4
|
+
data.tar.gz: adc0a52b3b83ca0f556c1a8d895f4236efb29bb5808d38ca0a6be082d57394f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f233ed498d5fc0d911a3cd5c4f611f4ee4ae8835110387a0dd1e5ca4c9d660aa05cb3e6a3c8ea9958f417f4a7004c63559fac5f3f8dbe4c9939649d4ed023d3
|
7
|
+
data.tar.gz: f3ccde8ceb897ca676aaeaf25837ff7cd6c616292896cb8784937d3569c70eae4d239d9fb14e5d6f104d88dadcd30d606862b400d5b435c881cd76676308ad92
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 1.15.4 (2024-07-02)
|
4
|
+
|
5
|
+
* Drop support ruby 2.6
|
6
|
+
* Update `prism_ext` to 0.3.3
|
7
|
+
* Use `Prism::Node#to_source`
|
8
|
+
|
9
|
+
## 1.15.3 (2024-05-30)
|
10
|
+
|
11
|
+
* Fix actual value is nil
|
12
|
+
|
3
13
|
## 1.15.2 (2024-04-07)
|
4
14
|
|
5
15
|
* Update `prism_ext` to 0.3.0
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
node_query (1.15.
|
4
|
+
node_query (1.15.4)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -44,8 +44,8 @@ GEM
|
|
44
44
|
parser_node_ext (1.3.0)
|
45
45
|
parser
|
46
46
|
prettier_print (1.2.1)
|
47
|
-
prism (0.
|
48
|
-
prism_ext (0.3.
|
47
|
+
prism (0.30.0)
|
48
|
+
prism_ext (0.3.3)
|
49
49
|
prism
|
50
50
|
pry (0.14.1)
|
51
51
|
coderay (~> 1.1)
|
data/README.md
CHANGED
@@ -477,14 +477,15 @@ It matches def node whose arguments are id and name.
|
|
477
477
|
|
478
478
|
## Write Adapter
|
479
479
|
|
480
|
-
Different parser, like parser, syntax_tree, will generate different AST nodes, to make NodeQuery work for them all,
|
480
|
+
Different parser, like prism, parser, syntax_tree, will generate different AST nodes, to make NodeQuery work for them all,
|
481
481
|
we define an [Adapter](https://github.com/synvert-hq/node-query-ruby/blob/main/lib/node_query/adapter.rb) interface,
|
482
482
|
if you implement the Adapter interface, you can set it as NodeQuery's adapter.
|
483
483
|
|
484
|
-
It provides
|
484
|
+
It provides 3 adapters
|
485
485
|
|
486
|
-
1. `
|
487
|
-
2. `
|
486
|
+
1. `PrismAdapter`
|
487
|
+
2. `ParserAdapter`
|
488
|
+
3. `SyntaxTreeAdapter`
|
488
489
|
|
489
490
|
## Development
|
490
491
|
|
@@ -101,7 +101,7 @@ class NodeQuery::NodeRules
|
|
101
101
|
actual_source = @adapter.get_source(actual)
|
102
102
|
actual_source == ":#{expected}" || actual_source == expected.to_s
|
103
103
|
else
|
104
|
-
actual
|
104
|
+
actual&.to_sym == expected
|
105
105
|
end
|
106
106
|
when String
|
107
107
|
if @adapter.is_node?(actual)
|
data/lib/node_query/version.rb
CHANGED
data/node_query.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.summary = "ast node query language"
|
12
12
|
spec.description = "ast node query language"
|
13
13
|
spec.homepage = "https://github.com/synvert-hq/node-query-ruby"
|
14
|
-
spec.required_ruby_version = ">= 2.
|
14
|
+
spec.required_ruby_version = ">= 2.7.0"
|
15
15
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
17
17
|
spec.metadata["source_code_uri"] = "https://github.com/synvert-hq/node-query-ruby"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: node_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.15.
|
4
|
+
version: 1.15.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: 2024-
|
11
|
+
date: 2024-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ast node query language
|
14
14
|
email:
|
@@ -72,14 +72,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 2.
|
75
|
+
version: 2.7.0
|
76
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - ">="
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
|
-
rubygems_version: 3.5.
|
82
|
+
rubygems_version: 3.5.14
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: ast node query language
|