@icebreakers/stylelint-config 6.0.1 → 6.0.2

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.
@@ -2,7 +2,7 @@ import { r as __toESM, t as __commonJSMin } from "../rolldown-runtime-DegdyBIC.j
2
2
  import { createRequire } from "node:module";
3
3
  import { fileURLToPath } from "node:url";
4
4
  import nodeJsPath from "node:path";
5
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
5
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/constants.js
6
6
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7
7
  module.exports = {
8
8
  MAX_LENGTH: 256,
@@ -10,6 +10,33 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10
10
  MAX_SAFE_BUILD_LENGTH: 250,
11
11
  MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER ||
12
12
  /* istanbul ignore next */ 9007199254740991,
13
+ WHITESPACE_CHARACTERS: [
14
+ " ",
15
+ "\n",
16
+ "\v",
17
+ "\f",
18
+ "\r",
19
+ " ",
20
+ "\xA0",
21
+ " ",
22
+ " ",
23
+ " ",
24
+ " ",
25
+ " ",
26
+ " ",
27
+ " ",
28
+ " ",
29
+ " ",
30
+ " ",
31
+ " ",
32
+ " ",
33
+ "\u2028",
34
+ "\u2029",
35
+ " ",
36
+ " ",
37
+ " ",
38
+ ""
39
+ ],
13
40
  RELEASE_TYPES: [
14
41
  "major",
15
42
  "premajor",
@@ -24,11 +51,11 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24
51
  FLAG_LOOSE: 2
25
52
  };
26
53
  }));
27
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
54
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/debug.js
28
55
  var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
29
56
  module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
30
57
  }));
31
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
58
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/re.js
32
59
  var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
33
60
  const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
34
61
  const debug = require_debug();
@@ -106,7 +133,7 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
106
133
  createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
107
134
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
108
135
  }));
109
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
136
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/parse-options.js
110
137
  var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
111
138
  const looseOption = Object.freeze({ loose: true });
112
139
  const emptyOpts = Object.freeze({});
@@ -117,7 +144,7 @@ var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) =>
117
144
  };
118
145
  module.exports = parseOptions;
119
146
  }));
120
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
147
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/identifiers.js
121
148
  var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
122
149
  const numeric = /^[0-9]+$/;
123
150
  const compareIdentifiers = (a, b) => {
@@ -136,7 +163,7 @@ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
136
163
  rcompareIdentifiers
137
164
  };
138
165
  }));
139
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
166
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/classes/semver.js
140
167
  var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
141
168
  const debug = require_debug();
142
169
  const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
@@ -321,7 +348,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
321
348
  }
322
349
  };
323
350
  }));
324
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
351
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/parse.js
325
352
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
326
353
  const SemVer = require_semver$1();
327
354
  const parse = (version, options, throwErrors = false) => {
@@ -335,7 +362,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
335
362
  };
336
363
  module.exports = parse;
337
364
  }));
338
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
365
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/valid.js
339
366
  var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
340
367
  const parse = require_parse();
341
368
  const valid = (version, options) => {
@@ -344,7 +371,7 @@ var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
344
371
  };
345
372
  module.exports = valid;
346
373
  }));
347
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
374
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/clean.js
348
375
  var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
349
376
  const parse = require_parse();
350
377
  const clean = (version, options) => {
@@ -353,7 +380,7 @@ var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
353
380
  };
354
381
  module.exports = clean;
355
382
  }));
356
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
383
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/inc.js
357
384
  var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
358
385
  const SemVer = require_semver$1();
359
386
  const inc = (version, release, options, identifier, identifierBase) => {
@@ -370,7 +397,7 @@ var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
370
397
  };
371
398
  module.exports = inc;
372
399
  }));
373
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
400
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/diff.js
374
401
  var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
375
402
  const parse = require_parse();
376
403
  const diff = (version1, version2) => {
@@ -397,25 +424,25 @@ var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
397
424
  };
398
425
  module.exports = diff;
399
426
  }));
400
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
427
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/major.js
401
428
  var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
402
429
  const SemVer = require_semver$1();
