@balena/odata-parser 3.0.5 → 3.0.6

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.
@@ -1,3 +1,15 @@
1
+ - commits:
2
+ - subject: Update dependency peggy to v4
3
+ hash: d0c83b2955f285f3cac927e4310e0b948d522189
4
+ body: |
5
+ Update peggy from 3.0.2 to 4.0.2
6
+ footer:
7
+ Change-type: patch
8
+ change-type: patch
9
+ author: Self-hosted Renovate Bot
10
+ version: 3.0.6
11
+ title: ""
12
+ date: 2024-04-12T08:46:50.076Z
1
13
  - commits:
2
14
  - subject: Update dependency lint-staged to v15
3
15
  hash: 703834a4c358dd348e1ffce797f6e3c37a03941f
@@ -9,7 +21,7 @@
9
21
  author: Self-hosted Renovate Bot
10
22
  version: 3.0.5
11
23
  title: ""
12
- date: 2024-04-12T03:46:13.235Z
24
+ date: 2024-04-12T08:19:19.907Z
13
25
  - commits:
14
26
  - subject: Update dependency @balena/lint to v8
15
27
  hash: 8048f717367a41233a995096edf2da6710e9e247
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
+ # v3.0.6
8
+ ## (2024-04-12)
9
+
10
+ * Update dependency peggy to v4 [Self-hosted Renovate Bot]
11
+
7
12
  # v3.0.5
8
13
  ## (2024-04-12)
9
14
 
package/odata-parser.js CHANGED
@@ -1,10 +1,11 @@
1
- // Generated by Peggy 3.0.2.
1
+ // @generated by Peggy 4.0.2.
2
2
  //
3
3
  // https://peggyjs.org/
4
4
 
5
5
  "use strict";
6
6
 
7
7
 
