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
@@ -97,13 +97,11 @@ packages:
97
97
  resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==}
98
98
  engines: {node: '>=12'}
99
99
 
100
- balanced-match@4.0.4:
101
- resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==}
102
- engines: {node: 18 || 20 || >=22}
100
+ balanced-match@1.0.2:
101
+ resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
103
102
 
104
- brace-expansion@5.0.3:
105
- resolution: {integrity: sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA==}
106
- engines: {node: 18 || 20 || >=22}
103
+ brace-expansion@2.0.2:
104
+ resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==}
107
105
 
108
106
  cacache@19.0.1:
109
107
  resolution: {integrity: sha512-hdsUxulXCi5STId78vRVYEtDAjq99ICAUktLTeTYsLoTE6Z8dS0c8pWNCxwdrk9YfJeobDZc2Y186hD/5ZQgFQ==}
@@ -224,8 +222,8 @@ packages:
224
222
  resolution: {integrity: sha512-QMjGbFTP0blj97EeidG5hk/QhKQ3T4ICckQGLgz38QF7Vgbk6e6FTARN8KhKxyBbWn8R0HU+bnw8aSoFPD4qtQ==}
225
223
  engines: {node: ^18.17.0 || >=20.5.0}
226
224
 
227
- minimatch@9.0.6:
228
- resolution: {integrity: sha512-kQAVowdR33euIqeA0+VZTDqU+qo1IeVY+hrKYtZMio3Pg0P0vuh/kwRylLUddJhB6pf3q/botcOvRtx4IN1wqQ==}
225
+ minimatch@9.0.9:
226
+ resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==}
229
227
  engines: {node: '>=16 || 14 >=14.17'}
230
228
 
231
229
  minipass-collect@2.0.1:
@@ -356,12 +354,12 @@ packages:
356
354
  resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
357
355
  engines: {node: '>=8'}
358
356
 
359
- strip-ansi@7.1.2:
360
- resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==}
357
+ strip-ansi@7.2.0:
358
+ resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==}
361
359
  engines: {node: '>=12'}
362
360
 