403
430
  const major = (a, loose) => new SemVer(a, loose).major;
404
431
  module.exports = major;
405
432
  }));
406
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
433
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/minor.js
407
434
  var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
408
435
  const SemVer = require_semver$1();
409
436
  const minor = (a, loose) => new SemVer(a, loose).minor;
410
437
  module.exports = minor;
411
438
  }));
412
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
439
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/patch.js
413
440
  var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
414
441
  const SemVer = require_semver$1();
415
442
  const patch = (a, loose) => new SemVer(a, loose).patch;
416
443
  module.exports = patch;
417
444
  }));
418
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
445
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/prerelease.js
419
446
  var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
420
447
  const parse = require_parse();
421
448
  const prerelease = (version, options) => {
@@ -424,25 +451,25 @@ var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
424
451
  };
425
452
  module.exports = prerelease;
426
453
  }));
427
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
454
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/compare.js
428
455
  var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
429
456
  const SemVer = require_semver$1();
430
457
  const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
431
458
  module.exports = compare;
432
459
  }));
433
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
460
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/rcompare.js
434
461
  var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
435
462
  const compare = require_compare();
436
463
  const rcompare = (a, b, loose) => compare(b, a, loose);
437
464
  module.exports = rcompare;
438
465
  }));
439
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
466
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/compare-loose.js
440
467
  var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
441
468
  const compare = require_compare();
442
469
  const compareLoose = (a, b) => compare(a, b, true);
443
470
  module.exports = compareLoose;
444
471
  }));
445
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
472
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/compare-build.js
446
473
  var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
447
474
  const SemVer = require_semver$1();
448
475
  const compareBuild = (a, b, loose) => {
@@ -452,55 +479,55 @@ var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
452
479
  };
453
480
  module.exports = compareBuild;
454
481
  }));
455
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
482
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/sort.js
456
483
  var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
457
484
  const compareBuild = require_compare_build();
458
485
  const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
459
486
  module.exports = sort;
460
487
  }));
461
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
488
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/rsort.js
462
489
  var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
463
490
  const compareBuild = require_compare_build();
464
491
  const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
465
492
  module.exports = rsort;
466
493
  }));
467
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
494
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/gt.js
468
495
  var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
469
496
  const compare = require_compare();
470
497
  const gt = (a, b, loose) => compare(a, b, loose) > 0;
471
498
  module.exports = gt;
472
499
  }));
473
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
500
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/lt.js
474
501
  var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
475
502
  const compare = require_compare();
476
503
  const lt = (a, b, loose) => compare(a, b, loose) < 0;
477
504
  module.exports = lt;
478
505
  }));
479
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
506
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/eq.js
480
507
  var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
481
508
  const compare = require_compare();
482
509
  const eq = (a, b, loose) => compare(a, b, loose) === 0;
483
510
  module.exports = eq;
484
511
  }));
485
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
512
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/neq.js
486
513
  var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
487
514
  const compare = require_compare();
488
515
  const neq = (a, b, loose) => compare(a, b, loose) !== 0;
489
516
  module.exports = neq;
490
517
  }));
491
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
518
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/gte.js
492
519
  var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
493
520
  const compare = require_compare();
494
521
  const gte = (a, b, loose) => compare(a, b, loose) >= 0;
495
522
  module.exports = gte;
496
523
  }));
497
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
524
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/lte.js
498
525
  var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
499
526
  const compare = require_compare();
500
527
  const lte = (a, b, loose) => compare(a, b, loose) <= 0;
501
528
  module.exports = lte;
502
529
  }));
503
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
530
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/cmp.js
504
531
  var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
505
532
  const eq = require_eq();
506
533
  const neq = require_neq();
@@ -531,7 +558,7 @@ var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
531
558
  };
532
559
  module.exports = cmp;
533
560
  }));
534
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
561
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/coerce.js
535
562
  var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
536
563
  const SemVer = require_semver$1();
537
564
  const parse = require_parse();
@@ -562,7 +589,7 @@ var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
562
589
  };
563
590
  module.exports = coerce;
564
591
  }));
565
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
592
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/truncate.js
566
593
  var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
