node_query 1.10.0 → 1.11.0

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: cc14f10f4a27631913cd6d9b3b66b100864778756bc317b1529abe45999255b4
4
- data.tar.gz: 2e04f47d2bbc0eade7ea2a047fe27174ec0e343d875203a0d3cd39fcaea50120
3
+ metadata.gz: 1acc5fa99571d7c0ca697e2719335333716539b1cf9278b98e362b3618a046ed
4
+ data.tar.gz: a68d2bd0cba15ed723728e1b47a819a16e1b785346eb301cddc007cc822d5cbc
5
5
  SHA512:
6
- metadata.gz: 4b434f39629e544435594f4d299b845841b4610bed644954b0e835a7eed7d1b178d510d2ba5be8bfea0d3365d15f46d73a64ea8e9310037f4a851fa9989d05f3
7
- data.tar.gz: bee545aae91e3769cb616e156f4cf6a69f628f5cc3a9e25432ea7eb9224a8ea49f1f76518b09601ce692b52790e5f0fd5da518d55650a243c0478d9056ac9a53
6
+ metadata.gz: 80f8e7ccdf4b1a5938dafd6f00ad76a6417258189e0ae006420fc4d633b9656e9c60384fba72c7ec7602068ea6e599b7bc32cddd6c1287eb0ca3d3c3d35e171f
7
+ data.tar.gz: d92223f8d1e5792503336f2927ba65f9942250d2314eeb7e950506a0a2a26ef48a802ab2e932f8835a287218ab0b98d45cfc226e389359ab5543198fdb8bafb7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.11.0 (2022-12-09)
4
+
5
+ * Support negative index to fetch array element
6
+ * Parse negative integer and float
7
+
3
8
  ## 1.10.0 (2022-10-26)
4
9
 
5
10
  * Add `NodeQuery::MethodNotSupported` error
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- node_query (1.10.0)
4
+ node_query (1.11.0)
5
5
  activesupport (< 7.0.0)
6
6
 
7
7
  GEM
@@ -78,10 +78,11 @@ GEM
78
78
  thor (1.2.1)
79
79
  tzinfo (2.0.5)
80
80
  concurrent-ruby (~> 1.0)
81
- zeitwerk (2.6.1)
81
+ zeitwerk (2.6.6)
82
82
 
83
83
  PLATFORMS
84
84
  x86_64-darwin-21
85
+ x86_64-darwin-22
85
86
  x86_64-linux
86
87
 
87
88
  DEPENDENCIES
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class NodeQuery
4
- VERSION = "1.10.0"
4
+ VERSION = "1.11.0"
5
5
  end
@@ -8,11 +8,11 @@ macros
8
8
  OPEN_SELECTOR /\(/
9
9
  CLOSE_SELECTOR /\)/
10
10
  NODE_TYPE /\.[a-z]+/
11
- IDENTIFIER /[@\*\.\w]*\w/
11
+ IDENTIFIER /[@\*\-\.\w]*\w/
12
12
  IDENTIFIER_VALUE /[@\.\w!&:\?<>=]+/
13
13
  FALSE /false/
14
- FLOAT /\d+\.\d+/
15
- INTEGER /\d+/
14
+ FLOAT /\-?\d+\.\d+/
15
+ INTEGER /\-?\d+/
16
16
  NIL /nil/
17
17
  REGEXP_BODY /(?:[^\/]|\\\/)*/
18
18
  REGEXP /\/(#{REGEXP_BODY})(?<!\\)\/([imxo]*)/
@@ -21,11 +21,11 @@ class NodeQueryLexer
21
21
  OPEN_SELECTOR = /\(/
22
22
  CLOSE_SELECTOR = /\)/
23
23
  NODE_TYPE = /\.[a-z]+/
24
- IDENTIFIER = /[@\*\.\w]*\w/
24
+ IDENTIFIER = /[@\*\-\.\w]*\w/
25
25
  IDENTIFIER_VALUE = /[@\.\w!&:\?<>=]+/
26
26
  FALSE = /false/
27
- FLOAT = /\d+\.\d+/
28
- INTEGER = /\d+/
27
+ FLOAT = /\-?\d+\.\d+/
28
+ INTEGER = /\-?\d+/
29
29
  NIL = /nil/
30
30
  REGEXP_BODY = /(?:[^\/]|\\\/)*/
31
31
  REGEXP = /\/(#{REGEXP_BODY})(?<!\\)\/([imxo]*)/
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.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-26 00:00:00.000000000 Z
11
+ date: 2022-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 3.3.22
95
+ rubygems_version: 3.3.26
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: ast node query language