npm-pkg-lint 3.7.2 → 3.8.0

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/dist/index.js CHANGED
@@ -3946,7 +3946,7 @@ var require_semver = __commonJS({
3946
3946
  var require_parse = __commonJS({
3947
3947
  "node_modules/semver/functions/parse.js"(exports, module) {
3948
3948
  var SemVer = require_semver();
3949
- var parse5 = (version3, options, throwErrors = false) => {
3949
+ var parse6 = (version3, options, throwErrors = false) => {
3950
3950
  if (version3 instanceof SemVer) {
3951
3951
  return version3;
3952
3952
  }
@@ -3959,16 +3959,16 @@ var require_parse = __commonJS({
3959
3959
  throw er;
3960
3960
  }
3961
3961
  };
3962
- module.exports = parse5;
3962
+ module.exports = parse6;
3963
3963
  }
3964
3964
  });
3965
3965
 
3966
3966
  // node_modules/semver/functions/valid.js
3967
3967
  var require_valid = __commonJS({
3968
3968
  "node_modules/semver/functions/valid.js"(exports, module) {
3969
- var parse5 = require_parse();
3969
+ var parse6 = require_parse();
3970
3970
  var valid = (version3, options) => {
3971
- const v = parse5(version3, options);
3971
+ const v = parse6(version3, options);
3972
3972
  return v ? v.version : null;
3973
3973
  };
3974
3974
  module.exports = valid;
@@ -3978,9 +3978,9 @@ var require_valid = __commonJS({
3978
3978
  // node_modules/semver/functions/clean.js
3979
3979
  var require_clean = __commonJS({
3980
3980
  "node_modules/semver/functions/clean.js"(exports, module) {
3981
- var parse5 = require_parse();
3981
+ var parse6 = require_parse();
3982
3982
  var clean = (version3, options) => {
3983
- const s = parse5(version3.trim().replace(/^[=v]+/, ""), options);
3983
+ const s = parse6(version3.trim().replace(/^[=v]+/, ""), options);
3984
3984
  return s ? s.version : null;
3985
3985
  };
3986
3986
  module.exports = clean;
@@ -4013,10 +4013,10 @@ var require_inc = __commonJS({
4013
4013
  // node_modules/semver/functions/diff.js
4014
4014
  var require_diff = __commonJS({
4015
4015
  "node_modules/semver/functions/diff.js"(exports, module) {
4016
- var parse5 = require_parse();
4016
+ var parse6 = require_parse();
4017
4017
  var diff = (version1, version22) => {
4018
- const v1 = parse5(version1, null, true);
4019
- const v2 = parse5(version22, null, true);
4018
+ const v1 = parse6(version1, null, true);
4019
+ const v2 = parse6(version22, null, true);
4020
4020
  const comparison = v1.compare(v2);
4021
4021
  if (comparison === 0) {
4022
4022
  return null;
@@ -4084,9 +4084,9 @@ var require_patch = __commonJS({
4084
4084
  // node_modules/semver/functions/prerelease.js
4085
4085
  var require_prerelease = __commonJS({
4086
4086
  "node_modules/semver/functions/prerelease.js"(exports, module) {
4087
- var parse5 = require_parse();
4087
+ var parse6 = require_parse();
4088
4088
  var prerelease = (version3, options) => {
4089
- const parsed = parse5(version3, options);
4089
+ const parsed = parse6(version3, options);
4090
4090
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
4091
4091
  };
4092
4092
  module.exports = prerelease;
@@ -4258,7 +4258,7 @@ var require_cmp = __commonJS({
4258
4258
  var require_coerce = __commonJS({
4259
4259
  "node_modules/semver/functions/coerce.js"(exports, module) {
4260
4260
  var SemVer = require_semver();
4261
- var parse5 = require_parse();
4261
+ var parse6 = require_parse();
4262
4262
  var { safeRe: re, t } = require_re();
4263
4263
  var coerce = (version3, options) => {
4264
4264
  if (version3 instanceof SemVer) {
@@ -4293,7 +4293,7 @@ var require_coerce = __commonJS({
4293
4293
  const patch = match2[4] || "0";
4294
4294
  const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : "";
4295
4295
  const build = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
4296
- return parse5(`${major}.${minor}.${patch}${prerelease}${build}`, options);
4296
+ return parse6(`${major}.${minor}.${patch}${prerelease}${build}`, options);
4297
4297
  };
4298
4298
  module.exports = coerce;
4299
4299
  }
@@ -5293,7 +5293,7 @@ var require_semver2 = __commonJS({
5293
5293
  var constants5 = require_constants();
5294
5294
  var SemVer = require_semver();
5295
5295
  var identifiers = require_identifiers();
5296
- var parse5 = require_parse();
5296
+ var parse6 = require_parse();
5297
5297
  var valid = require_valid();
5298
5298
  var clean = require_clean();
5299
5299
  var inc = require_inc();
@@ -5331,7 +5331,7 @@ var require_semver2 = __commonJS({
5331
5331
  var simplifyRange = require_simplify();
5332
5332
  var subset = require_subset();
5333
5333
  module.exports = {
5334
- parse: parse5,
5334
+ parse: parse6,
5335
5335
  valid,
5336
5336
  clean,
5337
5337
  inc,
@@ -5513,11 +5513,11 @@ var require_which = __commonJS({
5513
5513
  "node_modules/which/which.js"(exports, module) {
5514
5514
  var isWindows4 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
5515
5515
  var path17 = __require("path");
5516
- var COLON = isWindows4 ? ";" : ":";
5516
+ var COLON2 = isWindows4 ? ";" : ":";
5517
5517
  var isexe = require_isexe();
5518
5518
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
5519
5519
  var getPathInfo = (cmd, opt) => {
5520
- const colon = opt.colon || COLON;
5520
+ const colon = opt.colon || COLON2;
5521
5521
  const pathEnv = cmd.match(/\//) || isWindows4 && cmd.match(/\\/) ? [""] : [
5522
5522
  // windows always checks the cwd first
5523
5523
  ...isWindows4 ? [process.cwd()] : [],
@@ -5777,7 +5777,7 @@ var require_parse2 = __commonJS({
5777
5777
  }
5778
5778
  return parsed;
5779
5779
  }
5780
- function parse5(command, args, options) {
5780
+ function parse6(command, args, options) {
5781
5781
  if (args && !Array.isArray(args)) {
5782
5782
  options = args;
5783
5783
  args = null;
@@ -5796,7 +5796,7 @@ var require_parse2 = __commonJS({
5796
5796
  };
5797
5797
  return options.shell ? parsed : parseNonShell(parsed);
5798
5798
  }
5799
- module.exports = parse5;
5799
+ module.exports = parse6;
5800
5800
  }
5801
5801
  });
5802
5802
 
@@ -5855,16 +5855,16 @@ var require_cross_spawn = __commonJS({
5855
5855
  "node_modules/cross-spawn/index.js"(exports, module) {
5856
5856
  "use strict";
5857
5857
  var cp = __require("child_process");
5858
- var parse5 = require_parse2();
5858
+ var parse6 = require_parse2();
5859
5859
  var enoent = require_enoent();
5860
5860
  function spawn2(command, args, options) {
5861
- const parsed = parse5(command, args, options);
5861
+ const parsed = parse6(command, args, options);
5862
5862
  const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
5863
5863
  enoent.hookChildProcess(spawned, parsed);
5864
5864
  return spawned;
5865
5865
  }
5866
5866
  function spawnSync2(command, args, options) {
5867
- const parsed = parse5(command, args, options);
5867
+ const parsed = parse6(command, args, options);
5868
5868
  const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
5869
5869
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
5870
5870
  return result;
@@ -5872,17 +5872,1229 @@ var require_cross_spawn = __commonJS({
5872
5872
  module.exports = spawn2;
5873
5873
  module.exports.spawn = spawn2;
5874
5874
  module.exports.sync = spawnSync2;
5875
- module.exports._parse = parse5;
5875
+ module.exports._parse = parse6;
5876
5876
  module.exports._enoent = enoent;
5877
5877
  }
5878
5878
  });
5879
5879
 
5880
5880
  // src/index.ts
5881
- var import_argparse = __toESM(require_argparse(), 1);
5882
5881
  import { existsSync, createWriteStream as createWriteStream2, readFileSync as readFileSync3, promises as fs14 } from "fs";
5883
5882
  import path16 from "path";
5884
5883
  import { fileURLToPath as fileURLToPath5 } from "url";
5885
5884
 
5885
+ // node_modules/@humanwhocodes/momoa/dist/momoa.js
5886
+ var CHAR_0 = 48;
5887
+ var CHAR_1 = 49;
5888
+ var CHAR_9 = 57;
5889
+ var CHAR_BACKSLASH = 92;
5890
+ var CHAR_DOLLAR = 36;
5891
+ var CHAR_DOT = 46;
5892
+ var CHAR_DOUBLE_QUOTE = 34;
5893
+ var CHAR_LOWER_A = 97;
5894
+ var CHAR_LOWER_E = 101;
5895
+ var CHAR_LOWER_F = 102;
5896
+ var CHAR_LOWER_N = 110;
5897
+ var CHAR_LOWER_T = 116;
5898
+ var CHAR_LOWER_U = 117;
5899
+ var CHAR_LOWER_X = 120;
5900
+ var CHAR_LOWER_Z = 122;
5901
+ var CHAR_MINUS = 45;
5902
+ var CHAR_NEWLINE = 10;
5903
+ var CHAR_PLUS = 43;
5904
+ var CHAR_RETURN = 13;
5905
+ var CHAR_SINGLE_QUOTE = 39;
5906
+ var CHAR_SLASH = 47;
5907
+ var CHAR_SPACE = 32;
5908
+ var CHAR_TAB = 9;
5909
+ var CHAR_UNDERSCORE = 95;
5910
+ var CHAR_UPPER_A = 65;
5911
+ var CHAR_UPPER_E = 69;
5912
+ var CHAR_UPPER_F = 70;
5913
+ var CHAR_UPPER_N = 78;
5914
+ var CHAR_UPPER_X = 88;
5915
+ var CHAR_UPPER_Z = 90;
5916
+ var CHAR_LOWER_B = 98;
5917
+ var CHAR_LOWER_R = 114;
5918
+ var CHAR_LOWER_V = 118;
5919
+ var CHAR_LINE_SEPARATOR = 8232;
5920
+ var CHAR_PARAGRAPH_SEPARATOR = 8233;
5921
+ var CHAR_LOWER_L = 108;
5922
+ var CHAR_LOWER_S = 115;
5923
+ var CHAR_UPPER_I = 73;
5924
+ var CHAR_STAR = 42;
5925
+ var CHAR_VTAB = 11;
5926
+ var CHAR_FORM_FEED = 12;
5927
+ var CHAR_NBSP = 160;
5928
+ var CHAR_BOM = 65279;
5929
+ var CHAR_NON_BREAKING_SPACE = 160;
5930
+ var CHAR_EN_QUAD = 8192;
5931
+ var CHAR_EM_QUAD = 8193;
5932
+ var CHAR_EN_SPACE = 8194;
5933
+ var CHAR_EM_SPACE = 8195;
5934
+ var CHAR_THREE_PER_EM_SPACE = 8196;
5935
+ var CHAR_FOUR_PER_EM_SPACE = 8197;
5936
+ var CHAR_SIX_PER_EM_SPACE = 8198;
5937
+ var CHAR_FIGURE_SPACE = 8199;
5938
+ var CHAR_PUNCTUATION_SPACE = 8200;
5939
+ var CHAR_THIN_SPACE = 8201;
5940
+ var CHAR_HAIR_SPACE = 8202;
5941
+ var CHAR_NARROW_NO_BREAK_SPACE = 8239;
5942
+ var CHAR_MEDIUM_MATHEMATICAL_SPACE = 8287;
5943
+ var CHAR_IDEOGRAPHIC_SPACE = 12288;
5944
+ var LBRACKET = "[";
5945
+ var RBRACKET = "]";
5946
+ var LBRACE = "{";
5947
+ var RBRACE = "}";
5948
+ var COLON = ":";
5949
+ var COMMA = ",";
5950
+ var TRUE = "true";
5951
+ var FALSE = "false";
5952
+ var NULL = "null";
5953
+ var NAN$1 = "NaN";
5954
+ var INFINITY$1 = "Infinity";
5955
+ var QUOTE = '"';
5956
+ var expectedKeywords = /* @__PURE__ */ new Map([
5957
+ [CHAR_LOWER_T, [CHAR_LOWER_R, CHAR_LOWER_U, CHAR_LOWER_E]],
5958
+ [CHAR_LOWER_F, [CHAR_LOWER_A, CHAR_LOWER_L, CHAR_LOWER_S, CHAR_LOWER_E]],
5959
+ [CHAR_LOWER_N, [CHAR_LOWER_U, CHAR_LOWER_L, CHAR_LOWER_L]]
5960
+ ]);
5961
+ var escapeToChar = /* @__PURE__ */ new Map([
5962
+ [CHAR_DOUBLE_QUOTE, QUOTE],
5963
+ [CHAR_BACKSLASH, "\\"],
5964
+ [CHAR_SLASH, "/"],
5965
+ [CHAR_LOWER_B, "\b"],
5966
+ [CHAR_LOWER_N, "\n"],
5967
+ [CHAR_LOWER_F, "\f"],
5968
+ [CHAR_LOWER_R, "\r"],
5969
+ [CHAR_LOWER_T, " "]
5970
+ ]);
5971
+ var json5EscapeToChar = new Map([
5972
+ ...escapeToChar,
5973
+ [CHAR_LOWER_V, "\v"],
5974
+ [CHAR_0, "\0"]
5975
+ ]);
5976
+ var charToEscape = /* @__PURE__ */ new Map([
5977
+ [QUOTE, QUOTE],
5978
+ ["\\", "\\"],
5979
+ ["/", "/"],
5980
+ ["\b", "b"],
5981
+ ["\n", "n"],
5982
+ ["\f", "f"],
5983
+ ["\r", "r"],
5984
+ [" ", "t"]
5985
+ ]);
5986
+ var json5CharToEscape = new Map([
5987
+ ...charToEscape,
5988
+ ["\v", "v"],
5989
+ ["\0", "0"],
5990
+ ["\u2028", "u2028"],
5991
+ ["\u2029", "u2029"]
5992
+ ]);
5993
+ var knownTokenTypes = /* @__PURE__ */ new Map([
5994
+ [LBRACKET, "LBracket"],
5995
+ [RBRACKET, "RBracket"],
5996
+ [LBRACE, "LBrace"],
5997
+ [RBRACE, "RBrace"],
5998
+ [COLON, "Colon"],
5999
+ [COMMA, "Comma"],
6000
+ [TRUE, "Boolean"],
6001
+ [FALSE, "Boolean"],
6002
+ [NULL, "Null"]
6003
+ ]);
6004
+ var knownJSON5TokenTypes = new Map([
6005
+ ...knownTokenTypes,
6006
+ [NAN$1, "Number"],
6007
+ [INFINITY$1, "Number"]
6008
+ ]);
6009
+ var json5LineTerminators = /* @__PURE__ */ new Set([
6010
+ CHAR_NEWLINE,
6011
+ CHAR_RETURN,
6012
+ CHAR_LINE_SEPARATOR,
6013
+ CHAR_PARAGRAPH_SEPARATOR
6014
+ ]);
6015
+ var ErrorWithLocation = class extends Error {
6016
+ /**
6017
+ * Creates a new instance.
6018
+ * @param {string} message The error message to report.
6019
+ * @param {Location} loc The location information for the error.
6020
+ */
6021
+ constructor(message, { line, column, offset }) {
6022
+ super(`${message} (${line}:${column})`);
6023
+ this.line = line;
6024
+ this.column = column;
6025
+ this.offset = offset;
6026
+ }
6027
+ };
6028
+ var UnexpectedChar = class extends ErrorWithLocation {
6029
+ /**
6030
+ * Creates a new instance.
6031
+ * @param {number} unexpected The character that was found.
6032
+ * @param {Location} loc The location information for the found character.
6033
+ */
6034
+ constructor(unexpected, loc) {
6035
+ super(`Unexpected character '${String.fromCharCode(unexpected)}' found.`, loc);
6036
+ }
6037
+ };
6038
+ var UnexpectedToken = class extends ErrorWithLocation {
6039
+ /**
6040
+ * Creates a new instance.
6041
+ * @param {Token} token The token that was found.
6042
+ */
6043
+ constructor(token) {
6044
+ super(`Unexpected token ${token.type} found.`, token.loc.start);
6045
+ }
6046
+ };
6047
+ var UnexpectedEOF = class extends ErrorWithLocation {
6048
+ /**
6049
+ * Creates a new instance.
6050
+ * @param {Location} loc The location information for the found character.
6051
+ */
6052
+ constructor(loc) {
6053
+ super("Unexpected end of input found.", loc);
6054
+ }
6055
+ };
6056
+ var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
6057
+ var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;
6058
+ var CHAR_CR = 13;
6059
+ var CHAR_LF = 10;
6060
+ var _text, _line, _column, _offset, _newLine, _last, _ended, _CharCodeReader_instances, end_fn;
6061
+ var CharCodeReader = class {
6062
+ /**
6063
+ * Creates a new instance.
6064
+ * @param {string} text The text to read from
6065
+ */
6066
+ constructor(text) {
6067
+ __privateAdd(this, _CharCodeReader_instances);
6068
+ /**
6069
+ * The text to read from.
6070
+ * @type {string}
6071
+ */
6072
+ __privateAdd(this, _text, "");
6073
+ /**
6074
+ * The current line number.
6075
+ * @type {number}
6076
+ */
6077
+ __privateAdd(this, _line, 1);
6078
+ /**
6079
+ * The current column number.
6080
+ * @type {number}
6081
+ */
6082
+ __privateAdd(this, _column, 0);
6083
+ /**
6084
+ * The current offset in the text.
6085
+ * @type {number}
6086
+ */
6087
+ __privateAdd(this, _offset, -1);
6088
+ /**
6089
+ * Whether the last character read was a new line.
6090
+ * @type {boolean}
6091
+ */
6092
+ __privateAdd(this, _newLine, false);
6093
+ /**
6094
+ * The last character code read.
6095
+ * @type {number}
6096
+ */
6097
+ __privateAdd(this, _last, -1);
6098
+ /**
6099
+ * Whether the reader has ended.
6100
+ * @type {boolean}
6101
+ */
6102
+ __privateAdd(this, _ended, false);
6103
+ __privateSet(this, _text, text);
6104
+ }
6105
+ /**
6106
+ * Returns the current position of the reader.
6107
+ * @returns {Location} An object with line, column, and offset properties.
6108
+ */
6109
+ locate() {
6110
+ return {
6111
+ line: __privateGet(this, _line),
6112
+ column: __privateGet(this, _column),
6113
+ offset: __privateGet(this, _offset)
6114
+ };
6115
+ }
6116
+ /**
6117
+ * Reads the next character code in the text.
6118
+ * @returns {number} The next character code, or -1 if there are no more characters.
6119
+ */
6120
+ next() {
6121
+ if (__privateGet(this, _offset) >= __privateGet(this, _text).length - 1) {
6122
+ __privateMethod(this, _CharCodeReader_instances, end_fn).call(this);
6123
+ return -1;
6124
+ }
6125
+ __privateWrapper(this, _offset)._++;
6126
+ const charCode = __privateGet(this, _text).charCodeAt(__privateGet(this, _offset));
6127
+ if (__privateGet(this, _newLine)) {
6128
+ __privateWrapper(this, _line)._++;
6129
+ __privateSet(this, _column, 1);
6130
+ __privateSet(this, _newLine, false);
6131
+ } else {
6132
+ __privateWrapper(this, _column)._++;
6133
+ }
6134
+ if (charCode === CHAR_CR) {
6135
+ __privateSet(this, _newLine, true);
6136
+ if (this.peek() === CHAR_LF) {
6137
+ __privateWrapper(this, _offset)._++;
6138
+ }
6139
+ } else if (charCode === CHAR_LF) {
6140
+ __privateSet(this, _newLine, true);
6141
+ }
6142
+ __privateSet(this, _last, charCode);
6143
+ return charCode;
6144
+ }
6145
+ /**
6146
+ * Peeks at the next character code in the text.
6147
+ * @returns {number} The next character code, or -1 if there are no more characters.
6148
+ */
6149
+ peek() {
6150
+ if (__privateGet(this, _offset) === __privateGet(this, _text).length - 1) {
6151
+ return -1;
6152
+ }
6153
+ return __privateGet(this, _text).charCodeAt(__privateGet(this, _offset) + 1);
6154
+ }
6155
+ /**
6156
+ * Returns the last character code read.
6157
+ * @returns {number} The last character code read.
6158
+ */
6159
+ current() {
6160
+ return __privateGet(this, _last);
6161
+ }
6162
+ };
6163
+ _text = new WeakMap();
6164
+ _line = new WeakMap();
6165
+ _column = new WeakMap();
6166
+ _offset = new WeakMap();
6167
+ _newLine = new WeakMap();
6168
+ _last = new WeakMap();
6169
+ _ended = new WeakMap();
6170
+ _CharCodeReader_instances = new WeakSet();
6171
+ /**
6172
+ * Ends the reader.
6173
+ * @returns {void}
6174
+ */
6175
+ end_fn = function() {
6176
+ if (__privateGet(this, _ended)) {
6177
+ return;
6178
+ }
6179
+ __privateWrapper(this, _column)._++;
6180
+ __privateWrapper(this, _offset)._++;
6181
+ __privateSet(this, _last, -1);
6182
+ __privateSet(this, _ended, true);
6183
+ };
6184
+ var INFINITY = "Infinity";
6185
+ var NAN = "NaN";
6186
+ var keywordStarts = /* @__PURE__ */ new Set([CHAR_LOWER_T, CHAR_LOWER_F, CHAR_LOWER_N]);
6187
+ var whitespace = /* @__PURE__ */ new Set([CHAR_SPACE, CHAR_TAB, CHAR_NEWLINE, CHAR_RETURN]);
6188
+ var json5Whitespace = /* @__PURE__ */ new Set([
6189
+ ...whitespace,
6190
+ CHAR_VTAB,
6191
+ CHAR_FORM_FEED,
6192
+ CHAR_NBSP,
6193
+ CHAR_LINE_SEPARATOR,
6194
+ CHAR_PARAGRAPH_SEPARATOR,
6195
+ CHAR_BOM,
6196
+ CHAR_NON_BREAKING_SPACE,
6197
+ CHAR_EN_QUAD,
6198
+ CHAR_EM_QUAD,
6199
+ CHAR_EN_SPACE,
6200
+ CHAR_EM_SPACE,
6201
+ CHAR_THREE_PER_EM_SPACE,
6202
+ CHAR_FOUR_PER_EM_SPACE,
6203
+ CHAR_SIX_PER_EM_SPACE,
6204
+ CHAR_FIGURE_SPACE,
6205
+ CHAR_PUNCTUATION_SPACE,
6206
+ CHAR_THIN_SPACE,
6207
+ CHAR_HAIR_SPACE,
6208
+ CHAR_NARROW_NO_BREAK_SPACE,
6209
+ CHAR_MEDIUM_MATHEMATICAL_SPACE,
6210
+ CHAR_IDEOGRAPHIC_SPACE
6211
+ ]);
6212
+ var DEFAULT_OPTIONS$1 = {
6213
+ mode: "json",
6214
+ ranges: false
6215
+ };
6216
+ function isDigit(c3) {
6217
+ return c3 >= CHAR_0 && c3 <= CHAR_9;
6218
+ }
6219
+ function isHexDigit(c3) {
6220
+ return isDigit(c3) || c3 >= CHAR_UPPER_A && c3 <= CHAR_UPPER_F || c3 >= CHAR_LOWER_A && c3 <= CHAR_LOWER_F;
6221
+ }
6222
+ function isPositiveDigit(c3) {
6223
+ return c3 >= CHAR_1 && c3 <= CHAR_9;
6224
+ }
6225
+ function isKeywordStart(c3) {
6226
+ return keywordStarts.has(c3);
6227
+ }
6228
+ function isNumberStart(c3) {
6229
+ return isDigit(c3) || c3 === CHAR_DOT || c3 === CHAR_MINUS;
6230
+ }
6231
+ function isJSON5NumberStart(c3) {
6232
+ return isNumberStart(c3) || c3 === CHAR_PLUS;
6233
+ }
6234
+ function isStringStart(c3, json5) {
6235
+ return c3 === CHAR_DOUBLE_QUOTE || json5 && c3 === CHAR_SINGLE_QUOTE;
6236
+ }
6237
+ function isJSON5IdentifierStart(c3) {
6238
+ if (c3 === CHAR_DOLLAR || c3 === CHAR_UNDERSCORE || c3 === CHAR_BACKSLASH) {
6239
+ return true;
6240
+ }
6241
+ if (c3 >= CHAR_LOWER_A && c3 <= CHAR_LOWER_Z || c3 >= CHAR_UPPER_A && c3 <= CHAR_UPPER_Z) {
6242
+ return true;
6243
+ }
6244
+ if (c3 === 8204 || c3 === 8205) {
6245
+ return true;
6246
+ }
6247
+ const ct = String.fromCharCode(c3);
6248
+ return ID_Start.test(ct);
6249
+ }
6250
+ function isJSON5IdentifierPart(c3) {
6251
+ if (isJSON5IdentifierStart(c3) || isDigit(c3)) {
6252
+ return true;
6253
+ }
6254
+ const ct = String.fromCharCode(c3);
6255
+ return ID_Continue.test(ct);
6256
+ }
6257
+ function tokenize(text, options) {
6258
+ options = Object.freeze({
6259
+ ...DEFAULT_OPTIONS$1,
6260
+ ...options
6261
+ });
6262
+ const json5 = options.mode === "json5";
6263
+ const allowComments = options.mode !== "json";
6264
+ const reader = new CharCodeReader(text);
6265
+ const tokens = [];
6266
+ const isEscapedCharacter = json5 ? json5EscapeToChar.has.bind(json5EscapeToChar) : escapeToChar.has.bind(escapeToChar);
6267
+ const isJSON5LineTerminator = json5 ? json5LineTerminators.has.bind(json5LineTerminators) : () => false;
6268
+ const isJSON5HexEscape = json5 ? (c4) => c4 === CHAR_LOWER_X : () => false;
6269
+ const isWhitespace = json5 ? json5Whitespace.has.bind(json5Whitespace) : whitespace.has.bind(whitespace);
6270
+ function createToken(tokenType, length, startLoc, endLoc) {
6271
+ const endOffset = startLoc.offset + length;
6272
+ let range = options.ranges ? {
6273
+ range: (
6274
+ /** @type {Range} */
6275
+ [startLoc.offset, endOffset]
6276
+ )
6277
+ } : void 0;
6278
+ return {
6279
+ type: tokenType,
6280
+ loc: {
6281
+ start: startLoc,
6282
+ end: endLoc || {
6283
+ line: startLoc.line,
6284
+ column: startLoc.column + length,
6285
+ offset: endOffset
6286
+ }
6287
+ },
6288
+ ...range
6289
+ };
6290
+ }
6291
+ function readCharSequence(text2) {
6292
+ for (let i2 = 0; i2 < text2.length; i2++) {
6293
+ if (reader.peek() !== text2.charCodeAt(i2)) {
6294
+ return false;
6295
+ }
6296
+ reader.next();
6297
+ }
6298
+ return true;
6299
+ }
6300
+ function readKeyword(c4) {
6301
+ let sequence = expectedKeywords.get(c4);
6302
+ let value = String.fromCharCode(c4);
6303
+ for (let j = 0; j < sequence.length; j++) {
6304
+ const nc = reader.next();
6305
+ if (sequence[j] !== nc) {
6306
+ unexpected(nc);
6307
+ }
6308
+ value += String.fromCharCode(nc);
6309
+ }
6310
+ return {
6311
+ value,
6312
+ c: reader.next()
6313
+ };
6314
+ }
6315
+ function readJSON5Identifier(c4) {
6316
+ let value = "";
6317
+ do {
6318
+ value += String.fromCharCode(c4);
6319
+ if (c4 === CHAR_BACKSLASH) {
6320
+ c4 = reader.next();
6321
+ if (c4 !== CHAR_LOWER_U) {
6322
+ unexpected(c4);
6323
+ }
6324
+ value += String.fromCharCode(c4);
6325
+ const result = readHexDigits(4);
6326
+ value += result.value;
6327
+ c4 = result.c;
6328
+ }
6329
+ c4 = reader.next();
6330
+ } while (c4 > -1 && isJSON5IdentifierPart(c4));
6331
+ return { value, c: c4 };
6332
+ }
6333
+ function readHexDigits(count2) {
6334
+ let value = "";
6335
+ for (let i2 = 0; i2 < count2; i2++) {
6336
+ c3 = reader.next();
6337
+ if (isHexDigit(c3)) {
6338
+ value += String.fromCharCode(c3);
6339
+ continue;
6340
+ }
6341
+ unexpected(c3);
6342
+ }
6343
+ return { value, c: c3 };
6344
+ }
6345
+ function readString(c4) {
6346
+ const delimiter = c4;
6347
+ let length = 1;
6348
+ c4 = reader.next();
6349
+ while (c4 !== -1 && c4 !== delimiter) {
6350
+ if (c4 === CHAR_BACKSLASH) {
6351
+ length++;
6352
+ c4 = reader.next();
6353
+ if (isEscapedCharacter(c4) || isJSON5LineTerminator(c4)) {
6354
+ length++;
6355
+ } else if (c4 === CHAR_LOWER_U) {
6356
+ length++;
6357
+ const result = readHexDigits(4);
6358
+ length += result.value.length;
6359
+ c4 = result.c;
6360
+ } else if (isJSON5HexEscape(c4)) {
6361
+ length++;
6362
+ const result = readHexDigits(2);
6363
+ length += result.value.length;
6364
+ c4 = result.c;
6365
+ } else if (!json5) {
6366
+ unexpected(c4);
6367
+ }
6368
+ } else {
6369
+ length++;
6370
+ }
6371
+ c4 = reader.next();
6372
+ }
6373
+ if (c4 === -1) {
6374
+ unexpectedEOF();
6375
+ }
6376
+ length++;
6377
+ return { length, c: reader.next() };
6378
+ }
6379
+ function readNumber(c4) {
6380
+ let length = 0;
6381
+ if (c4 === CHAR_MINUS || json5 && c4 === CHAR_PLUS) {
6382
+ length++;
6383
+ c4 = reader.next();
6384
+ if (json5) {
6385
+ if (c4 === CHAR_UPPER_I && readCharSequence("nfinity")) {
6386
+ return { length: INFINITY.length + 1, c: reader.next() };
6387
+ }
6388
+ if (c4 === CHAR_UPPER_N && readCharSequence("aN")) {
6389
+ return { length: NAN.length + 1, c: reader.next() };
6390
+ }
6391
+ }
6392
+ if (!isDigit(c4)) {
6393
+ unexpected(c4);
6394
+ }
6395
+ }
6396
+ if (c4 === CHAR_0) {
6397
+ length++;
6398
+ c4 = reader.next();
6399
+ if (json5 && (c4 === CHAR_LOWER_X || c4 === CHAR_UPPER_X)) {
6400
+ length++;
6401
+ c4 = reader.next();
6402
+ if (!isHexDigit(c4)) {
6403
+ unexpected(c4);
6404
+ }
6405
+ do {
6406
+ length++;
6407
+ c4 = reader.next();
6408
+ } while (isHexDigit(c4));
6409
+ } else if (isDigit(c4)) {
6410
+ unexpected(c4);
6411
+ }
6412
+ } else {
6413
+ if (!json5 || c4 !== CHAR_DOT) {
6414
+ if (!isPositiveDigit(c4)) {
6415
+ unexpected(c4);
6416
+ }
6417
+ do {
6418
+ length++;
6419
+ c4 = reader.next();
6420
+ } while (isDigit(c4));
6421
+ }
6422
+ }
6423
+ if (c4 === CHAR_DOT) {
6424
+ let digitCount = -1;
6425
+ do {
6426
+ length++;
6427
+ digitCount++;
6428
+ c4 = reader.next();
6429
+ } while (isDigit(c4));
6430
+ if (!json5 && digitCount === 0) {
6431
+ if (c4) {
6432
+ unexpected(c4);
6433
+ } else {
6434
+ unexpectedEOF();
6435
+ }
6436
+ }
6437
+ }
6438
+ if (c4 === CHAR_LOWER_E || c4 === CHAR_UPPER_E) {
6439
+ length++;
6440
+ c4 = reader.next();
6441
+ if (c4 === CHAR_PLUS || c4 === CHAR_MINUS) {
6442
+ length++;
6443
+ c4 = reader.next();
6444
+ }
6445
+ if (c4 === -1) {
6446
+ unexpectedEOF();
6447
+ }
6448
+ if (!isDigit(c4)) {
6449
+ unexpected(c4);
6450
+ }
6451
+ while (isDigit(c4)) {
6452
+ length++;
6453
+ c4 = reader.next();
6454
+ }
6455
+ }
6456
+ return { length, c: c4 };
6457
+ }
6458
+ function readComment(c4) {
6459
+ let length = 1;
6460
+ c4 = reader.next();
6461
+ if (c4 === CHAR_SLASH) {
6462
+ do {
6463
+ length += 1;
6464
+ c4 = reader.next();
6465
+ } while (c4 > -1 && c4 !== CHAR_RETURN && c4 !== CHAR_NEWLINE);
6466
+ return { length, c: c4, multiline: false };
6467
+ }
6468
+ if (c4 === CHAR_STAR) {
6469
+ while (c4 > -1) {
6470
+ length += 1;
6471
+ c4 = reader.next();
6472
+ if (c4 === CHAR_STAR) {
6473
+ length += 1;
6474
+ c4 = reader.next();
6475
+ if (c4 === CHAR_SLASH) {
6476
+ length += 1;
6477
+ c4 = reader.next();
6478
+ return { length, c: c4, multiline: true };
6479
+ }
6480
+ }
6481
+ }
6482
+ unexpectedEOF();
6483
+ }
6484
+ unexpected(c4);
6485
+ }
6486
+ function unexpected(c4) {
6487
+ throw new UnexpectedChar(c4, reader.locate());
6488
+ }
6489
+ function unexpectedEOF() {
6490
+ throw new UnexpectedEOF(reader.locate());
6491
+ }
6492
+ let c3 = reader.next();
6493
+ while (c3 > -1) {
6494
+ while (isWhitespace(c3)) {
6495
+ c3 = reader.next();
6496
+ }
6497
+ if (c3 === -1) {
6498
+ break;
6499
+ }
6500
+ const start = reader.locate();
6501
+ const ct = String.fromCharCode(c3);
6502
+ if (json5) {
6503
+ if (knownJSON5TokenTypes.has(ct)) {
6504
+ tokens.push(createToken(knownJSON5TokenTypes.get(ct), 1, start));
6505
+ c3 = reader.next();
6506
+ } else if (isJSON5IdentifierStart(c3)) {
6507
+ const result = readJSON5Identifier(c3);
6508
+ let value = result.value;
6509
+ c3 = result.c;
6510
+ if (knownJSON5TokenTypes.has(value)) {
6511
+ tokens.push(createToken(knownJSON5TokenTypes.get(value), value.length, start));
6512
+ } else {
6513
+ tokens.push(createToken("Identifier", value.length, start));
6514
+ }
6515
+ } else if (isJSON5NumberStart(c3)) {
6516
+ const result = readNumber(c3);
6517
+ c3 = result.c;
6518
+ tokens.push(createToken("Number", result.length, start));
6519
+ } else if (isStringStart(c3, json5)) {
6520
+ const result = readString(c3);
6521
+ c3 = result.c;
6522
+ tokens.push(createToken("String", result.length, start, reader.locate()));
6523
+ } else if (c3 === CHAR_SLASH && allowComments) {
6524
+ const result = readComment(c3);
6525
+ c3 = result.c;
6526
+ tokens.push(createToken(!result.multiline ? "LineComment" : "BlockComment", result.length, start, reader.locate()));
6527
+ } else {
6528
+ unexpected(c3);
6529
+ }
6530
+ } else {
6531
+ const ct2 = String.fromCharCode(c3);
6532
+ if (knownTokenTypes.has(ct2)) {
6533
+ tokens.push(createToken(knownTokenTypes.get(ct2), 1, start));
6534
+ c3 = reader.next();
6535
+ } else if (isKeywordStart(c3)) {
6536
+ const result = readKeyword(c3);
6537
+ let value = result.value;
6538
+ c3 = result.c;
6539
+ tokens.push(createToken(knownTokenTypes.get(value), value.length, start));
6540
+ } else if (isNumberStart(c3)) {
6541
+ const result = readNumber(c3);
6542
+ c3 = result.c;
6543
+ tokens.push(createToken("Number", result.length, start));
6544
+ } else if (isStringStart(c3, json5)) {
6545
+ const result = readString(c3);
6546
+ c3 = result.c;
6547
+ tokens.push(createToken("String", result.length, start));
6548
+ } else if (c3 === CHAR_SLASH && allowComments) {
6549
+ const result = readComment(c3);
6550
+ c3 = result.c;
6551
+ tokens.push(createToken(!result.multiline ? "LineComment" : "BlockComment", result.length, start, reader.locate()));
6552
+ } else {
6553
+ unexpected(c3);
6554
+ }
6555
+ }
6556
+ }
6557
+ return tokens;
6558
+ }
6559
+ var types = {
6560
+ /**
6561
+ * Creates a document node.
6562
+ * @param {ValueNode} body The body of the document.
6563
+ * @param {NodeParts} parts Additional properties for the node.
6564
+ * @returns {DocumentNode} The document node.
6565
+ */
6566
+ document(body, parts = {}) {
6567
+ return {
6568
+ type: "Document",
6569
+ body,
6570
+ loc: parts.loc,
6571
+ ...parts
6572
+ };
6573
+ },
6574
+ /**
6575
+ * Creates a string node.
6576
+ * @param {string} value The value for the string.
6577
+ * @param {NodeParts} parts Additional properties for the node.
6578
+ * @returns {StringNode} The string node.
6579
+ */
6580
+ string(value, parts = {}) {
6581
+ return {
6582
+ type: "String",
6583
+ value,
6584
+ loc: parts.loc,
6585
+ ...parts
6586
+ };
6587
+ },
6588
+ /**
6589
+ * Creates a number node.
6590
+ * @param {number} value The value for the number.
6591
+ * @param {NodeParts} parts Additional properties for the node.
6592
+ * @returns {NumberNode} The number node.
6593
+ */
6594
+ number(value, parts = {}) {
6595
+ return {
6596
+ type: "Number",
6597
+ value,
6598
+ loc: parts.loc,
6599
+ ...parts
6600
+ };
6601
+ },
6602
+ /**
6603
+ * Creates a boolean node.
6604
+ * @param {boolean} value The value for the boolean.
6605
+ * @param {NodeParts} parts Additional properties for the node.
6606
+ * @returns {BooleanNode} The boolean node.
6607
+ */
6608
+ boolean(value, parts = {}) {
6609
+ return {
6610
+ type: "Boolean",
6611
+ value,
6612
+ loc: parts.loc,
6613
+ ...parts
6614
+ };
6615
+ },
6616
+ /**
6617
+ * Creates a null node.
6618
+ * @param {NodeParts} parts Additional properties for the node.
6619
+ * @returns {NullNode} The null node.
6620
+ */
6621
+ null(parts = {}) {
6622
+ return {
6623
+ type: "Null",
6624
+ loc: parts.loc,
6625
+ ...parts
6626
+ };
6627
+ },
6628
+ /**
6629
+ * Creates an array node.
6630
+ * @param {Array<ElementNode>} elements The elements to add.
6631
+ * @param {NodeParts} parts Additional properties for the node.
6632
+ * @returns {ArrayNode} The array node.
6633
+ */
6634
+ array(elements, parts = {}) {
6635
+ return {
6636
+ type: "Array",
6637
+ elements,
6638
+ loc: parts.loc,
6639
+ ...parts
6640
+ };
6641
+ },
6642
+ /**
6643
+ * Creates an element node.
6644
+ * @param {ValueNode} value The value for the element.
6645
+ * @param {NodeParts} parts Additional properties for the node.
6646
+ * @returns {ElementNode} The element node.
6647
+ */
6648
+ element(value, parts = {}) {
6649
+ return {
6650
+ type: "Element",
6651
+ value,
6652
+ loc: parts.loc,
6653
+ ...parts
6654
+ };
6655
+ },
6656
+ /**
6657
+ * Creates an object node.
6658
+ * @param {Array<MemberNode>} members The members to add.
6659
+ * @param {NodeParts} parts Additional properties for the node.
6660
+ * @returns {ObjectNode} The object node.
6661
+ */
6662
+ object(members, parts = {}) {
6663
+ return {
6664
+ type: "Object",
6665
+ members,
6666
+ loc: parts.loc,
6667
+ ...parts
6668
+ };
6669
+ },
6670
+ /**
6671
+ * Creates a member node.
6672
+ * @param {StringNode|IdentifierNode} name The name for the member.
6673
+ * @param {ValueNode} value The value for the member.
6674
+ * @param {NodeParts} parts Additional properties for the node.
6675
+ * @returns {MemberNode} The member node.
6676
+ */
6677
+ member(name2, value, parts = {}) {
6678
+ return {
6679
+ type: "Member",
6680
+ name: name2,
6681
+ value,
6682
+ loc: parts.loc,
6683
+ ...parts
6684
+ };
6685
+ },
6686
+ /**
6687
+ * Creates an identifier node.
6688
+ * @param {string} name The name for the identifier.
6689
+ * @param {NodeParts} parts Additional properties for the node.
6690
+ * @returns {IdentifierNode} The identifier node.
6691
+ */
6692
+ identifier(name2, parts = {}) {
6693
+ return {
6694
+ type: "Identifier",
6695
+ name: name2,
6696
+ loc: parts.loc,
6697
+ ...parts
6698
+ };
6699
+ },
6700
+ /**
6701
+ * Creates a NaN node.
6702
+ * @param {Sign} sign The sign for the Infinity.
6703
+ * @param {NodeParts} parts Additional properties for the node.
6704
+ * @returns {NaNNode} The NaN node.
6705
+ */
6706
+ nan(sign = "", parts = {}) {
6707
+ return {
6708
+ type: "NaN",
6709
+ sign,
6710
+ loc: parts.loc,
6711
+ ...parts
6712
+ };
6713
+ },
6714
+ /**
6715
+ * Creates an Infinity node.
6716
+ * @param {Sign} sign The sign for the Infinity.
6717
+ * @param {NodeParts} parts Additional properties for the node.
6718
+ * @returns {InfinityNode} The Infinity node.
6719
+ */
6720
+ infinity(sign = "", parts = {}) {
6721
+ return {
6722
+ type: "Infinity",
6723
+ sign,
6724
+ loc: parts.loc,
6725
+ ...parts
6726
+ };
6727
+ }
6728
+ };
6729
+ var DEFAULT_OPTIONS = {
6730
+ mode: "json",
6731
+ ranges: false,
6732
+ tokens: false
6733
+ };
6734
+ function getStringValue(value, token, json5 = false) {
6735
+ let result = "";
6736
+ let escapeIndex = value.indexOf("\\");
6737
+ let lastIndex = 0;
6738
+ while (escapeIndex >= 0) {
6739
+ result += value.slice(lastIndex, escapeIndex);
6740
+ const escapeChar = value.charAt(escapeIndex + 1);
6741
+ const escapeCharCode = escapeChar.charCodeAt(0);
6742
+ if (json5 && json5EscapeToChar.has(escapeCharCode)) {
6743
+ result += json5EscapeToChar.get(escapeCharCode);
6744
+ lastIndex = escapeIndex + 2;
6745
+ } else if (escapeToChar.has(escapeCharCode)) {
6746
+ result += escapeToChar.get(escapeCharCode);
6747
+ lastIndex = escapeIndex + 2;
6748
+ } else if (escapeChar === "u") {
6749
+ const hexCode = value.slice(escapeIndex + 2, escapeIndex + 6);
6750
+ if (hexCode.length < 4 || /[^0-9a-f]/i.test(hexCode)) {
6751
+ throw new ErrorWithLocation(
6752
+ `Invalid unicode escape \\u${hexCode}.`,
6753
+ {
6754
+ line: token.loc.start.line,
6755
+ column: token.loc.start.column + escapeIndex,
6756
+ offset: token.loc.start.offset + escapeIndex
6757
+ }
6758
+ );
6759
+ }
6760
+ result += String.fromCharCode(parseInt(hexCode, 16));
6761
+ lastIndex = escapeIndex + 6;
6762
+ } else if (json5 && escapeChar === "x") {
6763
+ const hexCode = value.slice(escapeIndex + 2, escapeIndex + 4);
6764
+ if (hexCode.length < 2 || /[^0-9a-f]/i.test(hexCode)) {
6765
+ throw new ErrorWithLocation(
6766
+ `Invalid hex escape \\x${hexCode}.`,
6767
+ {
6768
+ line: token.loc.start.line,
6769
+ column: token.loc.start.column + escapeIndex,
6770
+ offset: token.loc.start.offset + escapeIndex
6771
+ }
6772
+ );
6773
+ }
6774
+ result += String.fromCharCode(parseInt(hexCode, 16));
6775
+ lastIndex = escapeIndex + 4;
6776
+ } else if (json5 && json5LineTerminators.has(escapeCharCode)) {
6777
+ lastIndex = escapeIndex + 2;
6778
+ if (escapeChar === "\r" && value.charAt(lastIndex) === "\n") {
6779
+ lastIndex++;
6780
+ }
6781
+ } else {
6782
+ if (json5) {
6783
+ result += escapeChar;
6784
+ lastIndex = escapeIndex + 2;
6785
+ } else {
6786
+ throw new ErrorWithLocation(
6787
+ `Invalid escape \\${escapeChar}.`,
6788
+ {
6789
+ line: token.loc.start.line,
6790
+ column: token.loc.start.column + escapeIndex,
6791
+ offset: token.loc.start.offset + escapeIndex
6792
+ }
6793
+ );
6794
+ }
6795
+ }
6796
+ escapeIndex = value.indexOf("\\", lastIndex);
6797
+ }
6798
+ result += value.slice(lastIndex);
6799
+ return result;
6800
+ }
6801
+ function getLiteralValue(value, token, json5 = false) {
6802
+ switch (token.type) {
6803
+ case "Boolean":
6804
+ return value === "true";
6805
+ case "Number":
6806
+ return Number(value);
6807
+ case "String":
6808
+ return getStringValue(value.slice(1, -1), token, json5);
6809
+ default:
6810
+ throw new TypeError(`Unknown token type "${token.type}.`);
6811
+ }
6812
+ }
6813
+ function parse(text, options) {
6814
+ options = Object.freeze({
6815
+ ...DEFAULT_OPTIONS,
6816
+ ...options
6817
+ });
6818
+ const tokens = tokenize(text, {
6819
+ mode: options.mode,
6820
+ ranges: options.ranges
6821
+ });
6822
+ let tokenIndex = 0;
6823
+ const json5 = options.mode === "json5";
6824
+ function nextNoComments() {
6825
+ return tokens[tokenIndex++];
6826
+ }
6827
+ function nextSkipComments() {
6828
+ const nextToken = tokens[tokenIndex++];
6829
+ if (nextToken && nextToken.type.endsWith("Comment")) {
6830
+ return nextSkipComments();
6831
+ }
6832
+ return nextToken;
6833
+ }
6834
+ const next = options.mode === "json" ? nextNoComments : nextSkipComments;
6835
+ function assertTokenType(token, type) {
6836
+ if (!token || token.type !== type) {
6837
+ throw new UnexpectedToken(token);
6838
+ }
6839
+ }
6840
+ function assertTokenTypes(token, types2) {
6841
+ if (!token || !types2.includes(token.type)) {
6842
+ throw new UnexpectedToken(token);
6843
+ }
6844
+ }
6845
+ function createRange(start, end) {
6846
+ return options.ranges ? {
6847
+ range: [start.offset, end.offset]
6848
+ } : void 0;
6849
+ }
6850
+ function createLiteralNode(token) {
6851
+ const range = createRange(token.loc.start, token.loc.end);
6852
+ const value = getLiteralValue(
6853
+ text.slice(token.loc.start.offset, token.loc.end.offset),
6854
+ token,
6855
+ json5
6856
+ );
6857
+ const loc = {
6858
+ start: {
6859
+ ...token.loc.start
6860
+ },
6861
+ end: {
6862
+ ...token.loc.end
6863
+ }
6864
+ };
6865
+ const parts = { loc, ...range };
6866
+ switch (token.type) {
6867
+ case "String":
6868
+ return types.string(
6869
+ /** @type {string} */
6870
+ value,
6871
+ parts
6872
+ );
6873
+ case "Number":
6874
+ return types.number(
6875
+ /** @type {number} */
6876
+ value,
6877
+ parts
6878
+ );
6879
+ case "Boolean":
6880
+ return types.boolean(
6881
+ /** @type {boolean} */
6882
+ value,
6883
+ parts
6884
+ );
6885
+ default:
6886
+ throw new TypeError(`Unknown token type ${token.type}.`);
6887
+ }
6888
+ }
6889
+ function createJSON5IdentifierNode(token) {
6890
+ const range = createRange(token.loc.start, token.loc.end);
6891
+ const identifier = text.slice(token.loc.start.offset, token.loc.end.offset);
6892
+ const loc = {
6893
+ start: {
6894
+ ...token.loc.start
6895
+ },
6896
+ end: {
6897
+ ...token.loc.end
6898
+ }
6899
+ };
6900
+ const parts = { loc, ...range };
6901
+ if (token.type !== "Identifier") {
6902
+ let sign = "";
6903
+ if (identifier[0] === "+" || identifier[0] === "-") {
6904
+ sign = identifier[0];
6905
+ }
6906
+ return types[identifier.includes("NaN") ? "nan" : "infinity"](
6907
+ /** @type {Sign} */
6908
+ sign,
6909
+ parts
6910
+ );
6911
+ }
6912
+ return types.identifier(identifier, parts);
6913
+ }
6914
+ function createNullNode(token) {
6915
+ const range = createRange(token.loc.start, token.loc.end);
6916
+ return types.null({
6917
+ loc: {
6918
+ start: {
6919
+ ...token.loc.start
6920
+ },
6921
+ end: {
6922
+ ...token.loc.end
6923
+ }
6924
+ },
6925
+ ...range
6926
+ });
6927
+ }
6928
+ function parseProperty(token) {
6929
+ if (json5) {
6930
+ assertTokenTypes(token, ["String", "Identifier", "Number"]);
6931
+ } else {
6932
+ assertTokenType(token, "String");
6933
+ }
6934
+ let key = token.type === "String" ? (
6935
+ /** @type {StringNode} */
6936
+ createLiteralNode(token)
6937
+ ) : (
6938
+ /** @type {IdentifierNode|NaNNode|InfinityNode} */
6939
+ createJSON5IdentifierNode(token)
6940
+ );
6941
+ if (json5 && (key.type === "NaN" || key.type === "Infinity")) {
6942
+ if (key.sign !== "") {
6943
+ throw new UnexpectedToken(token);
6944
+ }
6945
+ key = types.identifier(key.type, { loc: key.loc, ...createRange(key.loc.start, key.loc.end) });
6946
+ }
6947
+ token = next();
6948
+ assertTokenType(token, "Colon");
6949
+ const value = parseValue();
6950
+ const range = createRange(key.loc.start, value.loc.end);
6951
+ return types.member(
6952
+ /** @type {StringNode|IdentifierNode} */
6953
+ key,
6954
+ value,
6955
+ {
6956
+ loc: {
6957
+ start: {
6958
+ ...key.loc.start
6959
+ },
6960
+ end: {
6961
+ ...value.loc.end
6962
+ }
6963
+ },
6964
+ ...range
6965
+ }
6966
+ );
6967
+ }
6968
+ function parseObject(firstToken) {
6969
+ assertTokenType(firstToken, "LBrace");
6970
+ const members = [];
6971
+ let token = next();
6972
+ if (token && token.type !== "RBrace") {
6973
+ do {
6974
+ members.push(parseProperty(token));
6975
+ token = next();
6976
+ if (!token) {
6977
+ throw new UnexpectedEOF(members[members.length - 1].loc.end);
6978
+ }
6979
+ if (token.type === "Comma") {
6980
+ token = next();
6981
+ if (json5 && token.type === "RBrace") {
6982
+ break;
6983
+ }
6984
+ } else {
6985
+ break;
6986
+ }
6987
+ } while (token);
6988
+ }
6989
+ assertTokenType(token, "RBrace");
6990
+ const range = createRange(firstToken.loc.start, token.loc.end);
6991
+ return types.object(members, {
6992
+ loc: {
6993
+ start: {
6994
+ ...firstToken.loc.start
6995
+ },
6996
+ end: {
6997
+ ...token.loc.end
6998
+ }
6999
+ },
7000
+ ...range
7001
+ });
7002
+ }
7003
+ function parseArray(firstToken) {
7004
+ assertTokenType(firstToken, "LBracket");
7005
+ const elements = [];
7006
+ let token = next();
7007
+ if (token && token.type !== "RBracket") {
7008
+ do {
7009
+ const value = parseValue(token);
7010
+ elements.push(types.element(
7011
+ value,
7012
+ { loc: value.loc }
7013
+ ));
7014
+ token = next();
7015
+ if (token.type === "Comma") {
7016
+ token = next();
7017
+ if (json5 && token.type === "RBracket") {
7018
+ break;
7019
+ }
7020
+ } else {
7021
+ break;
7022
+ }
7023
+ } while (token);
7024
+ }
7025
+ assertTokenType(token, "RBracket");
7026
+ const range = createRange(firstToken.loc.start, token.loc.end);
7027
+ return types.array(elements, {
7028
+ loc: {
7029
+ start: {
7030
+ ...firstToken.loc.start
7031
+ },
7032
+ end: {
7033
+ ...token.loc.end
7034
+ }
7035
+ },
7036
+ ...range
7037
+ });
7038
+ }
7039
+ function parseValue(token) {
7040
+ token = token || next();
7041
+ switch (token.type) {
7042
+ case "String":
7043
+ case "Boolean":
7044
+ return createLiteralNode(token);
7045
+ case "Number":
7046
+ if (json5) {
7047
+ let tokenText = text.slice(token.loc.start.offset, token.loc.end.offset);
7048
+ if (tokenText[0] === "+" || tokenText[0] === "-") {
7049
+ tokenText = tokenText.slice(1);
7050
+ }
7051
+ if (tokenText === "NaN" || tokenText === "Infinity") {
7052
+ return createJSON5IdentifierNode(token);
7053
+ }
7054
+ }
7055
+ return createLiteralNode(token);
7056
+ case "Null":
7057
+ return createNullNode(token);
7058
+ case "LBrace":
7059
+ return parseObject(token);
7060
+ case "LBracket":
7061
+ return parseArray(token);
7062
+ default:
7063
+ throw new UnexpectedToken(token);
7064
+ }
7065
+ }
7066
+ const docBody = parseValue();
7067
+ const unexpectedToken = next();
7068
+ if (unexpectedToken) {
7069
+ throw new UnexpectedToken(unexpectedToken);
7070
+ }
7071
+ const docParts = {
7072
+ loc: {
7073
+ start: {
7074
+ line: 1,
7075
+ column: 1,
7076
+ offset: 0
7077
+ },
7078
+ end: {
7079
+ ...docBody.loc.end
7080
+ }
7081
+ }
7082
+ };
7083
+ if (options.tokens) {
7084
+ docParts.tokens = tokens;
7085
+ }
7086
+ if (options.ranges) {
7087
+ docParts.range = [
7088
+ docParts.loc.start.offset,
7089
+ docParts.loc.end.offset
7090
+ ];
7091
+ }
7092
+ return types.document(docBody, docParts);
7093
+ }
7094
+
7095
+ // src/index.ts
7096
+ var import_argparse = __toESM(require_argparse(), 1);
7097
+
5886
7098
  // node_modules/find-up/index.js
5887
7099
  import path2 from "path";
5888
7100
 
@@ -7492,7 +8704,7 @@ var Minipass = class extends EventEmitter {
7492
8704
  var writev = fs2.writev;
7493
8705
  var _autoClose = Symbol("_autoClose");
7494
8706
  var _close = Symbol("_close");
7495
- var _ended = Symbol("_ended");
8707
+ var _ended2 = Symbol("_ended");
7496
8708
  var _fd = Symbol("_fd");
7497
8709
  var _finished = Symbol("_finished");
7498
8710
  var _flags = Symbol("_flags");
@@ -7689,7 +8901,7 @@ var WriteStream = class extends EE {
7689
8901
  writable = true;
7690
8902
  [_errored] = false;
7691
8903
  [_writing] = false;
7692
- [_ended] = false;
8904
+ [_ended2] = false;
7693
8905
  [_queue] = [];
7694
8906
  [_needDrain] = false;
7695
8907
  [_path];
@@ -7756,7 +8968,7 @@ var WriteStream = class extends EE {
7756
8968
  if (buf) {
7757
8969
  this.write(buf, enc);
7758
8970
  }
7759
- this[_ended] = true;
8971
+ this[_ended2] = true;
7760
8972
  if (!this[_writing] && !this[_queue].length && typeof this[_fd] === "number") {
7761
8973
  this[_onwrite](null, 0);
7762
8974
  }
@@ -7766,7 +8978,7 @@ var WriteStream = class extends EE {
7766
8978
  if (typeof buf === "string") {
7767
8979
  buf = Buffer.from(buf, enc);
7768
8980
  }
7769
- if (this[_ended]) {
8981
+ if (this[_ended2]) {
7770
8982
  this.emit("error", new Error("write() after end()"));
7771
8983
  return false;
7772
8984
  }
@@ -7793,7 +9005,7 @@ var WriteStream = class extends EE {
7793
9005
  this[_flush]();
7794
9006
  } else {
7795
9007
  this[_writing] = false;
7796
- if (this[_ended] && !this[_finished]) {
9008
+ if (this[_ended2] && !this[_finished]) {
7797
9009
  this[_finished] = true;
7798
9010
  this[_close]();
7799
9011
  this.emit("finish");
@@ -7806,7 +9018,7 @@ var WriteStream = class extends EE {
7806
9018
  }
7807
9019
  [_flush]() {
7808
9020
  if (this[_queue].length === 0) {
7809
- if (this[_ended]) {
9021
+ if (this[_ended2]) {
7810
9022
  this[_onwrite](null, 0);
7811
9023
  }
7812
9024
  } else if (this[_queue].length === 1) {
@@ -7873,7 +9085,7 @@ import path5 from "path";
7873
9085
 
7874
9086
  // node_modules/tar/dist/esm/list.js
7875
9087
  import fs3 from "fs";
7876
- import { dirname, parse as parse2 } from "path";
9088
+ import { dirname, parse as parse3 } from "path";
7877
9089
 
7878
9090
  // node_modules/tar/dist/esm/options.js
7879
9091
  var argmap = /* @__PURE__ */ new Map([
@@ -8113,7 +9325,7 @@ var ZlibError = class extends Error {
8113
9325
  }
8114
9326
  };
8115
9327
  var _flushFlag = Symbol("flushFlag");
8116
- var _sawError, _ended2, _flushFlag2, _finishFlushFlag, _fullFlushFlag, _handle, _onError;
9328
+ var _sawError, _ended3, _flushFlag2, _finishFlushFlag, _fullFlushFlag, _handle, _onError;
8117
9329
  var ZlibBase = class extends Minipass {
8118
9330
  /* c8 ignore stop */
8119
9331
  constructor(opts, mode) {
@@ -8122,7 +9334,7 @@ var ZlibBase = class extends Minipass {
8122
9334
  throw new TypeError("invalid options for ZlibBase constructor");
8123
9335
  super(opts);
8124
9336
  __privateAdd(this, _sawError, false);
8125
- __privateAdd(this, _ended2, false);
9337
+ __privateAdd(this, _ended3, false);
8126
9338
  __privateAdd(this, _flushFlag2);
8127
9339
  __privateAdd(this, _finishFlushFlag);
8128
9340
  __privateAdd(this, _fullFlushFlag);
@@ -8194,11 +9406,11 @@ var ZlibBase = class extends Minipass {
8194
9406
  this.write(chunk);
8195
9407
  }
8196
9408
  this.flush(__privateGet(this, _finishFlushFlag));
8197
- __privateSet(this, _ended2, true);
9409
+ __privateSet(this, _ended3, true);
8198
9410
  return super.end(cb);
8199
9411
  }
8200
9412
  get ended() {
8201
- return __privateGet(this, _ended2);
9413
+ return __privateGet(this, _ended3);
8202
9414
  }
8203
9415
  // overridden in the gzip classes to do portable writes
8204
9416
  [_superWrite](data) {
@@ -8257,7 +9469,7 @@ var ZlibBase = class extends Minipass {
8257
9469
  }
8258
9470
  };
8259
9471
  _sawError = new WeakMap();
8260
- _ended2 = new WeakMap();
9472
+ _ended3 = new WeakMap();
8261
9473
  _flushFlag2 = new WeakMap();
8262
9474
  _finishFlushFlag = new WeakMap();
8263
9475
  _fullFlushFlag = new WeakMap();
@@ -8758,7 +9970,7 @@ var encodeNegative = (num, buf) => {
8758
9970
  }
8759
9971
  }
8760
9972
  };
8761
- var parse = (buf) => {
9973
+ var parse2 = (buf) => {
8762
9974
  const pre = buf[0];
8763
9975
  const value = pre === 128 ? pos(buf.subarray(1, buf.length)) : pre === 255 ? twos(buf) : null;
8764
9976
  if (value === null) {
@@ -9039,7 +10251,7 @@ var splitPrefix = (p, prefixSize) => {
9039
10251
  var decString = (buf, off, size) => buf.subarray(off, off + size).toString("utf8").replace(/\0.*/, "");
9040
10252
  var decDate = (buf, off, size) => numToDate(decNumber(buf, off, size));
9041
10253
  var numToDate = (num) => num === void 0 ? void 0 : new Date(num * 1e3);
9042
- var decNumber = (buf, off, size) => Number(buf[off]) & 128 ? parse(buf.subarray(off, off + size)) : decSmallNumber(buf, off, size);
10254
+ var decNumber = (buf, off, size) => Number(buf[off]) & 128 ? parse2(buf.subarray(off, off + size)) : decSmallNumber(buf, off, size);
9043
10255
  var nanUndef = (value) => isNaN(value) ? void 0 : value;
9044
10256
  var decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf.subarray(off, off + size).toString("utf8").replace(/\0.*$/, "").trim(), 8));
9045
10257
  var MAXNUM = {
@@ -9816,7 +11028,7 @@ var filesFilter = (opt, files) => {
9816
11028
  const map = new Map(files.map((f) => [stripTrailingSlashes(f), true]));
9817
11029
  const filter = opt.filter;
9818
11030
  const mapHas = (file, r = "") => {
9819
- const root = r || parse2(file).root || ".";
11031
+ const root = r || parse3(file).root || ".";
9820
11032
  let ret;
9821
11033
  if (file === root)
9822
11034
  ret = false;
@@ -9863,12 +11075,12 @@ var listFileSync = (opt) => {
9863
11075
  }
9864
11076
  };
9865
11077
  var listFile = (opt, _files) => {
9866
- const parse5 = new Parser(opt);
11078
+ const parse6 = new Parser(opt);
9867
11079
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
9868
11080
  const file = opt.file;
9869
11081
  const p = new Promise((resolve2, reject) => {
9870
- parse5.on("error", reject);
9871
- parse5.on("end", resolve2);
11082
+ parse6.on("error", reject);
11083
+ parse6.on("end", resolve2);
9872
11084
  fs3.stat(file, (er, stat2) => {
9873
11085
  if (er) {
9874
11086
  reject(er);
@@ -9878,7 +11090,7 @@ var listFile = (opt, _files) => {
9878
11090
  size: stat2.size
9879
11091
  });
9880
11092
  stream.on("error", reject);
9881
- stream.pipe(parse5);
11093
+ stream.pipe(parse6);
9882
11094
  }
9883
11095
  });
9884
11096
  });
@@ -9920,15 +11132,15 @@ var modeFix = (mode, isDir, portable) => {
9920
11132
 
9921
11133
  // node_modules/tar/dist/esm/strip-absolute-path.js
9922
11134
  import { win32 } from "path";
9923
- var { isAbsolute, parse: parse3 } = win32;
11135
+ var { isAbsolute, parse: parse4 } = win32;
9924
11136
  var stripAbsolutePath = (path17) => {
9925
11137
  let r = "";
9926
- let parsed = parse3(path17);
11138
+ let parsed = parse4(path17);
9927
11139
  while (isAbsolute(path17) || parsed.root) {
9928
11140
  const root = path17.charAt(0) === "/" && path17.slice(0, 4) !== "//?/" ? "/" : parsed.root;
9929
11141
  path17 = path17.slice(root.length);
9930
11142
  r += root;
9931
- parsed = parse3(path17);
11143
+ parsed = parse4(path17);
9932
11144
  }
9933
11145
  return [r, path17];
9934
11146
  };
@@ -11264,7 +12476,7 @@ var mkdirpNative = Object.assign(async (path17, options) => {
11264
12476
  }, { sync: mkdirpNativeSync });
11265
12477
 
11266
12478
  // node_modules/tar/node_modules/mkdirp/dist/mjs/path-arg.js
11267
- import { parse as parse4, resolve } from "path";
12479
+ import { parse as parse5, resolve } from "path";
11268
12480
  var platform3 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
11269
12481
  var pathArg = (path17) => {
11270
12482
  if (/\0/.test(path17)) {
@@ -11276,7 +12488,7 @@ var pathArg = (path17) => {
11276
12488
  path17 = resolve(path17);
11277
12489
  if (platform3 === "win32") {
11278
12490
  const badWinChars = /[*|"<>?:]/;
11279
- const { root } = parse4(path17);
12491
+ const { root } = parse5(path17);
11280
12492
  if (badWinChars.test(path17.substring(root.length))) {
11281
12493
  throw Object.assign(new Error("Illegal characters in path."), {
11282
12494
  path: path17,
@@ -12804,14 +14016,14 @@ function isEmpty(value) {
12804
14016
  }
12805
14017
  function nonempty(key, value) {
12806
14018
  if (isEmpty(value)) {
12807
- throw new Error(`"${key}" must not be empty`);
14019
+ throw new ValidationError(nonempty.name, `"${key}" must not be empty`);
12808
14020
  }
12809
14021
  if (typeof value === "number") {
12810
14022
  return;
12811
14023
  }
12812
14024
  if (Array.isArray(value)) {
12813
14025
  if (value.length === 0) {
12814
- throw new Error(`"${key}" must not be empty`);
14026
+ throw new ValidationError(nonempty.name, `"${key}" must not be empty`);
12815
14027
  }
12816
14028
  for (const index in value) {
12817
14029
  nonempty(`${key}[${index}]`, value[index]);
@@ -12821,7 +14033,7 @@ function nonempty(key, value) {
12821
14033
  if (value && typeof value === "object") {
12822
14034
  const values = Object.values(value);
12823
14035
  if (values.length === 0) {
12824
- throw new Error(`"${key}" must not be empty`);
14036
+ throw new ValidationError(nonempty.name, `"${key}" must not be empty`);
12825
14037
  }
12826
14038
  }
12827
14039
  }
@@ -12836,11 +14048,11 @@ function present(key, value) {
12836
14048
  // src/validators/type-array.ts
12837
14049
  function typeArray(key, value) {
12838
14050
  if (!Array.isArray(value)) {
12839
- throw new Error(`"${key}" must be array`);
14051
+ throw new ValidationError(typeArray.name, `"${key}" must be array`);
12840
14052
  }
12841
14053
  for (const index in value) {
12842
14054
  if (typeof value[index] !== "string") {
12843
- throw new Error(`"${key}[${index}]" must be string`);
14055
+ throw new ValidationError(typeArray.name, `"${key}[${index}]" must be string`);
12844
14056
  }
12845
14057
  }
12846
14058
  }
@@ -12848,46 +14060,53 @@ function typeArray(key, value) {
12848
14060
  // src/validators/type-string.ts
12849
14061
  function typeString(key, value) {
12850
14062
  if (typeof value !== "string") {
12851
- throw new Error(`"${key}" must be string`);
14063
+ throw new ValidationError(typeString.name, `"${key}" must be string`);
12852
14064
  }
12853
14065
  }
12854
14066
 
12855
14067
  // src/validators/valid-repo-url.ts
12856
14068
  function validateType(key, value) {
12857
14069
  if (typeof value !== "string") {
12858
- throw new Error(`"${key}.type" must be a string`);
14070
+ throw new ValidationError(validRepoUrl.name, `"${key}.type" must be a string`);
12859
14071
  }
12860
14072
  if (value !== "git") {
12861
- throw new Error(`"${key}.type" must be "git"`);
14073
+ throw new ValidationError(validRepoUrl.name, `"${key}.type" must be "git"`);
12862
14074
  }
12863
14075
  }
12864
14076
  function validateUrl(key, value) {
12865
14077
  if (typeof value !== "string") {
12866
- throw new Error(`"${key}.url" must be a string`);
14078
+ throw new ValidationError(validRepoUrl.name, `"${key}.url" must be a string`);
12867
14079
  }
12868
14080
  if (value.trim() === "") {
12869
- throw new Error(`"${key}.url" must not be empty`);
14081
+ throw new ValidationError(validRepoUrl.name, `"${key}.url" must not be empty`);
12870
14082
  }
12871
14083
  if (value !== value.trim()) {
12872
- throw new Error(`"${key}.url" must not have leading or trailing whitespace`);
14084
+ throw new ValidationError(
14085
+ validRepoUrl.name,
14086
+ `"${key}.url" must not have leading or trailing whitespace`
14087
+ );
12873
14088
  }
12874
14089
  const url = new URL(value);
12875
14090
  if (url.protocol === "git+http:" || url.protocol === "http:") {
12876
- throw new Error(`"${key}.url" must use "git+https://" instead of "http://"`);
14091
+ throw new ValidationError(
14092
+ validRepoUrl.name,
14093
+ `"${key}.url" must use "git+https://" instead of "http://"`
14094
+ );
12877
14095
  }
12878
14096
  if (url.protocol !== "git+https:") {
12879
- throw new Error(`"${key}.url" must use "git+https://" protocol`);
14097
+ throw new ValidationError(validRepoUrl.name, `"${key}.url" must use "git+https://" protocol`);
12880
14098
  }
12881
14099
  if (url.host === "") {
12882
- throw new Error(`"${key}.url" be a valid url`);
14100
+ throw new ValidationError(validRepoUrl.name, `"${key}.url" be a valid url`);
12883
14101
  }
12884
14102
  }
12885
14103
  function validateDirectory(key, value) {
12886
14104
  if (typeof value !== "string") {
12887
- throw new Error(`"${key}.directory" must be a string`);
14105
+ throw new ValidationError(validRepoUrl.name, `"${key}.directory" must be a string`);
12888
14106
  }
12889
14107
  if (value.trim() === "") {
12890
- throw new Error(
14108
+ throw new ValidationError(
14109
+ validRepoUrl.name,
12891
14110
  `"${key}.directory" must be set to non-empty string or the property must be removed`
12892
14111
  );
12893
14112
  }
@@ -12897,17 +14116,20 @@ function validRepoUrl(key, value) {
12897
14116
  return;
12898
14117
  }
12899
14118
  if (typeof value !== "object" || value === null) {
12900
- throw new Error(`"${key}" must be an object with "type" and "url"`);
14119
+ throw new ValidationError(
14120
+ validRepoUrl.name,
14121
+ `"${key}" must be an object with "type" and "url"`
14122
+ );
12901
14123
  }
12902
14124
  if ("type" in value) {
12903
14125
  validateType(key, value.type);
12904
14126
  } else {
12905
- throw new Error(`"${key}" is missing required "type" property`);
14127
+ throw new ValidationError(validRepoUrl.name, `"${key}" is missing required "type" property`);
12906
14128
  }
12907
14129
  if ("url" in value) {
12908
14130
  validateUrl(key, value.url);
12909
14131
  } else {
12910
- throw new Error(`"${key}" is missing required "url" property`);
14132
+ throw new ValidationError(validRepoUrl.name, `"${key}" is missing required "url" property`);
12911
14133
  }
12912
14134
  if ("directory" in value) {
12913
14135
  validateDirectory(key, value.directory);
@@ -12921,13 +14143,49 @@ function validUrl(key, value) {
12921
14143
  } else if (value == null ? void 0 : value.url) {
12922
14144
  validUrl(`${key}.url`, value.url);
12923
14145
  } else {
12924
- throw new Error(`"${key}" must be a valid url (https only)`);
14146
+ throw new ValidationError(validUrl.name, `"${key}" must be a valid url (https only)`);
12925
14147
  }
12926
14148
  }
12927
14149
 
12928
14150
  // src/rules/deprecated-dependency.ts
12929
14151
  var import_semver = __toESM(require_semver2(), 1);
12930
14152
 
14153
+ // src/utils/json-location.ts
14154
+ function findNextNode(current, segment, datapath) {
14155
+ const { value } = current;
14156
+ switch (value.type) {
14157
+ case "Object": {
14158
+ const found = value.members.find((it) => {
14159
+ return it.name.type === "String" && it.name.value === segment;
14160
+ });
14161
+ if (!found) {
14162
+ throw new Error(`Failed to find "${datapath.join(".")}" in JSON structure`);
14163
+ }
14164
+ return { value: found.value, member: found };
14165
+ }
14166
+ default: {
14167
+ throw new Error(
14168
+ `Dont know how to handle node type "${value.type}" when searching for "${datapath.join(
14169
+ "."
14170
+ )}" in JSON structure`
14171
+ );
14172
+ }
14173
+ }
14174
+ }
14175
+ function jsonLocation(ast, pick, ...datapath) {
14176
+ var _a;
14177
+ const result = datapath.reduce(
14178
+ (state, segment) => findNextNode(state, segment, datapath),
14179
+ { value: ast.body }
14180
+ );
14181
+ switch (pick) {
14182
+ case "member":
14183
+ return ((_a = result.member) == null ? void 0 : _a.loc.start) ?? { line: 1, column: 1 };
14184
+ case "value":
14185
+ return result.value.loc.start;
14186
+ }
14187
+ }
14188
+
12931
14189
  // node_modules/is-plain-obj/index.js
12932
14190
  function isPlainObject(value) {
12933
14191
  if (typeof value !== "object" || value === null) {
@@ -13187,9 +14445,9 @@ var parseFd = (fdName) => {
13187
14445
  }
13188
14446
  };
13189
14447
  var FD_REGEXP = /^fd(\d+)$/;
13190
- var addDefaultValue = (optionArray, optionName) => optionArray.map((optionValue) => optionValue === void 0 ? DEFAULT_OPTIONS[optionName] : optionValue);
14448
+ var addDefaultValue = (optionArray, optionName) => optionArray.map((optionValue) => optionValue === void 0 ? DEFAULT_OPTIONS2[optionName] : optionValue);
13191
14449
  var verboseDefault = debuglog("execa").enabled ? "full" : "none";
13192
- var DEFAULT_OPTIONS = {
14450
+ var DEFAULT_OPTIONS2 = {
13193
14451
  lines: false,
13194
14452
  buffer: true,
13195
14453
  maxBuffer: 1e3 * 1e3 * 100,
@@ -17801,12 +19059,12 @@ var getHighWaterMark = (streams, objectMode) => {
17801
19059
  const highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark);
17802
19060
  return Math.max(...highWaterMarks);
17803
19061
  };
17804
- var _streams, _ended3, _aborted, _onFinished, _unpipeEvent, _streamPromises;
19062
+ var _streams, _ended4, _aborted, _onFinished, _unpipeEvent, _streamPromises;
17805
19063
  var MergedStream = class extends PassThroughStream {
17806
19064
  constructor() {
17807
19065
  super(...arguments);
17808
19066
  __privateAdd(this, _streams, /* @__PURE__ */ new Set([]));
17809
- __privateAdd(this, _ended3, /* @__PURE__ */ new Set([]));
19067
+ __privateAdd(this, _ended4, /* @__PURE__ */ new Set([]));
17810
19068
  __privateAdd(this, _aborted, /* @__PURE__ */ new Set([]));
17811
19069
  __privateAdd(this, _onFinished);
17812
19070
  __privateAdd(this, _unpipeEvent, Symbol("unpipe"));
@@ -17823,7 +19081,7 @@ var MergedStream = class extends PassThroughStream {
17823
19081
  passThroughStream: this,
17824
19082
  stream,
17825
19083
  streams: __privateGet(this, _streams),
17826
- ended: __privateGet(this, _ended3),
19084
+ ended: __privateGet(this, _ended4),
17827
19085
  aborted: __privateGet(this, _aborted),
17828
19086
  onFinished: __privateGet(this, _onFinished),
17829
19087
  unpipeEvent: __privateGet(this, _unpipeEvent)
@@ -17847,7 +19105,7 @@ var MergedStream = class extends PassThroughStream {
17847
19105
  }
17848
19106
  };
17849
19107
  _streams = new WeakMap();
17850
- _ended3 = new WeakMap();
19108
+ _ended4 = new WeakMap();
17851
19109
  _aborted = new WeakMap();
17852
19110
  _onFinished = new WeakMap();
17853
19111
  _unpipeEvent = new WeakMap();
@@ -19830,7 +21088,7 @@ function* getDependencies(pkg) {
19830
21088
  }
19831
21089
  }
19832
21090
  }
19833
- async function deprecatedDependency(pkg, options) {
21091
+ async function deprecatedDependency(pkg, pkgAst, options) {
19834
21092
  const { allowedDependencies: allowedDependencies2 } = options;
19835
21093
  const messages = [];
19836
21094
  for await (const dependency of getDependencies(pkg)) {
@@ -19842,24 +21100,26 @@ async function deprecatedDependency(pkg, options) {
19842
21100
  if (!deprecated) {
19843
21101
  continue;
19844
21102
  }
21103
+ const { line, column } = jsonLocation(pkgAst, "member", dependency.source, dependency.name);
19845
21104
  messages.push({
19846
21105
  ruleId: ruleId2,
19847
21106
  severity: 2,
19848
21107
  message: `"${dependency.spec}" is deprecated and must not be used`,
19849
- line: 1,
19850
- column: 1
21108
+ line,
21109
+ column
19851
21110
  });
19852
21111
  } catch (err) {
19853
21112
  if (isNpmInfoError(err) && err.code === "E404") {
19854
21113
  if (dependency.source === "devDependencies") {
19855
21114
  continue;
19856
21115
  }
21116
+ const { line, column } = jsonLocation(pkgAst, "member", dependency.source, dependency.name);
19857
21117
  messages.push({
19858
21118
  ruleId: ruleId2,
19859
21119
  severity: 1,
19860
- message: `the dependency "${dependency.spec}" is not published to the NPM registry`,
19861
- line: 1,
19862
- column: 1
21120
+ message: `"${dependency.spec}" is not published to the NPM registry`,
21121
+ line,
21122
+ column
19863
21123
  });
19864
21124
  continue;
19865
21125
  }
@@ -19965,7 +21225,7 @@ function isObsoleteDependency(dependency) {
19965
21225
  // src/rules/exports-types-order.ts
19966
21226
  var ruleId3 = "exports-types-order";
19967
21227
  var severity = Severity.ERROR;
19968
- function* validateOrder(value, path17) {
21228
+ function* validateOrder(pkgAst, value, path17) {
19969
21229
  if (!value || typeof value === "string") {
19970
21230
  return;
19971
21231
  }
@@ -19974,22 +21234,23 @@ function* validateOrder(value, path17) {
19974
21234
  return;
19975
21235
  }
19976
21236
  if (keys.includes("types") && keys[0] !== "types") {
21237
+ const { line, column } = jsonLocation(pkgAst, "member", "exports", ...path17, "types");
19977
21238
  const property = path17.map((it) => `["${it}"]`).join("");
19978
21239
  yield {
19979
21240
  ruleId: ruleId3,
19980
21241
  severity,
19981
21242
  message: `"types" must be the first condition in "exports${property}"`,
19982
- line: 1,
19983
- column: 1
21243
+ line,
21244
+ column
19984
21245
  };
19985
21246
  }
19986
21247
  for (const key of keys) {
19987
- yield* validateOrder(value[key], [...path17, key]);
21248
+ yield* validateOrder(pkgAst, value[key], [...path17, key]);
19988
21249
  }
19989
21250
  }
19990
- function* exportsTypesOrder(pkg) {
21251
+ function* exportsTypesOrder(pkg, pkgAst) {
19991
21252
  if (pkg.exports) {
19992
- yield* validateOrder(pkg.exports, []);
21253
+ yield* validateOrder(pkgAst, pkg.exports, []);
19993
21254
  }
19994
21255
  }
19995
21256
 
@@ -20024,26 +21285,28 @@ var nodeVersions = [
20024
21285
  // src/rules/outdated-engines.ts
20025
21286
  var ruleId4 = "outdated-engines";
20026
21287
  var severity2 = Severity.ERROR;
20027
- function* outdatedEngines(pkg, ignoreNodeVersion) {
21288
+ function* outdatedEngines(pkg, pkgAst, ignoreNodeVersion) {
20028
21289
  var _a;
20029
21290
  if (!((_a = pkg.engines) == null ? void 0 : _a.node)) {
21291
+ const { line: line2, column: column2 } = pkg.engines ? jsonLocation(pkgAst, "member", "engines") : { line: 1, column: 1 };
20030
21292
  yield {
20031
21293
  ruleId: ruleId4,
20032
21294
  severity: severity2,
20033
21295
  message: "Missing engines.node field",
20034
- line: 1,
20035
- column: 1
21296
+ line: line2,
21297
+ column: column2
20036
21298
  };
20037
21299
  return;
20038
21300
  }
21301
+ const { line, column } = jsonLocation(pkgAst, "value", "engines", "node");
20039
21302
  const range = pkg.engines.node;
20040
21303
  if (!import_semver2.default.validRange(range)) {
20041
21304
  yield {
20042
21305
  ruleId: ruleId4,
20043
21306
  severity: severity2,
20044
21307
  message: `engines.node "${range}" is not a valid semver range`,
20045
- line: 1,
20046
- column: 1
21308
+ line,
21309
+ column
20047
21310
  };
20048
21311
  return;
20049
21312
  }
@@ -20069,8 +21332,8 @@ function* outdatedEngines(pkg, ignoreNodeVersion) {
20069
21332
  ruleId: ruleId4,
20070
21333
  severity: severity2,
20071
21334
  message,
20072
- line: 1,
20073
- column: 1
21335
+ line,
21336
+ column
20074
21337
  };
20075
21338
  return;
20076
21339
  }
@@ -20082,8 +21345,8 @@ function* outdatedEngines(pkg, ignoreNodeVersion) {
20082
21345
  ruleId: ruleId4,
20083
21346
  severity: severity2,
20084
21347
  message,
20085
- line: 1,
20086
- column: 1
21348
+ line,
21349
+ column
20087
21350
  };
20088
21351
  }
20089
21352
  }
@@ -20175,38 +21438,37 @@ async function verifyEngineConstraint(pkg) {
20175
21438
  var import_semver4 = __toESM(require_semver2(), 1);
20176
21439
  var ruleId6 = "types-node-matching-engine";
20177
21440
  var severity3 = Severity.ERROR;
20178
- function* typesNodeMatchingEngine(pkg) {
21441
+ function* typesNodeMatchingEngine(pkg, pkgAst) {
20179
21442
  var _a;
20180
21443
  if (!((_a = pkg.engines) == null ? void 0 : _a.node)) {
20181
21444
  return;
20182
21445
  }
20183
- const mergedDependencies = {
20184
- ...pkg.dependencies,
20185
- ...pkg.devDependencies,
20186
- ...pkg.peerDependencies
20187
- };
20188
- if (!mergedDependencies["@types/node"]) {
20189
- return;
20190
- }
20191
- const declaredVersion = mergedDependencies["@types/node"];
20192
- if (declaredVersion === "latest") {
20193
- return;
20194
- }
20195
- const nodeVersion = import_semver4.default.minVersion(pkg.engines.node);
20196
- const typesVersion = import_semver4.default.minVersion(declaredVersion);
20197
- if (!nodeVersion || !typesVersion) {
20198
- return;
20199
- }
20200
- if (typesVersion.major !== nodeVersion.major) {
20201
- const actualVersion = `v${String(typesVersion.major)}`;
20202
- const expectedVersion = `v${String(nodeVersion.major)}`;
20203
- yield {
20204
- ruleId: ruleId6,
20205
- severity: severity3,
20206
- message: `@types/node ${actualVersion} does not equal engines.node ${expectedVersion}`,
20207
- line: 1,
20208
- column: 1
20209
- };
21446
+ for (const source of ["dependencies", "devDependencies", "peerDependencies"]) {
21447
+ const dependencies = pkg[source] ?? {};
21448
+ if (!dependencies["@types/node"]) {
21449
+ continue;
21450
+ }
21451
+ const declaredVersion = dependencies["@types/node"];
21452
+ if (declaredVersion === "latest") {
21453
+ continue;
21454
+ }
21455
+ const nodeVersion = import_semver4.default.minVersion(pkg.engines.node);
21456
+ const typesVersion = import_semver4.default.minVersion(declaredVersion);
21457
+ if (!nodeVersion || !typesVersion) {
21458
+ continue;
21459
+ }
21460
+ if (typesVersion.major !== nodeVersion.major) {
21461
+ const { line, column } = jsonLocation(pkgAst, "value", source, "@types/node");
21462
+ const actualVersion = `v${String(typesVersion.major)}`;
21463
+ const expectedVersion = `v${String(nodeVersion.major)}`;
21464
+ yield {
21465
+ ruleId: ruleId6,
21466
+ severity: severity3,
21467
+ message: `@types/node ${actualVersion} does not equal engines.node ${expectedVersion}`,
21468
+ line,
21469
+ column
21470
+ };
21471
+ }
20210
21472
  }
20211
21473
  }
20212
21474
 
@@ -20220,7 +21482,7 @@ var fields = {
20220
21482
  author: [present, nonempty],
20221
21483
  repository: [present, validRepoUrl]
20222
21484
  };
20223
- function verifyFields(pkg, options) {
21485
+ function verifyFields(pkg, pkgAst, options) {
20224
21486
  const messages = [];
20225
21487
  for (const [field, validators] of Object.entries(fields)) {
20226
21488
  try {
@@ -20228,19 +21490,21 @@ function verifyFields(pkg, options) {
20228
21490
  validator(field, pkg[field]);
20229
21491
  }
20230
21492
  } catch (error) {
20231
- if (error instanceof ValidationError && error.validator === present.name && options.ignoreMissingFields) {
21493
+ if (!(error instanceof ValidationError)) {
21494
+ throw error;
21495
+ }
21496
+ if (error.validator === present.name && options.ignoreMissingFields) {
20232
21497
  continue;
20233
21498
  }
21499
+ const { line, column } = error.validator !== present.name ? jsonLocation(pkgAst, "value", field) : { line: 1, column: 1 };
20234
21500
  if (error instanceof Error) {
20235
21501
  messages.push({
20236
21502
  ruleId: "package-json-fields",
20237
21503
  severity: 2,
20238
21504
  message: error.message,
20239
- line: 1,
20240
- column: 1
21505
+ line,
21506
+ column
20241
21507
  });
20242
- } else {
20243
- throw error;
20244
21508
  }
20245
21509
  }
20246
21510
  }
@@ -20253,10 +21517,9 @@ function getActualDependency(key, version3) {
20253
21517
  }
20254
21518
  return key;
20255
21519
  }
20256
- function verifyDependencies(pkg, options) {
21520
+ function verifyDependencies(pkg, pkgAst, options) {
20257
21521
  const messages = [];
20258
21522
  const { dependencies = {}, devDependencies = {}, peerDependencies = {} } = pkg;
20259
- const allDependencies = { ...dependencies, ...devDependencies, ...peerDependencies };
20260
21523
  for (const [key, version3] of Object.entries(dependencies)) {
20261
21524
  const dependency = getActualDependency(key, version3);
20262
21525
  if (options.allowedDependencies.has(dependency)) {
@@ -20266,40 +21529,51 @@ function verifyDependencies(pkg, options) {
20266
21529
  continue;
20267
21530
  }
20268
21531
  if (isDisallowedDependency(pkg, dependency)) {
21532
+ const { line, column } = jsonLocation(pkgAst, "member", "dependencies", key);
20269
21533
  const name2 = key === dependency ? dependency : `"${key}" ("npm:${dependency}")`;
20270
21534
  messages.push({
20271
21535
  ruleId: "disallowed-dependency",
20272
21536
  severity: 2,
20273
21537
  message: `"${name2}" should be a devDependency`,
20274
- line: 1,
20275
- column: 1
21538
+ line,
21539
+ column
20276
21540
  });
20277
21541
  }
20278
21542
  }
20279
- for (const dependency of Object.keys(allDependencies)) {
21543
+ function verifyObsolete(dependency, source) {
20280
21544
  const obsolete2 = isObsoleteDependency(dependency);
20281
21545
  if (obsolete2) {
21546
+ const { line, column } = jsonLocation(pkgAst, "member", source, dependency);
20282
21547
  messages.push({
20283
21548
  ruleId: "obsolete-dependency",
20284
21549
  severity: 2,
20285
21550
  message: `"${dependency}" is obsolete and should no longer be used: ${obsolete2.message}`,
20286
- line: 1,
20287
- column: 1
21551
+ line,
21552
+ column
20288
21553
  });
20289
21554
  }
20290
21555
  }
21556
+ for (const dependency of Object.keys(dependencies)) {
21557
+ verifyObsolete(dependency, "dependencies");
21558
+ }
21559
+ for (const dependency of Object.keys(devDependencies)) {
21560
+ verifyObsolete(dependency, "devDependencies");
21561
+ }
21562
+ for (const dependency of Object.keys(peerDependencies)) {
21563
+ verifyObsolete(dependency, "peerDependencies");
21564
+ }
20291
21565
  return messages;
20292
21566
  }
20293
- async function verifyPackageJson(pkg, filePath, options = { allowedDependencies: /* @__PURE__ */ new Set(), ignoreNodeVersion: false }) {
21567
+ async function verifyPackageJson(pkg, pkgAst, filePath, options = { allowedDependencies: /* @__PURE__ */ new Set(), ignoreNodeVersion: false }) {
20294
21568
  const { ignoreNodeVersion } = options;
20295
21569
  const messages = [
20296
- ...await deprecatedDependency(pkg, options),
21570
+ ...await deprecatedDependency(pkg, pkgAst, options),
20297
21571
  ...await verifyEngineConstraint(pkg),
20298
- ...exportsTypesOrder(pkg),
20299
- ...verifyFields(pkg, options),
20300
- ...verifyDependencies(pkg, options),
20301
- ...outdatedEngines(pkg, ignoreNodeVersion),
20302
- ...typesNodeMatchingEngine(pkg)
21572
+ ...exportsTypesOrder(pkg, pkgAst),
21573
+ ...verifyFields(pkg, pkgAst, options),
21574
+ ...verifyDependencies(pkg, pkgAst, options),
21575
+ ...outdatedEngines(pkg, pkgAst, ignoreNodeVersion),
21576
+ ...typesNodeMatchingEngine(pkg, pkgAst)
20303
21577
  ];
20304
21578
  if (messages.length === 0) {
20305
21579
  return [];
@@ -20353,10 +21627,10 @@ async function verifyShebang(pkg, tarball) {
20353
21627
  }
20354
21628
 
20355
21629
  // src/verify.ts
20356
- async function verify(pkg, pkgPath, tarball, options) {
21630
+ async function verify(pkg, pkgAst, pkgPath, tarball, options) {
20357
21631
  return [
20358
21632
  ...await verifyTarball(pkg, tarball),
20359
- ...await verifyPackageJson(pkg, pkgPath, options),
21633
+ ...await verifyPackageJson(pkg, pkgAst, pkgPath, options),
20360
21634
  ...await verifyShebang(pkg, tarball)
20361
21635
  ];
20362
21636
  }
@@ -20395,16 +21669,23 @@ async function preloadStdin() {
20395
21669
  }
20396
21670
  async function getPackageJson(args, regenerateReportName) {
20397
21671
  if (args.pkgfile) {
21672
+ const content = await fs14.readFile(args.pkgfile, "utf-8");
21673
+ const pkg = JSON.parse(content);
21674
+ const pkgAst = parse(content);
20398
21675
  return {
20399
- pkg: JSON.parse(await fs14.readFile(args.pkgfile, "utf-8")),
21676
+ pkg,
21677
+ pkgAst,
20400
21678
  pkgPath: args.pkgfile
20401
21679
  };
20402
21680
  }
20403
21681
  if (args.tarball) {
20404
21682
  const contents = await getFileContent({ filePath: args.tarball }, [PACKAGE_JSON]);
20405
- const pkg = JSON.parse(contents[PACKAGE_JSON].toString("utf-8"));
21683
+ const content = contents[PACKAGE_JSON].toString("utf-8");
21684
+ const pkg = JSON.parse(content);
21685
+ const pkgAst = parse(content);
20406
21686
  return {
20407
21687
  pkg,
21688
+ pkgAst,
20408
21689
  pkgPath: path16.join(
20409
21690
  regenerateReportName ? `${pkg.name}-${pkg.version}.tgz` : args.tarball,
20410
21691
  PACKAGE_JSON
@@ -20414,12 +21695,15 @@ async function getPackageJson(args, regenerateReportName) {
20414
21695
  const pkgPath = await findUp(PACKAGE_JSON);
20415
21696
  if (pkgPath) {
20416
21697
  const content = await fs14.readFile(pkgPath, "utf-8");
21698
+ const pkg = JSON.parse(content);
21699
+ const pkgAst = parse(content);
20417
21700
  return {
20418
- pkg: JSON.parse(content),
21701
+ pkg,
21702
+ pkgAst,
20419
21703
  pkgPath
20420
21704
  };
20421
21705
  }
20422
- return { pkg: void 0, pkgPath: void 0 };
21706
+ return { pkg: void 0, pkgAst: void 0, pkgPath: void 0 };
20423
21707
  }
20424
21708
  async function run() {
20425
21709
  const parser = new import_argparse.ArgumentParser({
@@ -20461,7 +21745,7 @@ async function run() {
20461
21745
  args.tarball = await preloadStdin();
20462
21746
  regenerateReportName = true;
20463
21747
  }
20464
- const { pkg, pkgPath } = await getPackageJson(args, regenerateReportName);
21748
+ const { pkg, pkgAst, pkgPath } = await getPackageJson(args, regenerateReportName);
20465
21749
  if (!pkg) {
20466
21750
  console.error("Failed to locate package.json and no location was specificed with `--pkgfile'");
20467
21751
  process.exitCode = 1;
@@ -20483,7 +21767,16 @@ async function run() {
20483
21767
  ignoreMissingFields: args.ignore_missing_fields,
20484
21768
  ignoreNodeVersion: args.ignore_node_version
20485
21769
  };
20486
- const results = await verify(pkg, pkgPath, tarball, options);
21770
+ const results = await verify(pkg, pkgAst, pkgPath, tarball, options);
21771
+ for (const result of results) {
21772
+ result.messages.sort((a2, b) => {
21773
+ if (a2.line !== b.line) {
21774
+ return a2.line - b.line;
21775
+ } else {
21776
+ return a2.column - b.column;
21777
+ }
21778
+ });
21779
+ }
20487
21780
  const output = stylish(results);
20488
21781
  process.stdout.write(output);
20489
21782
  const totalErrors = results.reduce((sum, result) => {