567
594
  const parse = require_parse();
568
595
  const constants = require_constants();
@@ -593,7 +620,7 @@ var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
593
620
  };
594
621
  module.exports = truncate;
595
622
  }));
596
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
623
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/lrucache.js
597
624
  var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
598
625
  var LRUCache = class {
599
626
  constructor() {
@@ -625,7 +652,344 @@ var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
625
652
  };
626
653
  module.exports = LRUCache;
627
654
  }));
628
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
655
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/trim-comparator-whitespace.js
656
+ var require_trim_comparator_whitespace = /* @__PURE__ */ __commonJSMin(((exports, module) => {
657
+ const { MAX_LENGTH, MAX_SAFE_BUILD_LENGTH, WHITESPACE_CHARACTERS } = require_constants();
658
+ /**
659
+ * Remembers the last two rows of digits so their characters need not be reread.
660
+ * Positions start at -1 until a row has been found.
661
+ *
662
+ * @typedef {object} DigitRunCache
663
+ * @property {number} start The first character of the most recently found row.
664
+ * @property {number} end The position after that row's last character.
665
+ * @property {number} previousStart The first character of the previous row.
666
+ * @property {number} previousEnd The position after the previous row.
667
+ */
668
+ const whitespace = /* @__PURE__ */ new Uint8Array(65536);
669
+ for (const char of WHITESPACE_CHARACTERS) whitespace[char.charCodeAt(0)] = 1;
670
+ /**
671
+ * Checks whether a character is whitespace, like a space, tab, or newline.
672
+ * Looking past the end of the string returns false.
673
+ *
674
+ * @param {string|undefined} char One character, or undefined past the string's end.
675
+ * @returns {boolean} Whether the character is whitespace.
676
+ * @example isWhitespace(' ') // true
677
+ * @example isWhitespace('1') // false
678
+ */
679
+ const isWhitespace = (char) => char !== void 0 && whitespace[char.charCodeAt(0)] === 1;
680
+ /**
681
+ * Checks for v, =, or whitespace before the version number.
682
+ * These are historical version prefixes, not range operators:
683
+ * < and > are handled separately, as are tilde and caret ranges.
684
+ *
685
+ * @param {string|undefined} char One character to check.
686
+ * @returns {boolean} Whether the character can belong to a version prefix.
687
+ * @example isVersionPrefix('=') // true
688
+ * @example isVersionPrefix('>') // false
689
+ */
690
+ const isVersionPrefix = (char) => char === "v" || char === "=" || isWhitespace(char);
691
+ /**
692
+ * Checks whether a character is one of the digits 0 through 9.
693
+ *
694
+ * @param {string|undefined} char One character to check.
695
+ * @returns {boolean} Whether the character is an ASCII digit.
696
+ * @example isDigit('7') // true
697
+ * @example isDigit('.') // false
698
+ */
699
+ const isDigit = (char) => char !== void 0 && char >= "0" && char <= "9";
700
+ /**
701
+ * Checks whether a character is an English letter, uppercase or lowercase.
702
+ *
703
+ * @param {string|undefined} char One character to check.
704
+ * @returns {boolean} Whether the character is an ASCII letter.
705
+ * @example isLetter('b') // true
706
+ * @example isLetter('7') // false
707
+ */
708
+ const isLetter = (char) => char !== void 0 && (char >= "a" && char <= "z" || char >= "A" && char <= "Z");
709
+ /**
710
+ * Checks for a letter, digit, or hyphen: the characters allowed inside
711
+ * prerelease and build names such as beta-1.
712
+ *
713
+ * @param {string|undefined} char One character to check.
714
+ * @returns {boolean} Whether the character can be part of an identifier.
715
+ * @example isIdentifierCharacter('-') // true
716
+ * @example isIdentifierCharacter('.') // false; dots separate identifiers
717
+ */
718
+ const isIdentifierCharacter = (char) => isDigit(char) || isLetter(char) || char === "-";
719
+ /**
720
+ * Checks whether a version component can begin here: with a digit or
721
+ * a wildcard such as x, X, or *.
722
+ *
723
+ * @param {string|undefined} char One character to check.
724
+ * @returns {boolean} Whether a number or wildcard can start with this character.
725
+ * @example isVersionStart('x') // true
726
+ * @example isVersionStart('v') // false; v belongs to the prefix
727
+ */
728
+ const isVersionStart = (char) => isDigit(char) || char === "x" || char === "X" || char === "*";
729
+ /**
730
+ * Finds the end of a row of digits, but returns no more than limit digits.
731
+ * Remembers the last two rows so looking at them again does not reread them.
732
+ *
733
+ * @param {string} range The text to read; it is not changed.
734
+ * @param {number} start The position of the first character to check.
735
+ * @param {number} limit The most digit characters the returned match can include.
736
+ * @param {DigitRunCache} digitRuns Shared cache of digit-run positions, updated in place.
737
+ * @returns {number} The position after the matched digits, or start if none match.
738
+ * @example findDigitsEndIndex('123abc', 0, 10, digitRuns) // 3, pointing at a
739
+ * @example findDigitsEndIndex('123abc', 0, 2, digitRuns) // 2, pointing at the unread 3
740
+ */
741
+ const findDigitsEndIndex = (range, start, limit, digitRuns) => {
742
+ if (!isDigit(range[start])) return start;
743
+ if (start >= digitRuns.start && start < digitRuns.end) return Math.min(start + limit, digitRuns.end);
744
+ if (start >= digitRuns.previousStart && start < digitRuns.previousEnd) return Math.min(start + limit, digitRuns.previousEnd);
745
+ let end = start + 1;
746
+ while (isDigit(range[end])) end++;
747
+ digitRuns.previousStart = digitRuns.start;
748
+ digitRuns.previousEnd = digitRuns.end;
749
+ digitRuns.start = start;
750
+ digitRuns.end = end;
751
+ return Math.min(start + limit, end);
752
+ };
753
+ /**
754
+ * Reads a number using the old regex's length and leading-zero rules.
755
+ * Strict mode reads just the first zero in 012; loose mode can read all three.
756
+ *
757
+ * @param {string} range The text to read; it is not changed.
758
+ * @param {number} start The position where the number should begin.
759
+ * @param {boolean} loose Whether to allow leading zeros.
760
+ * @param {DigitRunCache} digitRuns Shared digit-run cache, updated as needed.
761
+ * @returns {number} The position after the matched digits, not their numeric value.
762
+ * @example findVersionNumberEndIndex('012', 0, false, digitRuns) // 1
763
+ * @example findVersionNumberEndIndex('012', 0, true, digitRuns) // 3
764
+ */
765
+ const findVersionNumberEndIndex = (range, start, loose, digitRuns) => {
766
+ if (!loose && range[start] === "0") return start + 1;
767
+ return findDigitsEndIndex(range, start, loose ? MAX_LENGTH : MAX_LENGTH + 1, digitRuns);
768
+ };
769
+ /**
770
+ * Reads one piece of a prerelease name, such as beta or 1 in beta.1.
771
+ * Tries the letter-or-hyphen form first, then the number-only form.
772
+ *
773
+ * @param {string} range The text to read; it is not changed.
774
+ * @param {number} start The position where the identifier should begin.
775
+ * @param {boolean} loose Whether numeric identifiers may have leading zeros.
776
+ * @param {DigitRunCache} digitRuns Shared digit-run cache, updated as needed.
777
+ * @returns {number} The position after the identifier, or start if none matches.
778
+ * @example findPrereleaseIdentifierEndIndex('beta.1', 0, false, digitRuns) // 4, at the dot
779
+ * @example findPrereleaseIdentifierEndIndex('001beta', 0, false, digitRuns) // 7
780
+ */
781
+ const findPrereleaseIdentifierEndIndex = (range, start, loose, digitRuns) => {
782
+ const digitsEnd = findDigitsEndIndex(range, start, MAX_LENGTH, digitRuns);
783
+ if (isLetter(range[digitsEnd]) || range[digitsEnd] === "-") {
784
+ let end = digitsEnd + 1;
785
+ const limit = end + MAX_SAFE_BUILD_LENGTH;
786
+ while (end < limit && isIdentifierCharacter(range[end])) end++;
787
+ return end;
788
+ }
789
+ return findVersionNumberEndIndex(range, start, loose, digitRuns);
790
+ };
791
+ /**
792
+ * Reads a prerelease suffix such as -beta.1, one dot-separated piece at a time.
793
+ * Loose mode also allows the name without its opening hyphen.
794
+ *
795
+ * @param {string} range The text to read; it is not changed.
796
+ * @param {number} start The position where the suffix should begin, including -.
797
+ * @param {boolean} loose Whether the opening hyphen is optional and zeros allowed.
798
+ * @param {DigitRunCache} digitRuns Shared digit-run cache, updated as needed.
799
+ * @returns {number} The position after the matched suffix, or start if absent.
800
+ * @example findPrereleaseEndIndex('-beta.1+sha', 0, false, digitRuns) // 7, at the plus
801
+ * @example findPrereleaseEndIndex('beta', 0, false, digitRuns) // 0; no opening hyphen
802
+ */
803
+ const findPrereleaseEndIndex = (range, start, loose, digitRuns) => {
804
+ const hyphen = range[start] === "-";
805
+ if (!loose && !hyphen) return start;
806
+ const identifierStart = start + (hyphen ? 1 : 0);
807
+ let end = findPrereleaseIdentifierEndIndex(range, identifierStart, loose, digitRuns);
808
+ if (end === identifierStart) {
809
+ if (!loose || !hyphen) return start;
810
+ end = findPrereleaseIdentifierEndIndex(range, start, loose, digitRuns);
811
+ }
812
+ while (range[end] === ".") {
813
+ const next = findPrereleaseIdentifierEndIndex(range, end + 1, loose, digitRuns);
814
+ if (next === end + 1) break;
815
+ end = next;
816
+ }
817
+ return end;
818
+ };
819
+ /**
820
+ * Reads one build-name piece, such as sha or 123 in +sha.123.
821
+ * Stops at a disallowed character or the old regex's length limit.
822
+ *
823
+ * @param {string} range The text to read; it is not changed.
824
+ * @param {number} start The position where the identifier should begin.
825
+ * @returns {number} The position after the identifier, or start if none matches.
826
+ * @example findBuildIdentifierEndIndex('sha.123', 0) // 3, at the dot
827
+ * @example findBuildIdentifierEndIndex('001', 0) // 3; leading zeros are allowed
828
+ */
829
+ const findBuildIdentifierEndIndex = (range, start) => {
830
+ let end = start;
831
+ while (end - start < MAX_SAFE_BUILD_LENGTH && isIdentifierCharacter(range[end])) end++;
832
+ return end;
833
+ };
834
+ /**
835
+ * Reads optional build metadata such as +sha.123.
836
+ * Leaves the position unchanged if there is no plus sign followed by a name.
837
+ *
838
+ * @param {string} range The text to read; it is not changed.
839
+ * @param {number} start The position where the opening + should be.
840
+ * @returns {number} The position after the matched metadata, or start if absent.
841
+ * @example findBuildEndIndex('+sha.123 <2', 0) // 8, at the space
842
+ * @example findBuildEndIndex('+', 0) // 0; a plus sign alone is not a match
843
+ */
844
+ const findBuildEndIndex = (range, start) => {
845
+ if (range[start] !== "+") return start;
846
+ let end = findBuildIdentifierEndIndex(range, start + 1);
847
+ if (end === start + 1) return start;
848
+ while (range[end] === ".") {
849
+ const next = findBuildIdentifierEndIndex(range, end + 1);
850
+ if (next === end + 1) break;
851
+ end = next;
852
+ }
853
+ return end;
854
+ };
855
+ /**
856
+ * Reads three numbers separated by dots, then any prerelease and build suffixes.
857
+ * Uses loose rules, so forms such as 01.02.03beta can match here.
858
+ *
859
+ * @param {string} range The text to read; it is not changed.
860
+ * @param {number} start The position of the first number, after any prefix.
861
+ * @param {DigitRunCache} digitRuns Shared digit-run cache, updated as needed.
862
+ * @returns {number} The position after the version match, or start if none matches.
863
+ * @example findLooseFullVersionEndIndex('1.2.3-beta+sha <2', 0, digitRuns) // 14
864
+ * @example findLooseFullVersionEndIndex('1.2', 0, digitRuns) // 0; needs three numbers
865
+ */
866
+ const findLooseFullVersionEndIndex = (range, start, digitRuns) => {
867
+ let end = start;
868
+ for (let component = 0; component < 3; component++) {
869
+ const next = findVersionNumberEndIndex(range, end, true, digitRuns);
870
+ if (next === end) return start;
871
+ end = next;
872
+ if (component < 2) {
873
+ if (range[end] !== ".") return start;
874
+ end++;
875
+ }
876
+ }
877
+ const prereleaseEnd = findPrereleaseEndIndex(range, end, true, digitRuns);
878
+ return findBuildEndIndex(range, prereleaseEnd);
879
+ };
880
+ /**
881
+ * Reads one component of a partial or wildcard version, such as 2 or x in 2.x.
882
+ * Numbers use strict leading-zero rules; wildcards take up one character.
883
+ *
884
+ * @param {string} range The text to read; it is not changed.
885
+ * @param {number} start The position where the component should begin.
886
+ * @param {DigitRunCache} digitRuns Shared digit-run cache, updated as needed.
887
+ * @returns {number} The position after the component, or start if none matches.
888
+ * @example findPartialVersionComponentEndIndex('2.x', 0, digitRuns) // 1, at the dot
889
+ * @example findPartialVersionComponentEndIndex('2.x', 2, digitRuns) // 3, after x
890
+ */
891
+ const findPartialVersionComponentEndIndex = (range, start, digitRuns) => {
892
+ if (isDigit(range[start])) return findVersionNumberEndIndex(range, start, false, digitRuns);
893
+ return isVersionStart(range[start]) ? start + 1 : start;
894
+ };
895
+ /**
896
+ * Reads up to three components, allowing forms such as 1, 1.2, or 1.x.
897
+ * After the third component, also reads any strict prerelease and build suffixes.
898
+ *
899
+ * @param {string} range The text to read; it is not changed.
900
+ * @param {number} start The position of a number or wildcard, after any prefix.
901
+ * @param {DigitRunCache} digitRuns Shared digit-run cache, updated as needed.
902
+ * @returns {number} The position after the matched version text.
903
+ * @example findPartialVersionEndIndex('1.x <2', 0, digitRuns) // 3, at the space
904
+ * @example findPartialVersionEndIndex('1.', 0, digitRuns) // 1; the trailing dot is unread
905
+ */
906
+ const findPartialVersionEndIndex = (range, start, digitRuns) => {
907
+ let end = findPartialVersionComponentEndIndex(range, start, digitRuns);
908
+ for (let component = 0; component < 2; component++) {
909
+ if (range[end] !== ".") return end;
910
+ const next = findPartialVersionComponentEndIndex(range, end + 1, digitRuns);
911
+ if (next === end + 1) return end;
912
+ end = next;
913
+ }
914
+ const prereleaseEnd = findPrereleaseEndIndex(range, end, false, digitRuns);
915
+ return findBuildEndIndex(range, prereleaseEnd);
916
+ };
917
+ /**
918
+ * Finds where a version match ends, without deciding whether the range is valid.
919
+ * Tries a loose full version first, then a partial or wildcard version, just
920
+ * like the old regex's LOOSEPLAIN and XRANGEPLAIN alternatives.
921
+ *
922
+ * @param {string} range The text to read; it is not changed.
923
+ * @param {number} start The position of a number or wildcard, after any prefix.
924
+ * @param {DigitRunCache} digitRuns Shared digit-run cache, updated as needed.
925
+ * @returns {number} The position where scanning the next candidate can resume.
926
+ * @example findVersionEndIndex('1.2.3 <2', 0, digitRuns) // 5, at the space
927
+ * @example findVersionEndIndex('1.x <2', 0, digitRuns) // 3, at the space
928
+ */
929
+ const findVersionEndIndex = (range, start, digitRuns) => {
930
+ const fullVersionEnd = findLooseFullVersionEndIndex(range, start, digitRuns);
931
+ return fullVersionEnd !== start ? fullVersionEnd : findPartialVersionEndIndex(range, start, digitRuns);
932
+ };
933
+ /**
934
+ * Finds the one whitespace character the old replacement would remove.
935
+ * Keeps leading whitespace, skips an optional operator, and checks immediately
936
+ * after it. Returns -1 if there is nothing to remove.
937
+ *
938
+ * @param {string} range The text containing a candidate already found by the caller.
939
+ * @param {number} matchStart The candidate's position, including leading whitespace.
940
+ * @returns {number} The position of the removable whitespace, or -1 if absent.
941
+ * @example findRemovableWhitespaceIndex(' > 1', 0) // 2; keep the space at position 0
942
+ * @example findRemovableWhitespaceIndex('>1', 0) // -1
943
+ */
944
+ const findRemovableWhitespaceIndex = (range, matchStart) => {
945
+ let position = matchStart;
946
+ if (isWhitespace(range[position])) position++;
947
+ if (range[position] === "<" || range[position] === ">") position++;
948
+ if (range[position] === "=") position++;
949
+ return isWhitespace(range[position]) ? position : -1;
950
+ };
951
+ /**
952
+ * Joins an operator to its version, turning > 1.2.3 into >1.2.3.
953
+ * Copies everything else according to the old regex's matching rules.
954
+ * Moves forward through prefixes and whole versions to avoid repeatedly
955
+ * searching the same characters on long inputs.
956
+ *
957
+ * @param {string} range The range text to process; the original string is unchanged.
958
+ * @returns {string} The range with matched operator whitespace removed.
959
+ * @example trimComparatorWhitespace('> 1.2.3 < 2') // '>1.2.3 <2'
960
+ * @example trimComparatorWhitespace('> invalid') // '> invalid'
961
+ */
962
+ const trimComparatorWhitespace = (range) => {
963
+ let result = "";
964
+ let copyFrom = 0;
965
+ let cursor = 0;
966
+ const digitRuns = {
967
+ start: -1,
968
+ end: -1,
969
+ previousStart: -1,
970
+ previousEnd: -1
971
+ };
972
+ while (cursor < range.length) {
973
+ const matchStart = cursor;
974
+ if (range[cursor] === "<" || range[cursor] === ">") cursor++;
975
+ else if (!isVersionPrefix(range[cursor]) && !isVersionStart(range[cursor])) {
976
+ cursor++;
977
+ continue;
978
+ }
979
+ while (cursor < range.length && isVersionPrefix(range[cursor])) cursor++;
980
+ if (!isVersionStart(range[cursor])) continue;
981
+ const whitespacePosition = findRemovableWhitespaceIndex(range, matchStart);
982
+ if (whitespacePosition !== -1) {
983
+ result += range.slice(copyFrom, whitespacePosition);
984
+ copyFrom = whitespacePosition + 1;
985
+ }
986
+ cursor = findVersionEndIndex(range, cursor, digitRuns);
987
+ }
988
+ return result + range.slice(copyFrom);
989
+ };
990
+ module.exports = trimComparatorWhitespace;
991
+ }));
992
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/classes/range.js
629
993
  var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
