node_query 1.15.2 → 1.15.3

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: 73328f35ddead7666ea7205aec6775a739ac3875addb68f0716787186149aac5
4
- data.tar.gz: b789b58e27ad38de762a2b4f41f2cd0fc4747ef92c8db84ee13204a2f7f72cf0
3
+ metadata.gz: 248ecdf537a77583086b3e03b2ad5235264898da63b1a1038af234be48404b95
4
+ data.tar.gz: 18ff554ae6c55f7e9eeba88cd48e1cc99deb50394d6a98bae5a6281d4b578dc2
5
5
  SHA512:
6
- metadata.gz: 74fac5a891c4271fa838b955846c7ee816ef26efc557be71b70474225152c1f3ea84209a6301683bb40c6c0fe19aaddf0fec2aa8f934c1a8aa412eb131d19f3c
7
- data.tar.gz: d8b25d7069670207d470760b024f47affcc013ecc31b89acb6ec985fb8e8b5716451ff991dceed202703c293fe2f4e5ddb41e8801e6b11692a21cb3f31208a16
6
+ metadata.gz: 9221cf053b6362069ccbe380a9d6f1803e779f9b89a029ec23d5d33fbdcc8e1ed704e6bb0561e58bfc6f94669b42f804e14c86aefa167f3f774a817fd1a46423
7
+ data.tar.gz: 90cf347b582004377dbf31dce64c8bca69e15d5e86c4cd397b8ba0aa4fbc06552261f5aa8b3aa4fe25d4e356bae32a2d4ab9806147cf1e0d32bf9b5decbf630f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.15.3 (2024-05-30)
4
+
5
+ * Fix actual value is nil
6
+
3
7
  ## 1.15.2 (2024-04-07)
4
8
 
5
9
  * 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.2)
4
+ node_query (1.15.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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 2 adapters
484
+ It provides 3 adapters
485
485
 
486
- 1. `ParserAdapter`
487
- 2. `SyntaxTreeAdapter`
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.to_sym == expected
104
+ actual&.to_sym == expected
105
105
  end
106
106
  when String
107
107
  if @adapter.is_node?(actual)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class NodeQuery
4
- VERSION = "1.15.2"
4
+ VERSION = "1.15.3"
5
5
  end
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.2
4
+ version: 1.15.3
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-04-07 00:00:00.000000000 Z
11
+ date: 2024-05-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ast node query language
14
14
  email:
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
82
- rubygems_version: 3.5.3
82
+ rubygems_version: 3.5.9
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: ast node query language