363
- tar@7.5.9:
364
- resolution: {integrity: sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==}
361
+ tar@7.5.10:
362
+ resolution: {integrity: sha512-8mOPs1//5q/rlkNSPcCegA6hiHJYDmSLEI8aMH/CdSQJNWztHC9WHNam5zdQlfpTwB9Xp7IBEsHfV5LKMJGVAw==}
365
363
  engines: {node: '>=18'}
366
364
 
367
365
  tinyglobby@0.2.15:
@@ -410,7 +408,7 @@ snapshots:
410
408
  dependencies:
411
409
  string-width: 5.1.2
412
410
  string-width-cjs: string-width@4.2.3
413
- strip-ansi: 7.1.2
411
+ strip-ansi: 7.2.0
414
412
  strip-ansi-cjs: strip-ansi@6.0.1
415
413
  wrap-ansi: 8.1.0
416
414
  wrap-ansi-cjs: wrap-ansi@7.0.0
@@ -460,12 +458,12 @@ snapshots:
460
458
  ansi-styles@6.2.3:
461
459
  optional: true
462
460
 
463
- balanced-match@4.0.4:
461
+ balanced-match@1.0.2:
464
462
  optional: true
465
463
 
466
- brace-expansion@5.0.3:
464
+ brace-expansion@2.0.2:
467
465
  dependencies:
468
- balanced-match: 4.0.4
466
+ balanced-match: 1.0.2
469
467
  optional: true
470
468
 
471
469
  cacache@19.0.1:
@@ -480,7 +478,7 @@ snapshots:
480
478
  minipass-pipeline: 1.2.4
481
479
  p-map: 7.0.4
482
480
  ssri: 12.0.0
483
- tar: 7.5.9
481
+ tar: 7.5.10
484
482
  unique-filename: 4.0.0
485
483
  optional: true
486
484
 
@@ -550,7 +548,7 @@ snapshots:
550
548
  dependencies:
551
549
  foreground-child: 3.3.1
552
550
  jackspeak: 3.4.3
553
- minimatch: 9.0.6
551
+ minimatch: 9.0.9
554
552
  minipass: 7.1.3
555
553
  package-json-from-dist: 1.0.1
556
554
  path-scurry: 1.11.1
@@ -625,9 +623,9 @@ snapshots:
625
623
  - supports-color
626
624
  optional: true
627
625
 
628
- minimatch@9.0.6:
626
+ minimatch@9.0.9:
629
627
  dependencies:
630
- brace-expansion: 5.0.3
628
+ brace-expansion: 2.0.2
631
629
  optional: true
632
630
 
633
631
  minipass-collect@2.0.1:
@@ -687,7 +685,7 @@ snapshots:
687
685
  nopt: 8.1.0
688
686
  proc-log: 5.0.0
689
687
  semver: 7.7.4
690
- tar: 7.5.9
688
+ tar: 7.5.10
691
689
  tinyglobby: 0.2.15
692
690
  which: 5.0.0
693
691
  transitivePeerDependencies:
@@ -780,7 +778,7 @@ snapshots:
780
778
  dependencies:
781
779
  eastasianwidth: 0.2.0
782
780
  emoji-regex: 9.2.2
783
- strip-ansi: 7.1.2
781
+ strip-ansi: 7.2.0
784
782
  optional: true
785
783
 
786
784
  strip-ansi@6.0.1:
@@ -788,12 +786,12 @@ snapshots:
788
786
  ansi-regex: 5.0.1
789
787
  optional: true
790
788
 
791
- strip-ansi@7.1.2:
789
+ strip-ansi@7.2.0:
792
790
  dependencies:
793
791
  ansi-regex: 6.2.2
794
792
  optional: true
795
793
 
796
- tar@7.5.9:
794
+ tar@7.5.10:
797
795
  dependencies:
798
796
  '@isaacs/fs-minipass': 4.0.1
799
797
  chownr: 3.0.0
@@ -841,7 +839,7 @@ snapshots:
841
839
  dependencies:
842
840
  ansi-styles: 6.2.3
843
841
  string-width: 5.1.2
844
- strip-ansi: 7.1.2
842
+ strip-ansi: 7.2.0
845
843
  optional: true
846
844
 
847
845
  yallist@4.0.0:
@@ -1,5 +1,5 @@
1
1
  {
2
- "lastValidatedTimestamp": 1771890867810,
2
+ "lastValidatedTimestamp": 1772926982962,
3
3
  "projects": {},
4
4
  "pnpmfiles": [],
5
5
  "settings": {
@@ -0,0 +1,2 @@
1
+ tidelift: "npm/balanced-match"
2
+ patreon: juliangruber
@@ -0,0 +1,62 @@
1
+ 'use strict';
2
+ module.exports = balanced;
3
+ function balanced(a, b, str) {
4
+ if (a instanceof RegExp) a = maybeMatch(a, str);
5
+ if (b instanceof RegExp) b = maybeMatch(b, str);
6
+
7
+ var r = range(a, b, str);
8
+
9
+ return r && {
10
+ start: r[0],
11
+ end: r[1],
12
+ pre: str.slice(0, r[0]),
13
+ body: str.slice(r[0] + a.length, r[1]),
14
+ post: str.slice(r[1] + b.length)
15
+ };
16
+ }
17
+
18
+ function maybeMatch(reg, str) {
19
+ var m = str.match(reg);
20
+ return m ? m[0] : null;
21
+ }
22
+
23
+ balanced.range = range;
24
+ function range(a, b, str) {
25
+ var begs, beg, left, right, result;
26
+ var ai = str.indexOf(a);
27
+ var bi = str.indexOf(b, ai + 1);
28
+ var i = ai;
29
+
30
+ if (ai >= 0 && bi > 0) {
31
+ if(a===b) {
32
+ return [ai, bi];
33
+ }
34
+ begs = [];
35
+ left = str.length;
36
+
37
+ while (i >= 0 && !result) {
38
+ if (i == ai) {
39
+ begs.push(i);
40
+ ai = str.indexOf(a, i + 1);
41
+ } else if (begs.length == 1) {
42
+ result = [ begs.pop(), bi ];
43
+ } else {
44
+ beg = begs.pop();
45
+ if (beg < left) {
46
+ left = beg;
47
+ right = bi;
48
+ }
49
+
50
+ bi = str.indexOf(b, i + 1);
51
+ }
52
+
53
+ i = ai < bi && ai >= 0 ? ai : bi;
54
+ }
55
+
56
+ if (begs.length) {
57
+ result = [ left, right ];
58
+ }
59
+ }
60
+
61
+ return result;
62
+ }
@@ -1,49 +1,20 @@
1
1
  {
2
2
  "name": "balanced-match",
3
3
  "description": "Match balanced character pairs, like \"{\" and \"}\"",
4
- "version": "4.0.4",
5
- "files": [
6
- "dist"
7
- ],
4
+ "version": "1.0.2",
8
5
  "repository": {
9
6
  "type": "git",
10
7
  "url": "git://github.com/juliangruber/balanced-match.git"
11
8
  },
12
- "exports": {
13
- "./package.json": "./package.json",
14
- ".": {
15
- "import": {
16
- "types": "./dist/esm/index.d.ts",
17
- "default": "./dist/esm/index.js"
18
- },
19
- "require": {
20
- "types": "./dist/commonjs/index.d.ts",
21
- "default": "./dist/commonjs/index.js"
22
- }
23
- }
24
- },
25
- "type": "module",
9
+ "homepage": "https://github.com/juliangruber/balanced-match",
10
+ "main": "index.js",
26
11
  "scripts": {
27
- "preversion": "npm test",
28
- "postversion": "npm publish",
29
- "prepublishOnly": "git push origin --follow-tags",
30
- "prepare": "tshy",
31
- "pretest": "npm run prepare",
32
- "presnap": "npm run prepare",
33
- "test": "tap",
34
- "snap": "tap",
35
- "format": "prettier --write .",
36
- "benchmark": "node benchmark/index.js",
37
- "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
12
+ "test": "tape test/test.js",
13
+ "bench": "matcha test/bench.js"
38
14
  },
39
15
  "devDependencies": {
40
- "@types/brace-expansion": "^1.1.2",
41
- "@types/node": "^25.2.1",
42
- "mkdirp": "^3.0.1",
43
- "prettier": "^3.3.2",
44
- "tap": "^21.6.2",
45
- "tshy": "^3.0.2",
46
- "typedoc": "^0.28.5"
16
+ "matcha": "^0.7.0",
17
+ "tape": "^4.6.0"
47
18
  },
48
19
  "keywords": [
49
20
  "match",
@@ -52,17 +23,26 @@
52
23
  "balanced",
53
24
  "parse"
54
25
  ],
55
- "license": "MIT",
56
- "engines": {
57
- "node": "18 || 20 || >=22"
26
+ "author": {
27
+ "name": "Julian Gruber",
28
+ "email": "mail@juliangruber.com",
29
+ "url": "http://juliangruber.com"
58
30
  },
59
- "tshy": {
60
- "exports": {
61
- "./package.json": "./package.json",
62
- ".": "./src/index.ts"
63
- }
64
- },
65
- "main": "./dist/commonjs/index.js",
66
- "types": "./dist/commonjs/index.d.ts",
67
- "module": "./dist/esm/index.js"
31
+ "license": "MIT",
32
+ "testling": {
33
+ "files": "test/*.js",
34
+ "browsers": [
35
+ "ie/8..latest",
36
+ "firefox/20..latest",
37
+ "firefox/nightly",
38
+ "chrome/25..latest",
39
+ "chrome/canary",
40
+ "opera/12..latest",
41
+ "opera/next",
42
+ "safari/5.1..latest",
43
+ "ipad/6.0..latest",
44
+ "iphone/6.0..latest",
45
+ "android-browser/4.2..latest"
46
+ ]
47
+ }
68
48
  }
@@ -0,0 +1,2 @@
1
+ tidelift: "npm/brace-expansion"
2
+ patreon: juliangruber
@@ -1,8 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright Julian Gruber <julian@juliangruber.com>
4
-
5
- TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
3
+ Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
6
4
 
7
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
8
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,203 @@
1
+ var balanced = require('balanced-match');
2
+
3
+ module.exports = expandTop;
4
+
5
+ var escSlash = '\0SLASH'+Math.random()+'\0';
6
+ var escOpen = '\0OPEN'+Math.random()+'\0';
7
+ var escClose = '\0CLOSE'+Math.random()+'\0';
8
+ var escComma = '\0COMMA'+Math.random()+'\0';
9
+ var escPeriod = '\0PERIOD'+Math.random()+'\0';
10
+
11
+ function numeric(str) {
12
+ return parseInt(str, 10) == str
13
+ ? parseInt(str, 10)
14
+ : str.charCodeAt(0);
15
+ }
16
+
17
+ function escapeBraces(str) {
18
+ return str.split('\\\\').join(escSlash)
19
+ .split('\\{').join(escOpen)
20
+ .split('\\}').join(escClose)
21
+ .split('\\,').join(escComma)
22
+ .split('\\.').join(escPeriod);
23
+ }
24
+
25
+ function unescapeBraces(str) {
26
+ return str.split(escSlash).join('\\')
27
+ .split(escOpen).join('{')
28
+ .split(escClose).join('}')
29
+ .split(escComma).join(',')
30
+ .split(escPeriod).join('.');
31
+ }
32
+
33
+
34
+ // Basically just str.split(","), but handling cases
35
+ // where we have nested braced sections, which should be
36
+ // treated as individual members, like {a,{b,c},d}
37
+ function parseCommaParts(str) {
38
+ if (!str)
39
+ return [''];
40
+
41
+ var parts = [];
42
+ var m = balanced('{', '}', str);
43
+
44
+ if (!m)
45
+ return str.split(',');
46
+
47
+ var pre = m.pre;
48
+ var body = m.body;
49
+ var post = m.post;
50
+ var p = pre.split(',');
51
+
52
+ p[p.length-1] += '{' + body + '}';
53
+ var postParts = parseCommaParts(post);
54
+ if (post.length) {
55
+ p[p.length-1] += postParts.shift();
56
+ p.push.apply(p, postParts);
57
+ }
58
+
59
+ parts.push.apply(parts, p);
60
+
61
+ return parts;
62
+ }
63
+
64
+ function expandTop(str) {
65
+ if (!str)
66
+ return [];
67
+
68
+ // I don't know why Bash 4.3 does this, but it does.
69
+ // Anything starting with {} will have the first two bytes preserved
70
+ // but *only* at the top level, so {},a}b will not expand to anything,
71
+ // but a{},b}c will be expanded to [a}c,abc].
72
+ // One could argue that this is a bug in Bash, but since the goal of
73
+ // this module is to match Bash's rules, we escape a leading {}
74
+ if (str.substr(0, 2) === '{}') {
75
+ str = '\\{\\}' + str.substr(2);
76
+ }
77
+
78
+ return expand(escapeBraces(str), true).map(unescapeBraces);
79
+ }
80
+
81
+ function embrace(str) {
82
+ return '{' + str + '}';
83
+ }
84
+ function isPadded(el) {
85
+ return /^-?0\d/.test(el);
86
+ }
87
+
88
+ function lte(i, y) {
89
+ return i <= y;
90
+ }
91
+ function gte(i, y) {
92
+ return i >= y;
93
+ }
94
+
95
+ function expand(str, isTop) {
96
+ var expansions = [];
97
+
98
+ var m = balanced('{', '}', str);
99
+ if (!m) return [str];
100
+
101
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
102
+ var pre = m.pre;
103
+ var post = m.post.length
104
+ ? expand(m.post, false)
105
+ : [''];
106
+
107
+ if (/\$$/.test(m.pre)) {
108
+ for (var k = 0; k < post.length; k++) {
109
+ var expansion = pre+ '{' + m.body + '}' + post[k];
110
+ expansions.push(expansion);
111
+ }
112
+ } else {
113
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
114
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
115
+ var isSequence = isNumericSequence || isAlphaSequence;
116
+ var isOptions = m.body.indexOf(',') >= 0;
117
+ if (!isSequence && !isOptions) {
118
+ // {a},b}
119
+ if (m.post.match(/,(?!,).*\}/)) {
120
+ str = m.pre + '{' + m.body + escClose + m.post;
121
+ return expand(str);
122
+ }
123
+ return [str];
124
+ }
125
+
126
+ var n;
127
+ if (isSequence) {
128
+ n = m.body.split(/\.\./);
129
+ } else {
130
+ n = parseCommaParts(m.body);
131
+ if (n.length === 1) {
132
+ // x{{a,b}}y ==> x{a}y x{b}y
133
+ n = expand(n[0], false).map(embrace);
134
+ if (n.length === 1) {
135
+ return post.map(function(p) {
136
+ return m.pre + n[0] + p;
137
+ });
138
+ }
139
+ }
140
+ }
141
+
142
+ // at this point, n is the parts, and we know it's not a comma set
143
+ // with a single entry.
144
+ var N;
145
+
146
+ if (isSequence) {
147
+ var x = numeric(n[0]);
148
+ var y = numeric(n[1]);
149
+ var width = Math.max(n[0].length, n[1].length)
150
+ var incr = n.length == 3
151
+ ? Math.abs(numeric(n[2]))
152
+ : 1;
153
+ var test = lte;
154
+ var reverse = y < x;
155
+ if (reverse) {
156
+ incr *= -1;
157
+ test = gte;
158
+ }
159
+ var pad = n.some(isPadded);
160
+
161
+ N = [];
162
+
163
+ for (var i = x; test(i, y); i += incr) {
164
+ var c;
165
+ if (isAlphaSequence) {
166
+ c = String.fromCharCode(i);
167
+ if (c === '\\')
168
+ c = '';
169
+ } else {
170
+ c = String(i);
171
+ if (pad) {
172
+ var need = width - c.length;
173
+ if (need > 0) {
174
+ var z = new Array(need + 1).join('0');
175
+ if (i < 0)
176
+ c = '-' + z + c.slice(1);
177
+ else
178
+ c = z + c;
179
+ }
180
+ }
181
+ }
182
+ N.push(c);
183
+ }
184
+ } else {
185
+ N = [];
186
+
187
+ for (var j = 0; j < n.length; j++) {
188
+ N.push.apply(N, expand(n[j], false));
189
+ }
190
+ }
191
+
192
+ for (var j = 0; j < N.length; j++) {
193
+ for (var k = 0; k < post.length; k++) {
194
+ var expansion = pre + N[j] + post[k];
195
+ if (!isTop || isSequence || expansion)
196
+ expansions.push(expansion);
197
+ }
198
+ }
199
+ }
200
+
201
+ return expansions;
202
+ }
203
+
@@ -1,64 +1,49 @@
1
1
  {
2
2
  "name": "brace-expansion",
3
3
  "description": "Brace expansion as known from sh/bash",
4
- "version": "5.0.3",
5
- "files": [
6
- "dist"
7
- ],
8
- "exports": {
9
- "./package.json": "./package.json",
10
- ".": {
11
- "import": {
12
- "types": "./dist/esm/index.d.ts",
13
- "default": "./dist/esm/index.js"
14
- },
15
- "require": {
16
- "types": "./dist/commonjs/index.d.ts",
17
- "default": "./dist/commonjs/index.js"
18
- }
19
- }
4
+ "version": "2.0.2",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git://github.com/juliangruber/brace-expansion.git"
20
8
  },
21
- "type": "module",
9
+ "homepage": "https://github.com/juliangruber/brace-expansion",
10
+ "main": "index.js",
22
11
  "scripts": {
23
- "preversion": "npm test",
24
- "postversion": "npm publish",
25
- "prepublishOnly": "git push origin --follow-tags",
26
- "prepare": "tshy",
27
- "pretest": "npm run prepare",
28
- "presnap": "npm run prepare",
29
- "test": "tap",
30
- "snap": "tap",
31
- "format": "prettier --write .",
32
- "benchmark": "node benchmark/index.js",
33
- "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
12
+ "test": "tape test/*.js",
13
+ "gentest": "bash test/generate.sh",
14
+ "bench": "matcha test/perf/bench.js"
15
+ },
16
+ "dependencies": {
17
+ "balanced-match": "^1.0.0"
34
18
  },
35
19
  "devDependencies": {
36
- "@types/brace-expansion": "^1.1.2",
37
- "@types/node": "^25.2.1",
38
- "mkdirp": "^3.0.1",
39
- "prettier": "^3.3.2",
40
- "tap": "^21.6.2",
41
- "tshy": "^3.0.2",
42
- "typedoc": "^0.28.5"
20
+ "@c4312/matcha": "^1.3.1",
21
+ "tape": "^4.6.0"
43
22
  },
44
- "dependencies": {
45
- "balanced-match": "^4.0.2"
23
+ "keywords": [],
24
+ "author": {
25
+ "name": "Julian Gruber",
26
+ "email": "mail@juliangruber.com",
27
+ "url": "http://juliangruber.com"
46
28
  },
47
29
  "license": "MIT",
48
- "engines": {
49
- "node": "18 || 20 || >=22"
50
- },
51
- "tshy": {
52
- "exports": {
53
- "./package.json": "./package.json",
54
- ".": "./src/index.ts"
55
- }
30
+ "testling": {
31
+ "files": "test/*.js",
32
+ "browsers": [
33
+ "ie/8..latest",
34
+ "firefox/20..latest",
35
+ "firefox/nightly",
36
+ "chrome/25..latest",
37
+ "chrome/canary",
38
+ "opera/12..latest",
39
+ "opera/next",
40
+ "safari/5.1..latest",
41
+ "ipad/6.0..latest",
42
+ "iphone/6.0..latest",
43
+ "android-browser/4.2..latest"
44
+ ]
56
45
  },
57
- "main": "./dist/commonjs/index.js",
58
- "types": "./dist/commonjs/index.d.ts",
59
- "module": "./dist/esm/index.js",
60
- "repository": {
61
- "type": "git",
62
- "url": "git+ssh://git@github.com/juliangruber/brace-expansion.git"
46
+ "publishConfig": {
47
+ "tag": "2.x"
63
48
  }
64
49
  }
@@ -1,6 +1,6 @@
1
1
  The ISC License
2
2
 
3
- Copyright (c) 2016-2022 Isaac Z. Schlueter and Contributors
3
+ Copyright (c) Isaac Z. Schlueter and Contributors
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above