630
994
  const SPACE_CHARACTERS = /\s+/g;
631
995
  module.exports = class Range {
@@ -689,7 +1053,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
689
1053
  const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
690
1054
  range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
691
1055
  debug("hyphen replace", range);
692
- range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
1056
+ range = trimComparatorWhitespace(range);
693
1057
  debug("comparator trim", range);
694
1058
  range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
695
1059
  debug("tilde trim", range);
@@ -740,7 +1104,8 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
740
1104
  const Comparator = require_comparator();
741
1105
  const debug = require_debug();
742
1106
  const SemVer = require_semver$1();
743
- const { safeRe: re, src, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
1107
+ const trimComparatorWhitespace = require_trim_comparator_whitespace();
1108
+ const { safeRe: re, src, t, tildeTrimReplace, caretTrimReplace } = require_re();
744
1109
  const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
745
1110
  const BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
746
1111
  const isNullSet = (c) => c.value === "<0.0.0-0";
@@ -907,7 +1272,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
907
1272
  return true;
908
1273
  };
909
1274
  }));
910
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
1275
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/classes/comparator.js
911
1276
  var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
912
1277
  const ANY = Symbol("SemVer ANY");
913
1278
  module.exports = class Comparator {
@@ -978,7 +1343,7 @@ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
978
1343
  const SemVer = require_semver$1();
979
1344
  const Range = require_range();
980
1345
  }));
