update devDependencies, regenerate with new peggy, fix lint issues
authorJustin Wind <justin.wind+git@gmail.com>
Sun, 5 May 2024 21:15:31 +0000 (14:15 -0700)
committerJustin Wind <justin.wind+git@gmail.com>
Sun, 5 May 2024 21:15:31 +0000 (14:15 -0700)
lib/rfc8288-web-linking.js
lib/rfc8288-web-linking.peggy
package-lock.json
package.json

index 0466da9acb3c25b47b054afda97e8e8617e17f22..e3b988ff9d652136a45cb6fb13eacd7eebd1e444 100644 (file)
@@ -1,12 +1,14 @@
-// Generated by Peggy 3.0.2.
+// @generated by Peggy 4.0.2.
 //
 // https://peggyjs.org/
 
 "use strict";
 
 
 //
 // https://peggyjs.org/
 
 "use strict";
 
 
+
 /* Generated code is not pretty, ignore a lot of this horrorstyle. */
 /* eslint-disable no-control-regex */
 /* Generated code is not pretty, ignore a lot of this horrorstyle. */
 /* eslint-disable no-control-regex */
+/* eslint-disable no-empty */
 /* eslint-disable security/detect-object-injection */
 /* eslint-disable brace-style */
 /* eslint-disable comma-dangle */
 /* eslint-disable security/detect-object-injection */
 /* eslint-disable brace-style */
 /* eslint-disable comma-dangle */
@@ -315,16 +317,16 @@ function peg$parse(input, options) {
       value: makeString(value),
     };
   };
       value: makeString(value),
     };
   };
-  var peg$currPos = 0;
-  var peg$savedPos = 0;
+  var peg$currPos = options.peg$currPos | 0;
+  var peg$savedPos = peg$currPos;
   var peg$posDetailsCache = [{ line: 1, column: 1 }];
   var peg$posDetailsCache = [{ line: 1, column: 1 }];
-  var peg$maxFailPos = 0;
-  var peg$maxFailExpected = [];
-  var peg$silentFails = 0;
+  var peg$maxFailPos = peg$currPos;
+  var peg$maxFailExpected = options.peg$maxFailExpected || [];
+  var peg$silentFails = options.peg$silentFails | 0;
 
   var peg$result;
 
 
   var peg$result;
 