8
+
8
9
  const methods = {
9
10
  cast: [ 1, 2 ],
10
11
  ceiling: 1,
@@ -659,18 +660,18 @@ function peg$parse(input, options) {
659
660
  return { resource: bind, key: bind }
660
661
  };
661
662
  var peg$f97 = function(t) { return Bind('Text', t) };
662
- var peg$currPos = 0;
663
- var peg$savedPos = 0;
663
+ var peg$currPos = options.peg$currPos | 0;
664
+ var peg$savedPos = peg$currPos;
664
665
  var peg$posDetailsCache = [{ line: 1, column: 1 }];
665
- var peg$maxFailPos = 0;
666
- var peg$maxFailExpected = [];
667
- var peg$silentFails = 0;
666
+ var peg$maxFailPos = peg$currPos;
667
+ var peg$maxFailExpected = options.peg$maxFailExpected || [];
668
+ var peg$silentFails = options.peg$silentFails | 0;
668
669
 
669
670
  var peg$resultsCache = {};
670
671
 
671
672
  var peg$result;
672
673
 
673
- if ("startRule" in options) {
674
+ if (options.startRule) {
674
675
  if (!(options.startRule in peg$startRuleFunctions)) {
675
676
  throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
676
677
  }
@@ -745,9 +746,11 @@ function peg$parse(input, options) {
745
746
  if (details) {
746
747
  return details;
747
748
  } else {
748
- p = pos - 1;
749
- while (!peg$posDetailsCache[p]) {
750
- p--;
749
+ if (pos >= peg$posDetailsCache.length) {
750
+ p = peg$posDetailsCache.length - 1;
751
+ } else {
752
+ p = pos;
753
+ while (!peg$posDetailsCache[--p]) {}
751
754
  }
752
755
 
753
756
  details = peg$posDetailsCache[p];
@@ -1683,8 +1686,8 @@ function peg$parse(input, options) {
1683
1686
  s0 = peg$currPos;
1684
1687
  s1 = peg$currPos;
1685
1688
  s2 = [];
1686
- if (peg$r0.test(input.charAt(peg$currPos))) {
1687
- s3 = input.charAt(peg$currPos);
1689
+ s3 = input.charAt(peg$currPos);
1690
+ if (peg$r0.test(s3)) {
1688
1691
  peg$currPos++;
1689
1692
  } else {
1690
1693
  s3 = peg$FAILED;
@@ -1693,8 +1696,8 @@ function peg$parse(input, options) {
1693
1696
  if (s3 !== peg$FAILED) {
1694
1697
  while (s3 !== peg$FAILED) {
1695
1698
  s2.push(s3);
1696
- if (peg$r0.test(input.charAt(peg$currPos))) {
1697
- s3 = input.charAt(peg$currPos);
1699
+ s3 = input.charAt(peg$currPos);
1700
+ if (peg$r0.test(s3)) {
1698
1701
  peg$currPos++;
1699
1702
  } else {
1700
1703
  s3 = peg$FAILED;
@@ -1714,8 +1717,8 @@ function peg$parse(input, options) {
1714
1717
  }
1715
1718
  if (s3 !== peg$FAILED) {
1716
1719
  s4 = [];
1717
- if (peg$r0.test(input.charAt(peg$currPos))) {
1718
- s5 = input.charAt(peg$currPos);
1720
+ s5 = input.charAt(peg$currPos);
1721
+ if (peg$r0.test(s5)) {
1719
1722
  peg$currPos++;
1720
1723
  } else {
1721
1724
  s5 = peg$FAILED;
@@ -1724,8 +1727,8 @@ function peg$parse(input, options) {
1724
1727
  if (s5 !== peg$FAILED) {
1725
1728
  while (s5 !== peg$FAILED) {
1726
1729
  s4.push(s5);
1727
- if (peg$r0.test(input.charAt(peg$currPos))) {
1728
- s5 = input.charAt(peg$currPos);
1730
+ s5 = input.charAt(peg$currPos);
1731
+ if (peg$r0.test(s5)) {
1729
1732
  peg$currPos++;
1730
1733
  } else {
1731
1734
  s5 = peg$FAILED;
@@ -1746,8 +1749,8 @@ function peg$parse(input, options) {
1746
1749
  }
1747
1750
  if (s6 !== peg$FAILED) {
1748
1751
  s7 = [];
1749
- if (peg$r0.test(input.charAt(peg$currPos))) {
1750
- s8 = input.charAt(peg$currPos);
1752
+ s8 = input.charAt(peg$currPos);
1753
+ if (peg$r0.test(s8)) {
1751
1754
  peg$currPos++;
1752
1755
  } else {
1753
1756
  s8 = peg$FAILED;
@@ -1756,8 +1759,8 @@ function peg$parse(input, options) {
1756
1759
  if (s8 !== peg$FAILED) {
1757
1760
  while (s8 !== peg$FAILED) {
1758
1761
  s7.push(s8);
1759
- if (peg$r0.test(input.charAt(peg$currPos))) {
1760
- s8 = input.charAt(peg$currPos);
1762
+ s8 = input.charAt(peg$currPos);
1763
+ if (peg$r0.test(s8)) {
1761
1764
  peg$currPos++;
1762
1765
  } else {
1763
1766
  s8 = peg$FAILED;
@@ -3514,8 +3517,8 @@ function peg$parse(input, options) {
3514
3517
  while (s8 !== peg$FAILED) {
3515
3518
  s7.push(s8);
3516
3519
  s8 = peg$currPos;
3517
- if (peg$r1.test(input.charAt(peg$currPos))) {
3518
- s9 = input.charAt(peg$currPos);
3520
+ s9 = input.charAt(peg$currPos);
3521
+ if (peg$r1.test(s9)) {
3519
3522
  peg$currPos++;
3520
3523
  } else {
3521
3524
  s9 = peg$FAILED;
@@ -4186,8 +4189,8 @@ function peg$parse(input, options) {
4186
4189
  s0 = peg$currPos;
4187
4190
  s1 = peg$currPos;
4188
4191
  s2 = [];
4189
- if (peg$r2.test(input.charAt(peg$currPos))) {
4190
- s3 = input.charAt(peg$currPos);
4192
+ s3 = input.charAt(peg$currPos);
4193
+ if (peg$r2.test(s3)) {
4191
4194
  peg$currPos++;
4192
4195
  } else {
4193
4196
  s3 = peg$FAILED;
@@ -4196,8 +4199,8 @@ function peg$parse(input, options) {
4196
4199
  if (s3 !== peg$FAILED) {
4197
4200
  while (s3 !== peg$FAILED) {
4198
4201
  s2.push(s3);
4199
- if (peg$r2.test(input.charAt(peg$currPos))) {
4200
- s3 = input.charAt(peg$currPos);
4202
+ s3 = input.charAt(peg$currPos);
4203
+ if (peg$r2.test(s3)) {
4201
4204
  peg$currPos++;
4202
4205
  } else {
4203
4206
  s3 = peg$FAILED;
@@ -4241,8 +4244,8 @@ function peg$parse(input, options) {
4241
4244
  s2 = peg$currPos;
4242
4245
  s3 = peg$currPos;
4243
4246
  s4 = [];
4244
- if (peg$r3.test(input.charAt(peg$currPos))) {
4245
- s5 = input.charAt(peg$currPos);
4247
+ s5 = input.charAt(peg$currPos);
4248
+ if (peg$r3.test(s5)) {
4246
4249
  peg$currPos++;
4247
4250
  } else {
4248
4251
  s5 = peg$FAILED;
@@ -4251,8 +4254,8 @@ function peg$parse(input, options) {
4251
4254
  if (s5 !== peg$FAILED) {
4252
4255
  while (s5 !== peg$FAILED) {
4253
4256
  s4.push(s5);
4254
- if (peg$r3.test(input.charAt(peg$currPos))) {
4255
- s5 = input.charAt(peg$currPos);
4257
+ s5 = input.charAt(peg$currPos);
4258
+ if (peg$r3.test(s5)) {
4256
4259
  peg$currPos++;
4257
4260
  } else {
4258
4261
  s5 = peg$FAILED;
@@ -4273,8 +4276,8 @@ function peg$parse(input, options) {
4273
4276
  }
4274
4277
  if (s6 !== peg$FAILED) {
4275
4278
  s7 = [];
4276
- if (peg$r3.test(input.charAt(peg$currPos))) {
4277
- s8 = input.charAt(peg$currPos);
4279
+ s8 = input.charAt(peg$currPos);
4280
+ if (peg$r3.test(s8)) {
4278
4281
  peg$currPos++;
4279
4282
  } else {
4280
4283
  s8 = peg$FAILED;
@@ -4283,8 +4286,8 @@ function peg$parse(input, options) {
4283
4286
  if (s8 !== peg$FAILED) {
4284
4287
  while (s8 !== peg$FAILED) {
4285
4288
  s7.push(s8);
4286
- if (peg$r3.test(input.charAt(peg$currPos))) {
4287
- s8 = input.charAt(peg$currPos);
4289
+ s8 = input.charAt(peg$currPos);
4290
+ if (peg$r3.test(s8)) {
4288
4291
  peg$currPos++;
4289
4292
  } else {
4290
4293
  s8 = peg$FAILED;
@@ -4351,8 +4354,8 @@ function peg$parse(input, options) {
4351
4354
  s0 = peg$currPos;
4352
4355
  s1 = peg$currPos;
4353
4356
  s2 = [];
4354
- if (peg$r3.test(input.charAt(peg$currPos))) {
4355
- s3 = input.charAt(peg$currPos);
4357
+ s3 = input.charAt(peg$currPos);
4358
+ if (peg$r3.test(s3)) {
4356
4359
  peg$currPos++;
4357
4360
  } else {
4358
4361
  s3 = peg$FAILED;
@@ -4361,8 +4364,8 @@ function peg$parse(input, options) {
4361
4364
  if (s3 !== peg$FAILED) {
4362
4365
  while (s3 !== peg$FAILED) {
4363
4366
  s2.push(s3);
4364
- if (peg$r3.test(input.charAt(peg$currPos))) {
4365
- s3 = input.charAt(peg$currPos);
4367
+ s3 = input.charAt(peg$currPos);
4368
+ if (peg$r3.test(s3)) {
4366
4369
  peg$currPos++;
4367
4370
  } else {
4368
4371
  s3 = peg$FAILED;
@@ -4678,8 +4681,8 @@ function peg$parse(input, options) {
4678
4681
  s1 = peg$currPos;
4679
4682
  s2 = peg$currPos;
4680
4683
  s3 = [];
4681
- if (peg$r3.test(input.charAt(peg$currPos))) {
4682
- s4 = input.charAt(peg$currPos);
4684
+ s4 = input.charAt(peg$currPos);
4685
+ if (peg$r3.test(s4)) {
4683
4686
  peg$currPos++;
4684
4687
  } else {
4685
4688
  s4 = peg$FAILED;
@@ -4688,8 +4691,8 @@ function peg$parse(input, options) {
4688
4691
  if (s4 !== peg$FAILED) {
4689
4692
  while (s4 !== peg$FAILED) {
4690
4693
  s3.push(s4);
4691
- if (peg$r3.test(input.charAt(peg$currPos))) {
4692
- s4 = input.charAt(peg$currPos);
4694
+ s4 = input.charAt(peg$currPos);
4695
+ if (peg$r3.test(s4)) {
4693
4696
  peg$currPos++;
4694
4697
  } else {
4695
4698
  s4 = peg$FAILED;
@@ -4709,8 +4712,8 @@ function peg$parse(input, options) {
4709
4712
  }
4710
4713
  if (s4 !== peg$FAILED) {
4711
4714
  s5 = [];
4712
- if (peg$r3.test(input.charAt(peg$currPos))) {
4713
- s6 = input.charAt(peg$currPos);
4715
+ s6 = input.charAt(peg$currPos);
4716
+ if (peg$r3.test(s6)) {
4714
4717
  peg$currPos++;
4715
4718
  } else {
4716
4719
  s6 = peg$FAILED;
@@ -4719,8 +4722,8 @@ function peg$parse(input, options) {
4719
4722
  if (s6 !== peg$FAILED) {
4720
4723
  while (s6 !== peg$FAILED) {
4721
4724
  s5.push(s6);
4722
- if (peg$r3.test(input.charAt(peg$currPos))) {
4723
- s6 = input.charAt(peg$currPos);
4725
+ s6 = input.charAt(peg$currPos);
4726
+ if (peg$r3.test(s6)) {
4724
4727
  peg$currPos++;
4725
4728
  } else {
4726
4729
  s6 = peg$FAILED;
@@ -4779,8 +4782,8 @@ function peg$parse(input, options) {
4779
4782
  s0 = peg$currPos;
4780
4783
  s1 = peg$currPos;
4781
4784
  s2 = [];
4782
- if (peg$r4.test(input.charAt(peg$currPos))) {
4783
- s3 = input.charAt(peg$currPos);
4785
+ s3 = input.charAt(peg$currPos);
4786
+ if (peg$r4.test(s3)) {
4784
4787
  peg$currPos++;
4785
4788
  } else {
4786
4789
  s3 = peg$FAILED;
@@ -4788,8 +4791,8 @@ function peg$parse(input, options) {
4788
4791
  }
4789
4792
  while (s3 !== peg$FAILED) {
4790
4793
  s2.push(s3);
4791
- if (peg$r4.test(input.charAt(peg$currPos))) {
4792
- s3 = input.charAt(peg$currPos);
4794
+ s3 = input.charAt(peg$currPos);
4795
+ if (peg$r4.test(s3)) {
4793
4796
  peg$currPos++;
4794
4797
  } else {
4795
4798
  s3 = peg$FAILED;
@@ -5409,6 +5412,15 @@ function peg$parse(input, options) {
5409
5412
 
5410
5413
  peg$result = peg$startRuleFunction();
5411
5414
 
5415
+ if (options.peg$library) {
5416
+ return /** @type {any} */ ({
5417
+ peg$result,
5418
+ peg$currPos,
5419
+ peg$FAILED,
5420
+ peg$maxFailExpected,
5421
+ peg$maxFailPos
5422
+ });
5423
+ }
5412
5424
  if (peg$result !== peg$FAILED && peg$currPos === input.length) {
5413
5425
  return peg$result;
5414
5426
  } else {
@@ -5427,6 +5439,7 @@ function peg$parse(input, options) {
5427
5439
  }
5428
5440
 
5429
5441
  module.exports = {
5442
+ StartRules: ["Process", "ProcessRule"],
5430
5443
  SyntaxError: peg$SyntaxError,
5431
5444
  parse: peg$parse
5432
5445
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/odata-parser",
3
- "version": "3.0.5",
3
+ "version": "3.0.6",
4
4
  "description": "An OData parser written in OMeta",
5
5
  "main": "odata-parser.js",
6
6
  "scripts": {
@@ -24,7 +24,7 @@
24
24
  "lint-staged": "^15.0.0",
25
25
  "lodash": "^4.17.21",
26
26
  "mocha": "^10.2.0",
27
- "peggy": "^3.0.2",
27
+ "peggy": "^4.0.0",
28
28
  "ts-node": "^10.9.1",
29
29
  "typescript": "^5.0.4"
30
30
  },
@@ -39,6 +39,6 @@
39
39
  "npm": ">=8.1.0"
40
40
  },
41
41
  "versionist": {
42
- "publishedAt": "2024-04-12T03:46:13.342Z"
42
+ "publishedAt": "2024-04-12T08:46:50.192Z"
43
43
  }
44
44
  }