981
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
1346
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/satisfies.js
982
1347
  var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
983
1348
  const Range = require_range();
984
1349
  const satisfies = (version, range, options) => {
@@ -991,13 +1356,13 @@ var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
991
1356
  };
992
1357
  module.exports = satisfies;
993
1358
  }));
994
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
1359
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/to-comparators.js
995
1360
  var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
996
1361
  const Range = require_range();
997
1362
  const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
998
1363
  module.exports = toComparators;
999
1364
  }));
1000
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
1365
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/max-satisfying.js
1001
1366
  var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1002
1367
  const SemVer = require_semver$1();
1003
1368
  const Range = require_range();
@@ -1022,7 +1387,7 @@ var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
1022
1387
  };
1023
1388
  module.exports = maxSatisfying;
1024
1389
  }));
1025
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
1390
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/min-satisfying.js
1026
1391
  var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1027
1392
  const SemVer = require_semver$1();
1028
1393
  const Range = require_range();
@@ -1047,7 +1412,7 @@ var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
1047
1412
  };
1048
1413
  module.exports = minSatisfying;
1049
1414
  }));
1050
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
1415
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/min-version.js
1051
1416
  var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1052
1417
  const SemVer = require_semver$1();
1053
1418
  const Range = require_range();
@@ -1086,7 +1451,7 @@ var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1086
1451
  };
