pnpm 10.30.2 → 10.31.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.
Files changed (122) hide show
  1. package/README.md +32 -33
  2. package/dist/node_modules/.modules.yaml +139 -141
  3. package/dist/node_modules/.pnpm/lock.yaml +23 -25
  4. package/dist/node_modules/.pnpm-workspace-state-v1.json +1 -1
  5. package/dist/node_modules/balanced-match/.github/FUNDING.yml +2 -0
  6. package/dist/node_modules/balanced-match/index.js +62 -0
  7. package/dist/node_modules/balanced-match/package.json +28 -48
  8. package/dist/node_modules/brace-expansion/.github/FUNDING.yml +2 -0
  9. package/dist/node_modules/brace-expansion/LICENSE +1 -3
  10. package/dist/node_modules/brace-expansion/index.js +203 -0
  11. package/dist/node_modules/brace-expansion/package.json +36 -51
  12. package/dist/node_modules/isexe/LICENSE +1 -1
  13. package/dist/node_modules/isexe/package.json +14 -79
  14. package/dist/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -1
  15. package/dist/node_modules/minimatch/dist/commonjs/ast.js +168 -20
  16. package/dist/node_modules/minimatch/dist/commonjs/ast.js.map +1 -1
  17. package/dist/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -1
  18. package/dist/node_modules/minimatch/dist/commonjs/index.js +129 -120
  19. package/dist/node_modules/minimatch/dist/commonjs/index.js.map +1 -1
  20. package/dist/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -1
  21. package/dist/node_modules/minimatch/dist/esm/ast.js +168 -20
  22. package/dist/node_modules/minimatch/dist/esm/ast.js.map +1 -1
  23. package/dist/node_modules/minimatch/dist/esm/index.d.ts.map +1 -1
  24. package/dist/node_modules/minimatch/dist/esm/index.js +125 -119
  25. package/dist/node_modules/minimatch/dist/esm/index.js.map +1 -1
  26. package/dist/node_modules/minimatch/package.json +3 -2
  27. package/dist/node_modules/{minipass-flush/node_modules/yallist → node-gyp/node_modules/isexe}/LICENSE +1 -1
  28. package/dist/node_modules/node-gyp/node_modules/isexe/package.json +96 -0
  29. package/dist/node_modules/node-gyp/node_modules/which/package.json +52 -0
  30. package/dist/node_modules/strip-ansi/index.js +5 -0
  31. package/dist/node_modules/strip-ansi/package.json +5 -5
  32. package/dist/node_modules/tar/dist/commonjs/index.min.js +2 -2
  33. package/dist/node_modules/tar/dist/commonjs/index.min.js.map +3 -3
  34. package/dist/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +1 -1
  35. package/dist/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +1 -1
  36. package/dist/node_modules/tar/dist/commonjs/unpack.js +3 -3
  37. package/dist/node_modules/tar/dist/commonjs/unpack.js.map +1 -1
  38. package/dist/node_modules/tar/dist/esm/index.min.js +2 -2
  39. package/dist/node_modules/tar/dist/esm/index.min.js.map +3 -3
  40. package/dist/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +1 -1
  41. package/dist/node_modules/tar/dist/esm/strip-absolute-path.js.map +1 -1
  42. package/dist/node_modules/tar/dist/esm/unpack.js +3 -3
  43. package/dist/node_modules/tar/dist/esm/unpack.js.map +1 -1
  44. package/dist/node_modules/tar/node_modules/yallist/package.json +68 -0
  45. package/dist/node_modules/tar/package.json +6 -6
  46. package/dist/node_modules/which/package.json +20 -29
  47. package/dist/node_modules/yallist/package.json +12 -51
  48. package/dist/pnpm.cjs +30856 -24457
  49. package/dist/worker.js +163 -122
  50. package/package.json +1 -1
  51. package/dist/node_modules/balanced-match/dist/commonjs/index.d.ts.map +0 -1
  52. package/dist/node_modules/balanced-match/dist/commonjs/index.js +0 -59
  53. package/dist/node_modules/balanced-match/dist/commonjs/index.js.map +0 -1
  54. package/dist/node_modules/balanced-match/dist/esm/index.d.ts.map +0 -1
  55. package/dist/node_modules/balanced-match/dist/esm/index.js +0 -54
  56. package/dist/node_modules/balanced-match/dist/esm/index.js.map +0 -1
  57. package/dist/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +0 -1
  58. package/dist/node_modules/brace-expansion/dist/commonjs/index.js +0 -199
  59. package/dist/node_modules/brace-expansion/dist/commonjs/index.js.map +0 -1
  60. package/dist/node_modules/brace-expansion/dist/esm/index.d.ts.map +0 -1
  61. package/dist/node_modules/brace-expansion/dist/esm/index.js +0 -195
  62. package/dist/node_modules/brace-expansion/dist/esm/index.js.map +0 -1
  63. package/dist/node_modules/cross-spawn/node_modules/isexe/package.json +0 -31
  64. package/dist/node_modules/cross-spawn/node_modules/which/package.json +0 -43
  65. package/dist/node_modules/isexe/dist/cjs/package.json +0 -3
  66. package/dist/node_modules/isexe/dist/mjs/package.json +0 -3
  67. package/dist/node_modules/minipass-flush/node_modules/yallist/package.json +0 -29
  68. package/dist/node_modules/minipass-pipeline/node_modules/yallist/LICENSE +0 -15
  69. package/dist/node_modules/minipass-pipeline/node_modules/yallist/iterator.js +0 -8
  70. package/dist/node_modules/minipass-pipeline/node_modules/yallist/package.json +0 -29
  71. package/dist/node_modules/minipass-pipeline/node_modules/yallist/yallist.js +0 -426
  72. package/dist/node_modules/minipass-sized/node_modules/yallist/LICENSE +0 -15
  73. package/dist/node_modules/minipass-sized/node_modules/yallist/iterator.js +0 -8
  74. package/dist/node_modules/minipass-sized/node_modules/yallist/package.json +0 -29
  75. package/dist/node_modules/minipass-sized/node_modules/yallist/yallist.js +0 -426
  76. package/dist/node_modules/yallist/dist/commonjs/package.json +0 -3
  77. package/dist/node_modules/yallist/dist/esm/package.json +0 -3
  78. /package/dist/node_modules/{cross-spawn/node_modules/isexe → isexe}/index.js +0 -0
  79. /package/dist/node_modules/{cross-spawn/node_modules/isexe → isexe}/mode.js +0 -0
  80. /package/dist/node_modules/{cross-spawn/node_modules/isexe → isexe}/windows.js +0 -0
  81. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/index.d.ts.map +0 -0
  82. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/index.js +0 -0
  83. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/index.js.map +0 -0
  84. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/options.d.ts.map +0 -0
  85. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/options.js +0 -0
  86. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/options.js.map +0 -0
  87. /package/dist/node_modules/{balanced-match/dist/commonjs → node-gyp/node_modules/isexe/dist/cjs}/package.json +0 -0
  88. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/posix.d.ts.map +0 -0
  89. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/posix.js +0 -0
  90. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/posix.js.map +0 -0
  91. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/win32.d.ts.map +0 -0
  92. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/win32.js +0 -0
  93. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/cjs/win32.js.map +0 -0
  94. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/index.d.ts.map +0 -0
  95. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/index.js +0 -0
  96. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/index.js.map +0 -0
  97. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/options.d.ts.map +0 -0
  98. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/options.js +0 -0
  99. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/options.js.map +0 -0
  100. /package/dist/node_modules/{balanced-match/dist/esm → node-gyp/node_modules/isexe/dist/mjs}/package.json +0 -0
  101. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/posix.d.ts.map +0 -0
  102. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/posix.js +0 -0
  103. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/posix.js.map +0 -0
  104. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/win32.d.ts.map +0 -0
  105. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/win32.js +0 -0
  106. /package/dist/node_modules/{isexe → node-gyp/node_modules/isexe}/dist/mjs/win32.js.map +0 -0
  107. /package/dist/node_modules/{cross-spawn/node_modules/isexe → node-gyp/node_modules/which}/LICENSE +0 -0
  108. /package/dist/node_modules/{which → node-gyp/node_modules/which}/bin/which.js +0 -0
  109. /package/dist/node_modules/{which → node-gyp/node_modules/which}/lib/index.js +0 -0
  110. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/commonjs/index.d.ts.map +0 -0
  111. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/commonjs/index.js +0 -0
  112. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/commonjs/index.js.map +0 -0
  113. /package/dist/node_modules/{brace-expansion → tar/node_modules/yallist}/dist/commonjs/package.json +0 -0
  114. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/esm/index.d.ts.map +0 -0
  115. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/esm/index.js +0 -0
  116. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/esm/index.js.map +0 -0
  117. /package/dist/node_modules/{brace-expansion → tar/node_modules/yallist}/dist/esm/package.json +0 -0
  118. /package/dist/node_modules/{cross-spawn/node_modules/which → which}/bin/node-which +0 -0
  119. /package/dist/node_modules/{cross-spawn/node_modules/which → which}/which.js +0 -0
  120. /package/dist/node_modules/{cross-spawn/node_modules/which → yallist}/LICENSE +0 -0
  121. /package/dist/node_modules/{minipass-flush/node_modules/yallist → yallist}/iterator.js +0 -0
  122. /package/dist/node_modules/{minipass-flush/node_modules/yallist → yallist}/yallist.js +0 -0
