@balena/odata-parser 2.4.4 → 2.4.5
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.
- package/.versionbot/CHANGELOG.yml +12 -1
- package/CHANGELOG.md +5 -0
- package/odata-parser.js +9 -9
- package/odata-parser.pegjs +9 -9
- package/package.json +2 -2
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
- commits:
|
|
2
|
+
- subject: Use const/let as appropriate
|
|
3
|
+
hash: 0824fe7d85eeb97941319749fc802f9bae3c9fb6
|
|
4
|
+
body: ""
|
|
5
|
+
footer:
|
|
6
|
+
Change-type: patch
|
|
7
|
+
change-type: patch
|
|
8
|
+
author: Pagan Gazzard
|
|
9
|
+
version: 2.4.5
|
|
10
|
+
title: ""
|
|
11
|
+
date: 2023-02-23T16:27:59.458Z
|
|
1
12
|
- commits:
|
|
2
13
|
- subject: Use shorthand object notation
|
|
3
14
|
hash: 611c0480681965c7af06302264eac79fea18bded
|
|
@@ -8,7 +19,7 @@
|
|
|
8
19
|
author: Pagan Gazzard
|
|
9
20
|
version: 2.4.4
|
|
10
21
|
title: ""
|
|
11
|
-
date: 2023-02-23T16:
|
|
22
|
+
date: 2023-02-23T16:26:30.639Z
|
|
12
23
|
- commits:
|
|
13
24
|
- subject: Update dependencies
|
|
14
25
|
hash: 25b153aca258347c6742cb8b4efe54c0ae199695
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file
|
|
|
4
4
|
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
|
5
5
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
# v2.4.5
|
|
8
|
+
## (2023-02-23)
|
|
9
|
+
|
|
10
|
+
* Use const/let as appropriate [Pagan Gazzard]
|
|
11
|
+
|
|
7
12
|
# v2.4.4
|
|
8
13
|
## (2023-02-23)
|
|
9
14
|
|
package/odata-parser.js
CHANGED
|
@@ -398,7 +398,7 @@ function peg$parse(input, options) {
|
|
|
398
398
|
var peg$f1 = function(tree) { return { tree, binds } };
|
|
399
399
|
var peg$f2 = function() {
|
|
400
400
|
reset();
|
|
401
|
-
|
|
401
|
+
const tree = eval(`peg$parse${options.rule}()`);
|
|
402
402
|
return {
|
|
403
403
|
tree,
|
|
404
404
|
binds
|
|
@@ -540,7 +540,7 @@ function peg$parse(input, options) {
|
|
|
540
540
|
var peg$f99 = function(d) { return Bind(d[0], d[1]) };
|
|
541
541
|
var peg$f100 = function(b) { return Bind('Boolean', b) };
|
|
542
542
|
var peg$f101 = function(resource) {
|
|
543
|
-
|
|
543
|
+
const bind = Bind('ContentReference', resource)
|
|
544
544
|
return { resource: bind, key: bind }
|
|
545
545
|
};
|
|
546
546
|
var peg$f102 = function(t) { return Bind('Text', t) };
|
|
@@ -5407,7 +5407,7 @@ function peg$parse(input, options) {
|
|
|
5407
5407
|
}
|
|
5408
5408
|
|
|
5409
5409
|
|
|
5410
|
-
|
|
5410
|
+
const methods = {
|
|
5411
5411
|
cast: [ 1, 2 ],
|
|
5412
5412
|
ceiling: 1,
|
|
5413
5413
|
concat: 2,
|
|
@@ -5441,7 +5441,7 @@ function peg$parse(input, options) {
|
|
|
5441
5441
|
year: 1
|
|
5442
5442
|
};
|
|
5443
5443
|
|
|
5444
|
-
|
|
5444
|
+
const operatorPrecedence = {
|
|
5445
5445
|
or: 0,
|
|
5446
5446
|
and: 0,
|
|
5447
5447
|
eq: 1,
|
|
@@ -5458,7 +5458,7 @@ function peg$parse(input, options) {
|
|
|
5458
5458
|
};
|
|
5459
5459
|
|
|
5460
5460
|
// v4 operator precedence
|
|
5461
|
-
//
|
|
5461
|
+
// const operatorPrecedence = {
|
|
5462
5462
|
// or: 0,
|
|
5463
5463
|
// and: 1,
|
|
5464
5464
|
// eq: 2,
|
|
@@ -5474,16 +5474,16 @@ function peg$parse(input, options) {
|
|
|
5474
5474
|
// mod: 5
|
|
5475
5475
|
// };
|
|
5476
5476
|
|
|
5477
|
-
|
|
5478
|
-
|
|
5477
|
+
let binds = [];
|
|
5478
|
+
let precedence = 0;
|
|
5479
5479
|
function reset() {
|
|
5480
5480
|
binds = [];
|
|
5481
5481
|
precedence = 0;
|
|
5482
5482
|
};
|
|
5483
5483
|
|
|
5484
5484
|
function CollapseObjectArray(options) {
|
|
5485
|
-
|
|
5486
|
-
for(
|
|
5485
|
+
const optionsObj = {};
|
|
5486
|
+
for(const i in options) {
|
|
5487
5487
|
optionsObj[options[i].name] = options[i].value;
|
|
5488
5488
|
}
|
|
5489
5489
|
return optionsObj;
|
package/odata-parser.pegjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
2
|
+
const methods = {
|
|
3
3
|
cast: [ 1, 2 ],
|
|
4
4
|
ceiling: 1,
|
|
5
5
|
concat: 2,
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
year: 1
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
const operatorPrecedence = {
|
|
37
37
|
or: 0,
|
|
38
38
|
and: 0,
|
|
39
39
|
eq: 1,
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
// v4 operator precedence
|
|
53
|
-
//
|
|
53
|
+
// const operatorPrecedence = {
|
|
54
54
|
// or: 0,
|
|
55
55
|
// and: 1,
|
|
56
56
|
// eq: 2,
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
// mod: 5
|
|
67
67
|
// };
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
let binds = [];
|
|
70
|
+
let precedence = 0;
|
|
71
71
|
function reset() {
|
|
72
72
|
binds = [];
|
|
73
73
|
precedence = 0;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
function CollapseObjectArray(options) {
|
|
77
|
-
|
|
78
|
-
for(
|
|
77
|
+
const optionsObj = {};
|
|
78
|
+
for(const i in options) {
|
|
79
79
|
optionsObj[options[i].name] = options[i].value;
|
|
80
80
|
}
|
|
81
81
|
return optionsObj;
|
|
@@ -95,7 +95,7 @@ Process =
|
|
|
95
95
|
ProcessRule =
|
|
96
96
|
'' {
|
|
97
97
|
reset();
|
|
98
|
-
|
|
98
|
+
const tree = eval(`peg$parse${options.rule}()`);
|
|
99
99
|
return {
|
|
100
100
|
tree,
|
|
101
101
|
binds
|
|
@@ -747,7 +747,7 @@ ContentReference =
|
|
|
747
747
|
'$'
|
|
748
748
|
resource:ResourceName
|
|
749
749
|
{
|
|
750
|
-
|
|
750
|
+
const bind = Bind('ContentReference', resource)
|
|
751
751
|
return { resource: bind, key: bind }
|
|
752
752
|
}
|
|
753
753
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@balena/odata-parser",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.5",
|
|
4
4
|
"description": "An OData parser written in OMeta",
|
|
5
5
|
"main": "odata-parser.js",
|
|
6
6
|
"scripts": {
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"_": "test/run.js"
|
|
38
38
|
},
|
|
39
39
|
"versionist": {
|
|
40
|
-
"publishedAt": "2023-02-23T16:
|
|
40
|
+
"publishedAt": "2023-02-23T16:27:59.664Z"
|
|
41
41
|
}
|
|
42
42
|
}
|