1087
1452
  module.exports = minVersion;
1088
1453
  }));
1089
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
1454
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/valid.js
1090
1455
  var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1091
1456
  const Range = require_range();
1092
1457
  const validRange = (range, options) => {
@@ -1098,7 +1463,7 @@ var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1098
1463
  };
1099
1464
  module.exports = validRange;
1100
1465
  }));
1101
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
1466
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/outside.js
1102
1467
  var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1103
1468
  const SemVer = require_semver$1();
1104
1469
  const Comparator = require_comparator();
@@ -1150,19 +1515,19 @@ var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1150
1515
  };
1151
1516
  module.exports = outside;
1152
1517
  }));
1153
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
1518
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/gtr.js
1154
1519
  var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1155
1520
  const outside = require_outside();
1156
1521
  const gtr = (version, range, options) => outside(version, range, ">", options);
1157
1522
  module.exports = gtr;
1158
1523
  }));
1159
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
1524
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/ltr.js
1160
1525
  var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1161
1526
  const outside = require_outside();
1162
1527
  const ltr = (version, range, options) => outside(version, range, "<", options);
1163
1528
  module.exports = ltr;
1164
1529
  }));
1165
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
1530
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/intersects.js
1166
1531
  var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1167
1532
  const Range = require_range();
1168
1533
  const intersects = (r1, r2, options) => {
@@ -1172,7 +1537,7 @@ var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1172
1537
  };
1173
1538
  module.exports = intersects;
1174
1539
  }));
1175
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
1540
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/simplify.js
1176
1541
  var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1177
1542
  const satisfies = require_satisfies();
1178
1543
  const compare = require_compare();
@@ -1201,7 +1566,7 @@ var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1201
1566
  return simplified.length < original.length ? simplified : range;
1202
1567
  };
1203
1568
  }));
1204
- // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
1569
+ // ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/ranges/subset.js
1205
1570
  var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1206
1571
  const Range = require_range();
1207
1572
  const Comparator = require_comparator();