@@ -1,4 +1,4 @@
1
- import { expand } from 'brace-expansion';
1
+ import expand from 'brace-expansion';
2
2
  import { assertValidPattern } from './assert-valid-pattern.js';
3
3
  import { AST } from './ast.js';
4
4
  import { escape } from './escape.js';
@@ -193,11 +193,13 @@ export class Minimatch {
193
193
  isWindows;
194
194
  platform;
195
195
  windowsNoMagicRoot;
196
+ maxGlobstarRecursion;
196
197
  regexp;
197
198
  constructor(pattern, options = {}) {
198
199
  assertValidPattern(pattern);
199
200
  options = options || {};
200
201
  this.options = options;
202
+ this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
201
203
  this.pattern = pattern;
202
204
  this.platform = options.platform || defaultPlatform;
203
205
  this.isWindows = this.platform === 'win32';
@@ -597,7 +599,8 @@ export class Minimatch {
597
599
  // out of pattern, then that's fine, as long as all
598
600
  // the parts match.
599
601
  matchOne(file, pattern, partial = false) {
600
- const options = this.options;
602
+ let fileStartIndex = 0;
603
+ let patternStartIndex = 0;
601
604
  // UNC paths like //?/X:/... can match X:/... and vice versa
602
605
  // Drive letters in absolute drive or unc paths are always compared
603
606
  // case-insensitively.
@@ -618,15 +621,14 @@ export class Minimatch {
618
621
  const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
619
622
  const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
620
623
  if (typeof fdi === 'number' && typeof pdi === 'number') {
621
- const [fd, pd] = [file[fdi], pattern[pdi]];
624
+ const [fd, pd] = [
625
+ file[fdi],
626
+ pattern[pdi],
627
+ ];
622
628
  if (fd.toLowerCase() === pd.toLowerCase()) {
623
629
  pattern[pdi] = fd;
624
- if (pdi > fdi) {
625
- pattern = pattern.slice(pdi);
626
- }
627
- else if (fdi > pdi) {
628
- file = file.slice(fdi);
629
- }
630
+ patternStartIndex = pdi;
631
+ fileStartIndex = fdi;
630
632
  }
631
633
  }
632
634
  }
@@ -636,102 +638,127 @@ export class Minimatch {
636
638
  if (optimizationLevel >= 2) {
637
639
  file = this.levelTwoFileOptimize(file);
638
640
  }
639
- this.debug('matchOne', this, { file, pattern });
640
- this.debug('matchOne', file.length, pattern.length);
641
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
642
- this.debug('matchOne loop');
643
- var p = pattern[pi];
644
- var f = file[fi];
645
- this.debug(pattern, p, f);
646
- // should be impossible.
647
- // some invalid regexp stuff in the set.
648
- /* c8 ignore start */
649
- if (p === false) {
641
+ if (pattern.includes(GLOBSTAR)) {
642
+ return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
643
+ }
644
+ return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
645
+ }
646
+ #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
647
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
648
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
649
+ const [head, body, tail] = partial ? [
650
+ pattern.slice(patternIndex, firstgs),
651
+ pattern.slice(firstgs + 1),
652
+ [],
653
+ ] : [
654
+ pattern.slice(patternIndex, firstgs),
655
+ pattern.slice(firstgs + 1, lastgs),
656
+ pattern.slice(lastgs + 1),
657
+ ];
658
+ if (head.length) {
659
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
660
+ if (!this.#matchOne(fileHead, head, partial, 0, 0))
650
661
  return false;
662
+ fileIndex += head.length;
663
+ }
664
+ let fileTailMatch = 0;
665
+ if (tail.length) {
666
+ if (tail.length + fileIndex > file.length)
667
+ return false;
668
+ let tailStart = file.length - tail.length;
669
+ if (this.#matchOne(file, tail, partial, tailStart, 0)) {
670
+ fileTailMatch = tail.length;
651
671
  }
652
- /* c8 ignore stop */
653
- if (p === GLOBSTAR) {
654
- this.debug('GLOBSTAR', [pattern, p, f]);
655
- // "**"
656
- // a/**/b/**/c would match the following:
657
- // a/b/x/y/z/c
658
- // a/x/y/z/b/c
659
- // a/b/x/b/x/c
660
- // a/b/c
661
- // To do this, take the rest of the pattern after
662
- // the **, and see if it would match the file remainder.
663
- // If so, return success.
664
- // If not, the ** "swallows" a segment, and try again.
665
- // This is recursively awful.
666
- //
667
- // a/**/b/**/c matching a/b/x/y/z/c
668
- // - a matches a
669
- // - doublestar
670
- // - matchOne(b/x/y/z/c, b/**/c)
671
- // - b matches b
672
- // - doublestar
673
- // - matchOne(x/y/z/c, c) -> no
674
- // - matchOne(y/z/c, c) -> no
675
- // - matchOne(z/c, c) -> no
676
- // - matchOne(c, c) yes, hit
677
- var fr = fi;
678
- var pr = pi + 1;
679
- if (pr === pl) {
680
- this.debug('** at the end');
681
- // a ** at the end will just swallow the rest.
682
- // We have found a match.
683
- // however, it will not swallow /.x, unless
684
- // options.dot is set.
685
- // . and .. are *never* matched by **, for explosively
686
- // exponential reasons.
687
- for (; fi < fl; fi++) {
688
- if (file[fi] === '.' ||
689
- file[fi] === '..' ||
690
- (!options.dot && file[fi].charAt(0) === '.'))
691
- return false;
692
- }
693
- return true;
672
+ else {
673
+ if (file[file.length - 1] !== '' ||
674
+ fileIndex + tail.length === file.length) {
675
+ return false;
694
676
  }
695
- // ok, let's see if we can swallow whatever we can.
696
- while (fr < fl) {
697
- var swallowee = file[fr];
698
- this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
699
- // XXX remove this slice. Just pass the start index.
700
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
701
- this.debug('globstar found match!', fr, fl, swallowee);
702
- // found a match.
703
- return true;
704
- }
705
- else {
706
- // can't swallow "." or ".." ever.
707
- // can only swallow ".foo" when explicitly asked.
708
- if (swallowee === '.' ||
709
- swallowee === '..' ||
710
- (!options.dot && swallowee.charAt(0) === '.')) {
711
- this.debug('dot detected!', file, fr, pattern, pr);
712
- break;
713
- }
714
- // ** swallows a segment, and continue.
715
- this.debug('globstar swallow a segment, and continue');
716
- fr++;
717
- }
677
+ tailStart--;
678
+ if (!this.#matchOne(file, tail, partial, tailStart, 0))
679
+ return false;
680
+ fileTailMatch = tail.length + 1;
681
+ }
682
+ }
683
+ if (!body.length) {
684
+ let sawSome = !!fileTailMatch;
685
+ for (let i = fileIndex; i < file.length - fileTailMatch; i++) {
686
+ const f = String(file[i]);
687
+ sawSome = true;
688
+ if (f === '.' || f === '..' ||
689
+ (!this.options.dot && f.startsWith('.'))) {
690
+ return false;
718
691
  }
719
- // no match was found.
720
- // However, in partial mode, we can't say this is necessarily over.
721
- /* c8 ignore start */
722
- if (partial) {
723
- // ran out of file
724
- this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
725
- if (fr === fl) {
726
- return true;
727
- }
692
+ }
693
+ return partial || sawSome;
694
+ }
695
+ const bodySegments = [[[], 0]];
696
+ let currentBody = bodySegments[0];
697
+ let nonGsParts = 0;
698
+ const nonGsPartsSums = [0];
699
+ for (const b of body) {
700
+ if (b === GLOBSTAR) {
701
+ nonGsPartsSums.push(nonGsParts);
702
+ currentBody = [[], 0];
703
+ bodySegments.push(currentBody);
704
+ }
705
+ else {
706
+ currentBody[0].push(b);
707
+ nonGsParts++;
708
+ }
709
+ }
710
+ let i = bodySegments.length - 1;
711
+ const fileLength = file.length - fileTailMatch;
712
+ for (const b of bodySegments) {
713
+ b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
714
+ }
715
+ return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
716
+ }
717
+ #matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
718
+ const bs = bodySegments[bodyIndex];
719
+ if (!bs) {
720
+ for (let i = fileIndex; i < file.length; i++) {
721
+ sawTail = true;
722
+ const f = file[i];
723
+ if (f === '.' || f === '..' ||
724
+ (!this.options.dot && f.startsWith('.'))) {
725
+ return false;
728
726
  }
729
- /* c8 ignore stop */
727
+ }
728
+ return sawTail;
729
+ }
730
+ const [body, after] = bs;
731
+ while (fileIndex <= after) {
732
+ const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
733
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
734
+ const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
735
+ if (sub !== false)
736
+ return sub;
737
+ }
738
+ const f = file[fileIndex];
739
+ if (f === '.' || f === '..' ||
740
+ (!this.options.dot && f.startsWith('.'))) {
730
741
  return false;
731
742
  }
732
- // something other than **
733
- // non-magic patterns just have to match exactly
734
- // patterns with magic have been turned into regexps.
743
+ fileIndex++;
744
+ }
745
+ return partial || null;
746
+ }
747
+ #matchOne(file, pattern, partial, fileIndex, patternIndex) {
748
+ let fi;
749
+ let pi;
750
+ let pl;
751
+ let fl;
752
+ for (fi = fileIndex, pi = patternIndex,
753
+ fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
754
+ this.debug('matchOne loop');
755
+ let p = pattern[pi];
756
+ let f = file[fi];
757
+ this.debug(pattern, p, f);
758
+ /* c8 ignore start */
759
+ if (p === false || p === GLOBSTAR)
760
+ return false;
761
+ /* c8 ignore stop */
735
762
  let hit;
736
763
  if (typeof p === 'string') {
737
764
  hit = f === p;
@@ -744,38 +771,17 @@ export class Minimatch {
744
771
  if (!hit)
745
772
  return false;
746
773
  }
747
- // Note: ending in / means that we'll get a final ""
748
- // at the end of the pattern. This can only match a
749
- // corresponding "" at the end of the file.
750
- // If the file ends in /, then it can only match a
751
- // a pattern that ends in /, unless the pattern just
752
- // doesn't have any more for it. But, a/b/ should *not*
753
- // match "a/b/*", even though "" matches against the
754
- // [^/]*? pattern, except in partial mode, where it might
755
- // simply not be reached yet.
756
- // However, a/b/ should still satisfy a/*
757
- // now either we fell off the end of the pattern, or we're done.
758
774
  if (fi === fl && pi === pl) {
759
- // ran out of pattern and filename at the same time.
760
- // an exact hit!
761
775
  return true;
762
776
  }
763
777
  else if (fi === fl) {
764
- // ran out of file, but still had pattern left.
765
- // this is ok if we're doing the match as part of
766
- // a glob fs traversal.
767
778
  return partial;
768
779
  }
769
780
  else if (pi === pl) {
770
- // ran out of pattern, still have file left.
771
- // this is only acceptable if we're on the very last
772
- // empty segment of a file with a trailing slash.
773
- // a/* should match a/b/
774
781
  return fi === fl - 1 && file[fi] === '';
775
782
  /* c8 ignore start */
776
783
  }
777
784
  else {
778
- // should be unreachable.
779
785
  throw new Error('wtf?');
780
786
  }
781
787
  /* c8 ignore stop */