-  if ("startRule" in options) {
+  if (options.startRule) {
     if (!(options.startRule in peg$startRuleFunctions)) {
       throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
     }
     if (!(options.startRule in peg$startRuleFunctions)) {
       throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
     }
@@ -399,9 +401,11 @@ function peg$parse(input, options) {
     if (details) {
       return details;
     } else {
     if (details) {
       return details;
     } else {
-      p = pos - 1;
-      while (!peg$posDetailsCache[p]) {
-        p--;
+      if (pos >= peg$posDetailsCache.length) {
+        p = peg$posDetailsCache.length - 1;
+      } else {
+        p = pos;
+        while (!peg$posDetailsCache[--p]) {}
       }
 
       details = peg$posDetailsCache[p];
       }
 
       details = peg$posDetailsCache[p];
@@ -608,8 +612,8 @@ function peg$parse(input, options) {
     peg$silentFails++;
     s0 = peg$currPos;
     s1 = [];
     peg$silentFails++;
     s0 = peg$currPos;
     s1 = [];
-    if (peg$r0.test(input.charAt(peg$currPos))) {
-      s2 = input.charAt(peg$currPos);
+    s2 = input.charAt(peg$currPos);
+    if (peg$r0.test(s2)) {
       peg$currPos++;
     } else {
       s2 = peg$FAILED;
       peg$currPos++;
     } else {
       s2 = peg$FAILED;
@@ -618,8 +622,8 @@ function peg$parse(input, options) {
     if (s2 !== peg$FAILED) {
       while (s2 !== peg$FAILED) {
         s1.push(s2);
     if (s2 !== peg$FAILED) {
       while (s2 !== peg$FAILED) {
         s1.push(s2);
-        if (peg$r0.test(input.charAt(peg$currPos))) {
-          s2 = input.charAt(peg$currPos);
+        s2 = input.charAt(peg$currPos);
+        if (peg$r0.test(s2)) {
           peg$currPos++;
         } else {
           s2 = peg$FAILED;
           peg$currPos++;
         } else {
           s2 = peg$FAILED;
@@ -754,8 +758,8 @@ function peg$parse(input, options) {
     peg$silentFails++;
     s0 = peg$currPos;
     s1 = [];
     peg$silentFails++;
     s0 = peg$currPos;
     s1 = [];
-    if (peg$r1.test(input.charAt(peg$currPos))) {
-      s2 = input.charAt(peg$currPos);
+    s2 = input.charAt(peg$currPos);
+    if (peg$r1.test(s2)) {
       peg$currPos++;
     } else {
       s2 = peg$FAILED;
       peg$currPos++;
     } else {
       s2 = peg$FAILED;
@@ -764,8 +768,8 @@ function peg$parse(input, options) {
     if (s2 !== peg$FAILED) {
       while (s2 !== peg$FAILED) {
         s1.push(s2);
     if (s2 !== peg$FAILED) {
       while (s2 !== peg$FAILED) {
         s1.push(s2);
-        if (peg$r1.test(input.charAt(peg$currPos))) {
-          s2 = input.charAt(peg$currPos);
+        s2 = input.charAt(peg$currPos);
+        if (peg$r1.test(s2)) {
           peg$currPos++;
         } else {
           s2 = peg$FAILED;
           peg$currPos++;
         } else {
           s2 = peg$FAILED;
@@ -806,8 +810,8 @@ function peg$parse(input, options) {
 
     peg$silentFails++;
     s0 = peg$currPos;
 
     peg$silentFails++;
     s0 = peg$currPos;
-    if (peg$r2.test(input.charAt(peg$currPos))) {
-      s1 = input.charAt(peg$currPos);
+    s1 = input.charAt(peg$currPos);
+    if (peg$r2.test(s1)) {
       peg$currPos++;
     } else {
       s1 = peg$FAILED;
       peg$currPos++;
     } else {
       s1 = peg$FAILED;
@@ -815,8 +819,8 @@ function peg$parse(input, options) {
     }
     if (s1 !== peg$FAILED) {
       s2 = [];
     }
     if (s1 !== peg$FAILED) {
       s2 = [];
-      if (peg$r3.test(input.charAt(peg$currPos))) {
-        s3 = input.charAt(peg$currPos);
+      s3 = input.charAt(peg$currPos);
+      if (peg$r3.test(s3)) {
         peg$currPos++;
       } else {
         s3 = peg$FAILED;
         peg$currPos++;
       } else {
         s3 = peg$FAILED;
@@ -825,8 +829,8 @@ function peg$parse(input, options) {
       if (s3 !== peg$FAILED) {
         while (s3 !== peg$FAILED) {
           s2.push(s3);
       if (s3 !== peg$FAILED) {
         while (s3 !== peg$FAILED) {
           s2.push(s3);
-          if (peg$r3.test(input.charAt(peg$currPos))) {
-            s3 = input.charAt(peg$currPos);
+          s3 = input.charAt(peg$currPos);
+          if (peg$r3.test(s3)) {
             peg$currPos++;
           } else {
             s3 = peg$FAILED;
             peg$currPos++;
           } else {
             s3 = peg$FAILED;
@@ -837,8 +841,8 @@ function peg$parse(input, options) {
         s2 = peg$FAILED;
       }
       if (s2 !== peg$FAILED) {
         s2 = peg$FAILED;
       }
       if (s2 !== peg$FAILED) {
-        if (peg$r2.test(input.charAt(peg$currPos))) {
-          s3 = input.charAt(peg$currPos);
+        s3 = input.charAt(peg$currPos);
+        if (peg$r2.test(s3)) {
           peg$currPos++;
         } else {
           s3 = peg$FAILED;
           peg$currPos++;
         } else {
           s3 = peg$FAILED;
@@ -862,8 +866,8 @@ function peg$parse(input, options) {
     if (s0 === peg$FAILED) {
       s0 = peg$currPos;
       s1 = [];
     if (s0 === peg$FAILED) {
       s0 = peg$currPos;
       s1 = [];
-      if (peg$r4.test(input.charAt(peg$currPos))) {
-        s2 = input.charAt(peg$currPos);
+      s2 = input.charAt(peg$currPos);
+      if (peg$r4.test(s2)) {
         peg$currPos++;
       } else {
         s2 = peg$FAILED;
         peg$currPos++;
       } else {
         s2 = peg$FAILED;
@@ -872,8 +876,8 @@ function peg$parse(input, options) {
       if (s2 !== peg$FAILED) {
         while (s2 !== peg$FAILED) {
           s1.push(s2);
       if (s2 !== peg$FAILED) {
         while (s2 !== peg$FAILED) {
           s1.push(s2);
-          if (peg$r4.test(input.charAt(peg$currPos))) {
-            s2 = input.charAt(peg$currPos);
+          s2 = input.charAt(peg$currPos);
+          if (peg$r4.test(s2)) {
             peg$currPos++;
           } else {
             s2 = peg$FAILED;
             peg$currPos++;
           } else {
             s2 = peg$FAILED;
@@ -903,8 +907,8 @@ function peg$parse(input, options) {
 
     peg$silentFails++;
     s0 = [];
 
     peg$silentFails++;
     s0 = [];
-    if (peg$r5.test(input.charAt(peg$currPos))) {
-      s1 = input.charAt(peg$currPos);
+    s1 = input.charAt(peg$currPos);
+    if (peg$r5.test(s1)) {
       peg$currPos++;
     } else {
       s1 = peg$FAILED;
       peg$currPos++;
     } else {
       s1 = peg$FAILED;
@@ -912,8 +916,8 @@ function peg$parse(input, options) {
     }
     while (s1 !== peg$FAILED) {
       s0.push(s1);
     }
     while (s1 !== peg$FAILED) {
       s0.push(s1);
-      if (peg$r5.test(input.charAt(peg$currPos))) {
-        s1 = input.charAt(peg$currPos);
+      s1 = input.charAt(peg$currPos);
+      if (peg$r5.test(s1)) {
         peg$currPos++;
       } else {
         s1 = peg$FAILED;
         peg$currPos++;
       } else {
         s1 = peg$FAILED;
@@ -945,8 +949,8 @@ function peg$parse(input, options) {
     peg$silentFails++;
     s0 = peg$currPos;
     s1 = [];
     peg$silentFails++;
     s0 = peg$currPos;
     s1 = [];
-    if (peg$r6.test(input.charAt(peg$currPos))) {
-      s2 = input.charAt(peg$currPos);
+    s2 = input.charAt(peg$currPos);
+    if (peg$r6.test(s2)) {
       peg$currPos++;
     } else {
       s2 = peg$FAILED;
       peg$currPos++;
     } else {
       s2 = peg$FAILED;
@@ -954,16 +958,16 @@ function peg$parse(input, options) {
     }
     while (s2 !== peg$FAILED) {
       s1.push(s2);
     }
     while (s2 !== peg$FAILED) {
       s1.push(s2);
-      if (peg$r6.test(input.charAt(peg$currPos))) {
-        s2 = input.charAt(peg$currPos);
+      s2 = input.charAt(peg$currPos);
+      if (peg$r6.test(s2)) {
         peg$currPos++;
       } else {
         s2 = peg$FAILED;
         if (peg$silentFails === 0) { peg$fail(peg$e23); }
       }
     }
         peg$currPos++;
       } else {
         s2 = peg$FAILED;
         if (peg$silentFails === 0) { peg$fail(peg$e23); }
       }
     }
-    if (peg$r7.test(input.charAt(peg$currPos))) {
-      s2 = input.charAt(peg$currPos);
+    s2 = input.charAt(peg$currPos);
+    if (peg$r7.test(s2)) {
       peg$currPos++;
     } else {
       s2 = peg$FAILED;
       peg$currPos++;
     } else {
       s2 = peg$FAILED;
@@ -971,8 +975,8 @@ function peg$parse(input, options) {
     }
     if (s2 !== peg$FAILED) {
       s3 = [];
     }
     if (s2 !== peg$FAILED) {
       s3 = [];
-      if (peg$r6.test(input.charAt(peg$currPos))) {
-        s4 = input.charAt(peg$currPos);
+      s4 = input.charAt(peg$currPos);
+      if (peg$r6.test(s4)) {
         peg$currPos++;
       } else {
         s4 = peg$FAILED;
         peg$currPos++;
       } else {
         s4 = peg$FAILED;
@@ -980,16 +984,16 @@ function peg$parse(input, options) {
       }
       while (s4 !== peg$FAILED) {
         s3.push(s4);
       }
       while (s4 !== peg$FAILED) {
         s3.push(s4);
-        if (peg$r6.test(input.charAt(peg$currPos))) {
-          s4 = input.charAt(peg$currPos);
+        s4 = input.charAt(peg$currPos);
+        if (peg$r6.test(s4)) {
           peg$currPos++;
         } else {
           s4 = peg$FAILED;
           if (peg$silentFails === 0) { peg$fail(peg$e23); }
         }
       }
           peg$currPos++;
         } else {
           s4 = peg$FAILED;
           if (peg$silentFails === 0) { peg$fail(peg$e23); }
         }
       }
-      if (peg$r7.test(input.charAt(peg$currPos))) {
-        s4 = input.charAt(peg$currPos);
+      s4 = input.charAt(peg$currPos);
+      if (peg$r7.test(s4)) {
         peg$currPos++;
       } else {
         s4 = peg$FAILED;
         peg$currPos++;
       } else {
         s4 = peg$FAILED;
@@ -1063,6 +1067,15 @@ let seenAttributes = [];
 
   peg$result = peg$startRuleFunction();
 
 
   peg$result = peg$startRuleFunction();
 
+  if (options.peg$library) {
+    return /** @type {any} */ ({
+      peg$result,
+      peg$currPos,
+      peg$FAILED,
+      peg$maxFailExpected,
+      peg$maxFailPos
+    });
+  }
   if (peg$result !== peg$FAILED && peg$currPos === input.length) {
     return peg$result;
   } else {
   if (peg$result !== peg$FAILED && peg$currPos === input.length) {
     return peg$result;
   } else {
@@ -1081,6 +1094,7 @@ let seenAttributes = [];
 }
 
 module.exports = {
 }
 
 module.exports = {
+  StartRules: ["links", "extendedValue"],
   SyntaxError: peg$SyntaxError,
   parse: peg$parse
 };
   SyntaxError: peg$SyntaxError,
   parse: peg$parse
 };
index 00b36d8de3dbf5064a7012d6c528e656340efdd7..5961430d63ee66bb3a68a6ce0b0ef27eb949d12d 100644 (file)
@@ -1,6 +1,7 @@
 {{
 /* Generated code is not pretty, ignore a lot of this horrorstyle. */
 /* eslint-disable no-control-regex */
 {{
 /* Generated code is not pretty, ignore a lot of this horrorstyle. */
 /* eslint-disable no-control-regex */
+/* eslint-disable no-empty */
 /* eslint-disable security/detect-object-injection */
 /* eslint-disable brace-style */
 /* eslint-disable comma-dangle */
 /* eslint-disable security/detect-object-injection */
 /* eslint-disable brace-style */
 /* eslint-disable comma-dangle */
index ece3700d6952f1ac26ec8b73471289c378a863e7..cecf33047ec87b8996b7a45897d9c881903db493 100644 (file)
@@ -13,7 +13,7 @@
         "eslint": "^9",
         "mocha": "^10",
         "nyc": "^15",
         "eslint": "^9",
         "mocha": "^10",
         "nyc": "^15",
-        "peggy": "^3.0.2",
+        "peggy": "^4",
         "pre-commit": "^1"
       },
       "engines": {
         "pre-commit": "^1"
       },
       "engines": {
         "node": ">= 8"
       }
     },
         "node": ">= 8"
       }
     },
+    "node_modules/@peggyjs/from-mem": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/@peggyjs/from-mem/-/from-mem-1.2.1.tgz",
+      "integrity": "sha512-qh5zG8WKT36142/FqOYtpF0scRR3ZJ3H5XST1bJ/KV2FvyB5MvUB/tB9ZjihRe1iKjJD4PBOZczzwEx7hJtgMw==",
+      "dev": true,
+      "dependencies": {
+        "semver": "7.6.0"
+      },
+      "engines": {
+        "node": ">=18"
+      }
+    },
     "node_modules/@squeep/eslint-config": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/@squeep/eslint-config/-/eslint-config-1.0.0.tgz",
     "node_modules/@squeep/eslint-config": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/@squeep/eslint-config/-/eslint-config-1.0.0.tgz",
       "dev": true
     },
     "node_modules/commander": {
       "dev": true
     },
     "node_modules/commander": {
-      "version": "10.0.1",
-      "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
-      "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
+      "version": "12.0.0",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz",
+      "integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==",
       "dev": true,
       "engines": {
       "dev": true,
       "engines": {
-        "node": ">=14"
+        "node": ">=18"
       }
     },
     "node_modules/comment-parser": {
       }
     },
     "node_modules/comment-parser": {
       }
     },
     "node_modules/peggy": {
       }
     },
     "node_modules/peggy": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/peggy/-/peggy-3.0.2.tgz",
-      "integrity": "sha512-n7chtCbEoGYRwZZ0i/O3t1cPr6o+d9Xx4Zwy2LYfzv0vjchMBU0tO+qYYyvZloBPcgRgzYvALzGWHe609JjEpg==",
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/peggy/-/peggy-4.0.2.tgz",
+      "integrity": "sha512-j4cepPgB20V7honmTAI+7U022y/n/wVi7Rbbd2QrMl2nifFECpngvA6Zhrz/JdmZ5LIBoTdkgHcDzzaA6C4ABg==",
       "dev": true,
       "dependencies": {
       "dev": true,
       "dependencies": {
-        "commander": "^10.0.0",
+        "@peggyjs/from-mem": "1.2.1",
+        "commander": "^12.0.0",
         "source-map-generator": "0.8.0"
       },
       "bin": {
         "peggy": "bin/peggy.js"
       },
       "engines": {
         "source-map-generator": "0.8.0"
       },
       "bin": {
         "peggy": "bin/peggy.js"
       },
       "engines": {
-        "node": ">=14"
+        "node": ">=18"
       }
     },
     "node_modules/picocolors": {
       }
     },
     "node_modules/picocolors": {
index ee1992d870c17d74b3d0a1eb66adea28fd42ba89..0b5a9959ab24ce2b37f48dba355205232b908b6d 100644 (file)
@@ -38,7 +38,7 @@
     "eslint": "^9",
     "mocha": "^10",
     "nyc": "^15",
     "eslint": "^9",
     "mocha": "^10",
     "nyc": "^15",
-    "peggy": "^3.0.2",
+    "peggy": "^4",
     "pre-commit": "^1"
   },
   "dependencies": {}
     "pre-commit": "^1"
   },
   "dependencies": {}