korext 0.1.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 (517) hide show
  1. package/bin/korext.js +278 -0
  2. package/korext-cli-0.1.0.tgz +0 -0
  3. package/node_modules/ansi-regex/index.d.ts +37 -0
  4. package/node_modules/ansi-regex/index.js +10 -0
  5. package/node_modules/ansi-regex/license +9 -0
  6. package/node_modules/ansi-regex/package.json +55 -0
  7. package/node_modules/ansi-regex/readme.md +78 -0
  8. package/node_modules/ansi-styles/index.d.ts +345 -0
  9. package/node_modules/ansi-styles/index.js +163 -0
  10. package/node_modules/ansi-styles/license +9 -0
  11. package/node_modules/ansi-styles/package.json +56 -0
  12. package/node_modules/ansi-styles/readme.md +152 -0
  13. package/node_modules/balanced-match/LICENSE.md +23 -0
  14. package/node_modules/balanced-match/README.md +57 -0
  15. package/node_modules/balanced-match/dist/commonjs/index.d.ts +9 -0
  16. package/node_modules/balanced-match/dist/commonjs/index.d.ts.map +1 -0
  17. package/node_modules/balanced-match/dist/commonjs/index.js +59 -0
  18. package/node_modules/balanced-match/dist/commonjs/index.js.map +1 -0
  19. package/node_modules/balanced-match/dist/commonjs/package.json +3 -0
  20. package/node_modules/balanced-match/dist/esm/index.d.ts +9 -0
  21. package/node_modules/balanced-match/dist/esm/index.d.ts.map +1 -0
  22. package/node_modules/balanced-match/dist/esm/index.js +54 -0
  23. package/node_modules/balanced-match/dist/esm/index.js.map +1 -0
  24. package/node_modules/balanced-match/dist/esm/package.json +3 -0
  25. package/node_modules/balanced-match/package.json +68 -0
  26. package/node_modules/base64-js/LICENSE +21 -0
  27. package/node_modules/base64-js/README.md +34 -0
  28. package/node_modules/base64-js/base64js.min.js +1 -0
  29. package/node_modules/base64-js/index.d.ts +3 -0
  30. package/node_modules/base64-js/index.js +150 -0
  31. package/node_modules/base64-js/package.json +47 -0
  32. package/node_modules/bl/.travis.yml +17 -0
  33. package/node_modules/bl/BufferList.js +396 -0
  34. package/node_modules/bl/LICENSE.md +13 -0
  35. package/node_modules/bl/README.md +247 -0
  36. package/node_modules/bl/bl.js +84 -0
  37. package/node_modules/bl/package.json +37 -0
  38. package/node_modules/bl/test/convert.js +21 -0
  39. package/node_modules/bl/test/indexOf.js +492 -0
  40. package/node_modules/bl/test/isBufferList.js +32 -0
  41. package/node_modules/bl/test/test.js +869 -0
  42. package/node_modules/brace-expansion/LICENSE +23 -0
  43. package/node_modules/brace-expansion/README.md +94 -0
  44. package/node_modules/brace-expansion/dist/commonjs/index.d.ts +6 -0
  45. package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
  46. package/node_modules/brace-expansion/dist/commonjs/index.js +199 -0
  47. package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -0
  48. package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
  49. package/node_modules/brace-expansion/dist/esm/index.d.ts +6 -0
  50. package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -0
  51. package/node_modules/brace-expansion/dist/esm/index.js +195 -0
  52. package/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
  53. package/node_modules/brace-expansion/dist/esm/package.json +3 -0
  54. package/node_modules/brace-expansion/package.json +64 -0
  55. package/node_modules/buffer/AUTHORS.md +70 -0
  56. package/node_modules/buffer/LICENSE +21 -0
  57. package/node_modules/buffer/README.md +410 -0
  58. package/node_modules/buffer/index.d.ts +186 -0
  59. package/node_modules/buffer/index.js +1817 -0
  60. package/node_modules/buffer/package.json +96 -0
  61. package/node_modules/chalk/index.d.ts +415 -0
  62. package/node_modules/chalk/license +9 -0
  63. package/node_modules/chalk/package.json +68 -0
  64. package/node_modules/chalk/readme.md +341 -0
  65. package/node_modules/chalk/source/index.js +229 -0
  66. package/node_modules/chalk/source/templates.js +134 -0
  67. package/node_modules/chalk/source/util.js +39 -0
  68. package/node_modules/cli-cursor/index.d.ts +45 -0
  69. package/node_modules/cli-cursor/index.js +35 -0
  70. package/node_modules/cli-cursor/license +9 -0
  71. package/node_modules/cli-cursor/package.json +46 -0
  72. package/node_modules/cli-cursor/readme.md +55 -0
  73. package/node_modules/cli-spinners/index.d.ts +128 -0
  74. package/node_modules/cli-spinners/index.js +15 -0
  75. package/node_modules/cli-spinners/license +9 -0
  76. package/node_modules/cli-spinners/package.json +50 -0
  77. package/node_modules/cli-spinners/readme.md +54 -0
  78. package/node_modules/cli-spinners/spinners.json +1622 -0
  79. package/node_modules/clone/.npmignore +4 -0
  80. package/node_modules/clone/LICENSE +18 -0
  81. package/node_modules/clone/README.md +126 -0
  82. package/node_modules/clone/clone.iml +10 -0
  83. package/node_modules/clone/clone.js +166 -0
  84. package/node_modules/clone/package.json +51 -0
  85. package/node_modules/color-convert/CHANGELOG.md +54 -0
  86. package/node_modules/color-convert/LICENSE +21 -0
  87. package/node_modules/color-convert/README.md +68 -0
  88. package/node_modules/color-convert/conversions.js +839 -0
  89. package/node_modules/color-convert/index.js +81 -0
  90. package/node_modules/color-convert/package.json +48 -0
  91. package/node_modules/color-convert/route.js +97 -0
  92. package/node_modules/color-name/LICENSE +8 -0
  93. package/node_modules/color-name/README.md +11 -0
  94. package/node_modules/color-name/index.js +152 -0
  95. package/node_modules/color-name/package.json +28 -0
  96. package/node_modules/commander/LICENSE +22 -0
  97. package/node_modules/commander/Readme.md +1176 -0
  98. package/node_modules/commander/esm.mjs +16 -0
  99. package/node_modules/commander/index.js +24 -0
  100. package/node_modules/commander/lib/argument.js +150 -0
  101. package/node_modules/commander/lib/command.js +2777 -0
  102. package/node_modules/commander/lib/error.js +39 -0
  103. package/node_modules/commander/lib/help.js +747 -0
  104. package/node_modules/commander/lib/option.js +380 -0
  105. package/node_modules/commander/lib/suggestSimilar.js +101 -0
  106. package/node_modules/commander/package-support.json +19 -0
  107. package/node_modules/commander/package.json +82 -0
  108. package/node_modules/commander/typings/esm.d.mts +3 -0
  109. package/node_modules/commander/typings/index.d.ts +1113 -0
  110. package/node_modules/data-uri-to-buffer/README.md +88 -0
  111. package/node_modules/data-uri-to-buffer/dist/index.d.ts +15 -0
  112. package/node_modules/data-uri-to-buffer/dist/index.js +53 -0
  113. package/node_modules/data-uri-to-buffer/dist/index.js.map +1 -0
  114. package/node_modules/data-uri-to-buffer/package.json +62 -0
  115. package/node_modules/data-uri-to-buffer/src/index.ts +68 -0
  116. package/node_modules/defaults/LICENSE +22 -0
  117. package/node_modules/defaults/README.md +39 -0
  118. package/node_modules/defaults/index.js +13 -0
  119. package/node_modules/defaults/package.json +33 -0
  120. package/node_modules/defaults/test.js +34 -0
  121. package/node_modules/fetch-blob/LICENSE +21 -0
  122. package/node_modules/fetch-blob/README.md +106 -0
  123. package/node_modules/fetch-blob/file.d.ts +2 -0
  124. package/node_modules/fetch-blob/file.js +49 -0
  125. package/node_modules/fetch-blob/from.d.ts +26 -0
  126. package/node_modules/fetch-blob/from.js +100 -0
  127. package/node_modules/fetch-blob/index.d.ts +3 -0
  128. package/node_modules/fetch-blob/index.js +250 -0
  129. package/node_modules/fetch-blob/package.json +56 -0
  130. package/node_modules/fetch-blob/streams.cjs +51 -0
  131. package/node_modules/formdata-polyfill/FormData.js +441 -0
  132. package/node_modules/formdata-polyfill/LICENSE +21 -0
  133. package/node_modules/formdata-polyfill/README.md +145 -0
  134. package/node_modules/formdata-polyfill/esm.min.d.ts +5 -0
  135. package/node_modules/formdata-polyfill/esm.min.js +40 -0
  136. package/node_modules/formdata-polyfill/formdata-to-blob.js +39 -0
  137. package/node_modules/formdata-polyfill/formdata.min.js +21 -0
  138. package/node_modules/formdata-polyfill/package.json +50 -0
  139. package/node_modules/glob/LICENSE.md +63 -0
  140. package/node_modules/glob/README.md +1203 -0
  141. package/node_modules/glob/dist/commonjs/glob.d.ts +396 -0
  142. package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
  143. package/node_modules/glob/dist/commonjs/glob.js +248 -0
  144. package/node_modules/glob/dist/commonjs/glob.js.map +1 -0
  145. package/node_modules/glob/dist/commonjs/has-magic.d.ts +14 -0
  146. package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
  147. package/node_modules/glob/dist/commonjs/has-magic.js +27 -0
  148. package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
  149. package/node_modules/glob/dist/commonjs/ignore.d.ts +24 -0
  150. package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
  151. package/node_modules/glob/dist/commonjs/ignore.js +119 -0
  152. package/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
  153. package/node_modules/glob/dist/commonjs/index.d.ts +97 -0
  154. package/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
  155. package/node_modules/glob/dist/commonjs/index.js +68 -0
  156. package/node_modules/glob/dist/commonjs/index.js.map +1 -0
  157. package/node_modules/glob/dist/commonjs/index.min.js +4 -0
  158. package/node_modules/glob/dist/commonjs/index.min.js.map +7 -0
  159. package/node_modules/glob/dist/commonjs/package.json +3 -0
  160. package/node_modules/glob/dist/commonjs/pattern.d.ts +79 -0
  161. package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
  162. package/node_modules/glob/dist/commonjs/pattern.js +223 -0
  163. package/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
  164. package/node_modules/glob/dist/commonjs/processor.d.ts +59 -0
  165. package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
  166. package/node_modules/glob/dist/commonjs/processor.js +301 -0
  167. package/node_modules/glob/dist/commonjs/processor.js.map +1 -0
  168. package/node_modules/glob/dist/commonjs/walker.d.ts +97 -0
  169. package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
  170. package/node_modules/glob/dist/commonjs/walker.js +387 -0
  171. package/node_modules/glob/dist/commonjs/walker.js.map +1 -0
  172. package/node_modules/glob/dist/esm/glob.d.ts +396 -0
  173. package/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
  174. package/node_modules/glob/dist/esm/glob.js +244 -0
  175. package/node_modules/glob/dist/esm/glob.js.map +1 -0
  176. package/node_modules/glob/dist/esm/has-magic.d.ts +14 -0
  177. package/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
  178. package/node_modules/glob/dist/esm/has-magic.js +23 -0
  179. package/node_modules/glob/dist/esm/has-magic.js.map +1 -0
  180. package/node_modules/glob/dist/esm/ignore.d.ts +24 -0
  181. package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
  182. package/node_modules/glob/dist/esm/ignore.js +115 -0
  183. package/node_modules/glob/dist/esm/ignore.js.map +1 -0
  184. package/node_modules/glob/dist/esm/index.d.ts +97 -0
  185. package/node_modules/glob/dist/esm/index.d.ts.map +1 -0
  186. package/node_modules/glob/dist/esm/index.js +55 -0
  187. package/node_modules/glob/dist/esm/index.js.map +1 -0
  188. package/node_modules/glob/dist/esm/index.min.js +4 -0
  189. package/node_modules/glob/dist/esm/index.min.js.map +7 -0
  190. package/node_modules/glob/dist/esm/package.json +3 -0
  191. package/node_modules/glob/dist/esm/pattern.d.ts +79 -0
  192. package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
  193. package/node_modules/glob/dist/esm/pattern.js +219 -0
  194. package/node_modules/glob/dist/esm/pattern.js.map +1 -0
  195. package/node_modules/glob/dist/esm/processor.d.ts +59 -0
  196. package/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
  197. package/node_modules/glob/dist/esm/processor.js +294 -0
  198. package/node_modules/glob/dist/esm/processor.js.map +1 -0
  199. package/node_modules/glob/dist/esm/walker.d.ts +97 -0
  200. package/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
  201. package/node_modules/glob/dist/esm/walker.js +381 -0
  202. package/node_modules/glob/dist/esm/walker.js.map +1 -0
  203. package/node_modules/glob/package.json +98 -0
  204. package/node_modules/has-flag/index.d.ts +39 -0
  205. package/node_modules/has-flag/index.js +8 -0
  206. package/node_modules/has-flag/license +9 -0
  207. package/node_modules/has-flag/package.json +46 -0
  208. package/node_modules/has-flag/readme.md +89 -0
  209. package/node_modules/ieee754/LICENSE +11 -0
  210. package/node_modules/ieee754/README.md +51 -0
  211. package/node_modules/ieee754/index.d.ts +10 -0
  212. package/node_modules/ieee754/index.js +85 -0
  213. package/node_modules/ieee754/package.json +52 -0
  214. package/node_modules/inherits/LICENSE +16 -0
  215. package/node_modules/inherits/README.md +42 -0
  216. package/node_modules/inherits/inherits.js +9 -0
  217. package/node_modules/inherits/inherits_browser.js +27 -0
  218. package/node_modules/inherits/package.json +29 -0
  219. package/node_modules/is-interactive/index.d.ts +31 -0
  220. package/node_modules/is-interactive/index.js +9 -0
  221. package/node_modules/is-interactive/license +9 -0
  222. package/node_modules/is-interactive/package.json +38 -0
  223. package/node_modules/is-interactive/readme.md +51 -0
  224. package/node_modules/is-unicode-supported/index.d.ts +14 -0
  225. package/node_modules/is-unicode-supported/index.js +13 -0
  226. package/node_modules/is-unicode-supported/license +9 -0
  227. package/node_modules/is-unicode-supported/package.json +41 -0
  228. package/node_modules/is-unicode-supported/readme.md +35 -0
  229. package/node_modules/log-symbols/browser.js +8 -0
  230. package/node_modules/log-symbols/index.d.ts +25 -0
  231. package/node_modules/log-symbols/index.js +19 -0
  232. package/node_modules/log-symbols/license +9 -0
  233. package/node_modules/log-symbols/package.json +52 -0
  234. package/node_modules/log-symbols/readme.md +51 -0
  235. package/node_modules/lru-cache/LICENSE.md +55 -0
  236. package/node_modules/lru-cache/README.md +383 -0
  237. package/node_modules/lru-cache/dist/commonjs/index.d.ts +1323 -0
  238. package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
  239. package/node_modules/lru-cache/dist/commonjs/index.js +1595 -0
  240. package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
  241. package/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
  242. package/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
  243. package/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  244. package/node_modules/lru-cache/dist/esm/index.d.ts +1323 -0
  245. package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
  246. package/node_modules/lru-cache/dist/esm/index.js +1591 -0
  247. package/node_modules/lru-cache/dist/esm/index.js.map +1 -0
  248. package/node_modules/lru-cache/dist/esm/index.min.js +2 -0
  249. package/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
  250. package/node_modules/lru-cache/dist/esm/package.json +3 -0
  251. package/node_modules/lru-cache/package.json +93 -0
  252. package/node_modules/mimic-fn/index.d.ts +54 -0
  253. package/node_modules/mimic-fn/index.js +13 -0
  254. package/node_modules/mimic-fn/license +9 -0
  255. package/node_modules/mimic-fn/package.json +42 -0
  256. package/node_modules/mimic-fn/readme.md +69 -0
  257. package/node_modules/minimatch/LICENSE.md +55 -0
  258. package/node_modules/minimatch/README.md +528 -0
  259. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
  260. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  261. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  262. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  263. package/node_modules/minimatch/dist/commonjs/ast.d.ts +22 -0
  264. package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
  265. package/node_modules/minimatch/dist/commonjs/ast.js +846 -0
  266. package/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
  267. package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
  268. package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
  269. package/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
  270. package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
  271. package/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
  272. package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  273. package/node_modules/minimatch/dist/commonjs/escape.js +30 -0
  274. package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  275. package/node_modules/minimatch/dist/commonjs/index.d.ts +174 -0
  276. package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  277. package/node_modules/minimatch/dist/commonjs/index.js +1121 -0
  278. package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  279. package/node_modules/minimatch/dist/commonjs/package.json +3 -0
  280. package/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
  281. package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  282. package/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
  283. package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  284. package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
  285. package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  286. package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  287. package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  288. package/node_modules/minimatch/dist/esm/ast.d.ts +22 -0
  289. package/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
  290. package/node_modules/minimatch/dist/esm/ast.js +842 -0
  291. package/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  292. package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
  293. package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
  294. package/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
  295. package/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  296. package/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
  297. package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  298. package/node_modules/minimatch/dist/esm/escape.js +26 -0
  299. package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  300. package/node_modules/minimatch/dist/esm/index.d.ts +174 -0
  301. package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  302. package/node_modules/minimatch/dist/esm/index.js +1108 -0
  303. package/node_modules/minimatch/dist/esm/index.js.map +1 -0
  304. package/node_modules/minimatch/dist/esm/package.json +3 -0
  305. package/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
  306. package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  307. package/node_modules/minimatch/dist/esm/unescape.js +34 -0
  308. package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  309. package/node_modules/minimatch/package.json +67 -0
  310. package/node_modules/minipass/LICENSE.md +55 -0
  311. package/node_modules/minipass/README.md +825 -0
  312. package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
  313. package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  314. package/node_modules/minipass/dist/commonjs/index.js +1038 -0
  315. package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  316. package/node_modules/minipass/dist/commonjs/package.json +3 -0
  317. package/node_modules/minipass/dist/esm/index.d.ts +545 -0
  318. package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  319. package/node_modules/minipass/dist/esm/index.js +1020 -0
  320. package/node_modules/minipass/dist/esm/index.js.map +1 -0
  321. package/node_modules/minipass/dist/esm/package.json +3 -0
  322. package/node_modules/minipass/package.json +77 -0
  323. package/node_modules/node-domexception/.history/README_20210527203617.md +2 -0
  324. package/node_modules/node-domexception/.history/README_20210527212714.md +41 -0
  325. package/node_modules/node-domexception/.history/README_20210527213345.md +36 -0
  326. package/node_modules/node-domexception/.history/README_20210527213411.md +36 -0
  327. package/node_modules/node-domexception/.history/README_20210527213803.md +36 -0
  328. package/node_modules/node-domexception/.history/README_20210527214323.md +38 -0
  329. package/node_modules/node-domexception/.history/README_20210527214408.md +38 -0
  330. package/node_modules/node-domexception/.history/index_20210527203842.js +0 -0
  331. package/node_modules/node-domexception/.history/index_20210527203947.js +8 -0
  332. package/node_modules/node-domexception/.history/index_20210527204259.js +9 -0
  333. package/node_modules/node-domexception/.history/index_20210527204418.js +9 -0
  334. package/node_modules/node-domexception/.history/index_20210527204756.js +11 -0
  335. package/node_modules/node-domexception/.history/index_20210527204833.js +11 -0
  336. package/node_modules/node-domexception/.history/index_20210527211208.js +15 -0
  337. package/node_modules/node-domexception/.history/index_20210527211248.js +15 -0
  338. package/node_modules/node-domexception/.history/index_20210527212722.js +23 -0
  339. package/node_modules/node-domexception/.history/index_20210527212731.js +23 -0
  340. package/node_modules/node-domexception/.history/index_20210527212746.js +15 -0
  341. package/node_modules/node-domexception/.history/index_20210527212900.js +16 -0
  342. package/node_modules/node-domexception/.history/index_20210527213022.js +16 -0
  343. package/node_modules/node-domexception/.history/index_20210527213822.js +16 -0
  344. package/node_modules/node-domexception/.history/index_20210527213843.js +17 -0
  345. package/node_modules/node-domexception/.history/index_20210527213852.js +17 -0
  346. package/node_modules/node-domexception/.history/index_20210527213910.js +16 -0
  347. package/node_modules/node-domexception/.history/index_20210527214034.js +16 -0
  348. package/node_modules/node-domexception/.history/index_20210527214643.js +41 -0
  349. package/node_modules/node-domexception/.history/index_20210527214654.js +41 -0
  350. package/node_modules/node-domexception/.history/index_20210527214700.js +16 -0
  351. package/node_modules/node-domexception/.history/package_20210527203733.json +19 -0
  352. package/node_modules/node-domexception/.history/package_20210527203825.json +16 -0
  353. package/node_modules/node-domexception/.history/package_20210527204621.json +19 -0
  354. package/node_modules/node-domexception/.history/package_20210527204913.json +25 -0
  355. package/node_modules/node-domexception/.history/package_20210527204925.json +25 -0
  356. package/node_modules/node-domexception/.history/package_20210527205145.json +29 -0
  357. package/node_modules/node-domexception/.history/package_20210527205156.json +29 -0
  358. package/node_modules/node-domexception/.history/test_20210527205603.js +0 -0
  359. package/node_modules/node-domexception/.history/test_20210527205957.js +3 -0
  360. package/node_modules/node-domexception/.history/test_20210527210021.js +3 -0
  361. package/node_modules/node-domexception/LICENSE +21 -0
  362. package/node_modules/node-domexception/README.md +46 -0
  363. package/node_modules/node-domexception/index.js +16 -0
  364. package/node_modules/node-domexception/package.json +29 -0
  365. package/node_modules/node-fetch/@types/index.d.ts +219 -0
  366. package/node_modules/node-fetch/LICENSE.md +22 -0
  367. package/node_modules/node-fetch/README.md +872 -0
  368. package/node_modules/node-fetch/package.json +131 -0
  369. package/node_modules/node-fetch/src/body.js +397 -0
  370. package/node_modules/node-fetch/src/errors/abort-error.js +10 -0
  371. package/node_modules/node-fetch/src/errors/base.js +17 -0
  372. package/node_modules/node-fetch/src/errors/fetch-error.js +26 -0
  373. package/node_modules/node-fetch/src/headers.js +267 -0
  374. package/node_modules/node-fetch/src/index.js +417 -0
  375. package/node_modules/node-fetch/src/request.js +313 -0
  376. package/node_modules/node-fetch/src/response.js +160 -0
  377. package/node_modules/node-fetch/src/utils/get-search.js +9 -0
  378. package/node_modules/node-fetch/src/utils/is-redirect.js +11 -0
  379. package/node_modules/node-fetch/src/utils/is.js +87 -0
  380. package/node_modules/node-fetch/src/utils/multipart-parser.js +432 -0
  381. package/node_modules/node-fetch/src/utils/referrer.js +340 -0
  382. package/node_modules/onetime/index.d.ts +64 -0
  383. package/node_modules/onetime/index.js +44 -0
  384. package/node_modules/onetime/license +9 -0
  385. package/node_modules/onetime/package.json +43 -0
  386. package/node_modules/onetime/readme.md +94 -0
  387. package/node_modules/ora/index.d.ts +277 -0
  388. package/node_modules/ora/index.js +407 -0
  389. package/node_modules/ora/license +9 -0
  390. package/node_modules/ora/package.json +57 -0
  391. package/node_modules/ora/readme.md +264 -0
  392. package/node_modules/path-scurry/LICENSE.md +55 -0
  393. package/node_modules/path-scurry/README.md +636 -0
  394. package/node_modules/path-scurry/dist/commonjs/index.d.ts +1115 -0
  395. package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
  396. package/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
  397. package/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
  398. package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
  399. package/node_modules/path-scurry/dist/esm/index.d.ts +1115 -0
  400. package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
  401. package/node_modules/path-scurry/dist/esm/index.js +1983 -0
  402. package/node_modules/path-scurry/dist/esm/index.js.map +1 -0
  403. package/node_modules/path-scurry/dist/esm/package.json +3 -0
  404. package/node_modules/path-scurry/package.json +72 -0
  405. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  406. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  407. package/node_modules/readable-stream/LICENSE +47 -0
  408. package/node_modules/readable-stream/README.md +106 -0
  409. package/node_modules/readable-stream/errors-browser.js +127 -0
  410. package/node_modules/readable-stream/errors.js +116 -0
  411. package/node_modules/readable-stream/experimentalWarning.js +17 -0
  412. package/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
  413. package/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
  414. package/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
  415. package/node_modules/readable-stream/lib/_stream_transform.js +190 -0
  416. package/node_modules/readable-stream/lib/_stream_writable.js +641 -0
  417. package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
  418. package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
  419. package/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
  420. package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
  421. package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
  422. package/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
  423. package/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
  424. package/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
  425. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  426. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  427. package/node_modules/readable-stream/package.json +68 -0
  428. package/node_modules/readable-stream/readable-browser.js +9 -0
  429. package/node_modules/readable-stream/readable.js +16 -0
  430. package/node_modules/restore-cursor/index.d.ts +13 -0
  431. package/node_modules/restore-cursor/index.js +9 -0
  432. package/node_modules/restore-cursor/license +9 -0
  433. package/node_modules/restore-cursor/package.json +52 -0
  434. package/node_modules/restore-cursor/readme.md +26 -0
  435. package/node_modules/safe-buffer/LICENSE +21 -0
  436. package/node_modules/safe-buffer/README.md +584 -0
  437. package/node_modules/safe-buffer/index.d.ts +187 -0
  438. package/node_modules/safe-buffer/index.js +65 -0
  439. package/node_modules/safe-buffer/package.json +51 -0
  440. package/node_modules/signal-exit/LICENSE.txt +16 -0
  441. package/node_modules/signal-exit/README.md +39 -0
  442. package/node_modules/signal-exit/index.js +202 -0
  443. package/node_modules/signal-exit/package.json +38 -0
  444. package/node_modules/signal-exit/signals.js +53 -0
  445. package/node_modules/string_decoder/LICENSE +48 -0
  446. package/node_modules/string_decoder/README.md +47 -0
  447. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  448. package/node_modules/string_decoder/package.json +34 -0
  449. package/node_modules/strip-ansi/index.d.ts +17 -0
  450. package/node_modules/strip-ansi/index.js +4 -0
  451. package/node_modules/strip-ansi/license +9 -0
  452. package/node_modules/strip-ansi/package.json +54 -0
  453. package/node_modules/strip-ansi/readme.md +46 -0
  454. package/node_modules/supports-color/browser.js +5 -0
  455. package/node_modules/supports-color/index.js +135 -0
  456. package/node_modules/supports-color/license +9 -0
  457. package/node_modules/supports-color/package.json +53 -0
  458. package/node_modules/supports-color/readme.md +76 -0
  459. package/node_modules/util-deprecate/History.md +16 -0
  460. package/node_modules/util-deprecate/LICENSE +24 -0
  461. package/node_modules/util-deprecate/README.md +53 -0
  462. package/node_modules/util-deprecate/browser.js +67 -0
  463. package/node_modules/util-deprecate/node.js +6 -0
  464. package/node_modules/util-deprecate/package.json +27 -0
  465. package/node_modules/wcwidth/.npmignore +1 -0
  466. package/node_modules/wcwidth/LICENSE +30 -0
  467. package/node_modules/wcwidth/Readme.md +33 -0
  468. package/node_modules/wcwidth/combining.js +50 -0
  469. package/node_modules/wcwidth/docs/index.md +65 -0
  470. package/node_modules/wcwidth/index.js +99 -0
  471. package/node_modules/wcwidth/package.json +42 -0
  472. package/node_modules/wcwidth/test/index.js +64 -0
  473. package/node_modules/web-streams-polyfill/LICENSE +22 -0
  474. package/node_modules/web-streams-polyfill/README.md +110 -0
  475. package/node_modules/web-streams-polyfill/dist/polyfill.es2018.js +4765 -0
  476. package/node_modules/web-streams-polyfill/dist/polyfill.es2018.js.map +1 -0
  477. package/node_modules/web-streams-polyfill/dist/polyfill.es2018.min.js +9 -0
  478. package/node_modules/web-streams-polyfill/dist/polyfill.es2018.min.js.map +1 -0
  479. package/node_modules/web-streams-polyfill/dist/polyfill.es2018.mjs +4745 -0
  480. package/node_modules/web-streams-polyfill/dist/polyfill.es2018.mjs.map +1 -0
  481. package/node_modules/web-streams-polyfill/dist/polyfill.es6.js +4838 -0
  482. package/node_modules/web-streams-polyfill/dist/polyfill.es6.js.map +1 -0
  483. package/node_modules/web-streams-polyfill/dist/polyfill.es6.min.js +9 -0
  484. package/node_modules/web-streams-polyfill/dist/polyfill.es6.min.js.map +1 -0
  485. package/node_modules/web-streams-polyfill/dist/polyfill.es6.mjs +4818 -0
  486. package/node_modules/web-streams-polyfill/dist/polyfill.es6.mjs.map +1 -0
  487. package/node_modules/web-streams-polyfill/dist/polyfill.js +5011 -0
  488. package/node_modules/web-streams-polyfill/dist/polyfill.js.map +1 -0
  489. package/node_modules/web-streams-polyfill/dist/polyfill.min.js +9 -0
  490. package/node_modules/web-streams-polyfill/dist/polyfill.min.js.map +1 -0
  491. package/node_modules/web-streams-polyfill/dist/polyfill.mjs +4991 -0
  492. package/node_modules/web-streams-polyfill/dist/polyfill.mjs.map +1 -0
  493. package/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +4737 -0
  494. package/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -0
  495. package/node_modules/web-streams-polyfill/dist/ponyfill.es2018.mjs +4717 -0
  496. package/node_modules/web-streams-polyfill/dist/ponyfill.es2018.mjs.map +1 -0
  497. package/node_modules/web-streams-polyfill/dist/ponyfill.es6.js +4810 -0
  498. package/node_modules/web-streams-polyfill/dist/ponyfill.es6.js.map +1 -0
  499. package/node_modules/web-streams-polyfill/dist/ponyfill.es6.mjs +4790 -0
  500. package/node_modules/web-streams-polyfill/dist/ponyfill.es6.mjs.map +1 -0
  501. package/node_modules/web-streams-polyfill/dist/ponyfill.js +4983 -0
  502. package/node_modules/web-streams-polyfill/dist/ponyfill.js.map +1 -0
  503. package/node_modules/web-streams-polyfill/dist/ponyfill.mjs +4963 -0
  504. package/node_modules/web-streams-polyfill/dist/ponyfill.mjs.map +1 -0
  505. package/node_modules/web-streams-polyfill/dist/types/polyfill.d.ts +24 -0
  506. package/node_modules/web-streams-polyfill/dist/types/ponyfill.d.ts +780 -0
  507. package/node_modules/web-streams-polyfill/dist/types/ts3.6/polyfill.d.ts +28 -0
  508. package/node_modules/web-streams-polyfill/dist/types/ts3.6/ponyfill.d.ts +821 -0
  509. package/node_modules/web-streams-polyfill/dist/types/tsdoc-metadata.json +11 -0
  510. package/node_modules/web-streams-polyfill/es2018/package.json +14 -0
  511. package/node_modules/web-streams-polyfill/es6/package.json +14 -0
  512. package/node_modules/web-streams-polyfill/package.json +83 -0
  513. package/node_modules/web-streams-polyfill/ponyfill/es2018/package.json +13 -0
  514. package/node_modules/web-streams-polyfill/ponyfill/es6/package.json +13 -0
  515. package/node_modules/web-streams-polyfill/ponyfill/package.json +13 -0
  516. package/package.json +26 -0
  517. package/version.json +18 -0
@@ -0,0 +1,1203 @@
1
+ # Glob
2
+
3
+ Match files using the patterns the shell uses.
4
+
5
+ The most correct and second fastest glob implementation in
6
+ JavaScript. (See [**Comparison to Other JavaScript Glob
7
+ Implementations**](#comparisons-to-other-fnmatchglob-implementations)
8
+ at the bottom of this readme.)
9
+
10
+ ![a fun cartoon logo made of glob
11
+ characters](https://github.com/isaacs/node-glob/raw/main/logo/glob.png)
12
+
13
+ ## Usage
14
+
15
+ Install with npm
16
+
17
+ ```
18
+ npm i glob
19
+ ```
20
+
21
+ > [!NOTE]
22
+ > The npm package name is _not_ `node-glob` that's a
23
+ > different thing that was abandoned years ago. Just `glob`.
24
+
25
+ ```js
26
+ // load using import
27
+ import { glob, globSync, globStream, globStreamSync, Glob } from 'glob'
28
+ // or using commonjs, that's fine, too
29
+ const {
30
+ glob,
31
+ globSync,
32
+ globStream,
33
+ globStreamSync,
34
+ Glob,
35
+ } = require('glob')
36
+
37
+ // the main glob() and globSync() resolve/return array of filenames
38
+
39
+ // all js files, but don't look in node_modules
40
+ const jsfiles = await glob('**/*.js', { ignore: 'node_modules/**' })
41
+
42
+ // pass in a signal to cancel the glob walk
43
+ const stopAfter100ms = await glob('**/*.css', {
44
+ signal: AbortSignal.timeout(100),
45
+ })
46
+
47
+ // multiple patterns supported as well
48
+ const images = await glob(['css/*.{png,jpeg}', 'public/*.{png,jpeg}'])
49
+
50
+ // but of course you can do that with the glob pattern also
51
+ // the sync function is the same, just returns a string[] instead
52
+ // of Promise<string[]>
53
+ const imagesAlt = globSync('{css,public}/*.{png,jpeg}')
54
+
55
+ // you can also stream them, this is a Minipass stream
56
+ const filesStream = globStream(['**/*.dat', 'logs/**/*.log'])
57
+
58
+ // construct a Glob object if you wanna do it that way, which
59
+ // allows for much faster walks if you have to look in the same
60
+ // folder multiple times.
61
+ const g = new Glob('**/foo', {})
62
+ // glob objects are async iterators, can also do globIterate() or
63
+ // g.iterate(), same deal
64
+ for await (const file of g) {
65
+ console.log('found a foo file:', file)
66
+ }
67
+ // pass a glob as the glob options to reuse its settings and caches
68
+ const g2 = new Glob('**/bar', g)
69
+ // sync iteration works as well
70
+ for (const file of g2) {
71
+ console.log('found a bar file:', file)
72
+ }
73
+
74
+ // you can also pass withFileTypes: true to get Path objects
75
+ // these are like a fs.Dirent, but with some more added powers
76
+ // check out https://isaacs.github.io/path-scurry/classes/PathBase.html
77
+ // for more info on their API
78
+ const g3 = new Glob('**/baz/**', { withFileTypes: true })
79
+ g3.stream().on('data', path => {
80
+ console.log(
81
+ 'got a path object',
82
+ path.fullpath(),
83
+ path.isDirectory(),
84
+ path.readdirSync().map(e => e.name),
85
+ )
86
+ })
87
+
88
+ // if you use stat:true and withFileTypes, you can sort results
89
+ // by things like modified time, filter by permission mode, etc.
90
+ // All Stats fields will be available in that case. Slightly
91
+ // slower, though.
92
+ // For example:
93
+ const results = await glob('**', { stat: true, withFileTypes: true })
94
+
95
+ const timeSortedFiles = results
96
+ .sort((a, b) => a.mtimeMs - b.mtimeMs)
97
+ .map(path => path.fullpath())
98
+
99
+ const groupReadableFiles = results
100
+ .filter(path => path.mode & 0o040)
101
+ .map(path => path.fullpath())
102
+
103
+ // custom ignores can be done like this, for example by saying
104
+ // you'll ignore all markdown files, and all folders named 'docs'
105
+ const customIgnoreResults = await glob('**', {
106
+ ignore: {
107
+ ignored: p => /\.md$/.test(p.name),
108
+ childrenIgnored: p => p.isNamed('docs'),
109
+ },
110
+ })
111
+
112
+ // another fun use case, only return files with the same name as
113
+ // their parent folder, plus either `.ts` or `.js`
114
+ const folderNamedModules = await glob('**/*.{ts,js}', {
115
+ ignore: {
116
+ ignored: p => {
117
+ const pp = p.parent
118
+ return !(p.isNamed(pp.name + '.ts') || p.isNamed(pp.name + '.js'))
119
+ },
120
+ },
121
+ })
122
+
123
+ // find all files edited in the last hour, to do this, we ignore
124
+ // all of them that are more than an hour old
125
+ const newFiles = await glob('**', {
126
+ // need stat so we have mtime
127
+ stat: true,
128
+ // only want the files, not the dirs
129
+ nodir: true,
130
+ ignore: {
131
+ ignored: p => {
132
+ return new Date() - p.mtime > 60 * 60 * 1000
133
+ },
134
+ // could add similar childrenIgnored here as well, but
135
+ // directory mtime is inconsistent across platforms, so
136
+ // probably better not to, unless you know the system
137
+ // tracks this reliably.
138
+ },
139
+ })
140
+ ```
141
+
142
+ > [!NOTE]
143
+ > Glob patterns should always use `/` as a path separator,
144
+ > even on Windows systems, as `\` is used to escape glob
145
+ > characters. If you wish to use `\` as a path separator _instead
146
+ > of_ using it as an escape character on Windows platforms, you may
147
+ > set `windowsPathsNoEscape:true` in the options. In this mode,
148
+ > special glob characters cannot be escaped, making it impossible
149
+ > to match a literal `*` `?` and so on in filenames.
150
+
151
+ ## Command Line Interface
152
+
153
+ The glob CLI has been moved to the `glob-bin` package, and must
154
+ be installed separately, as of version 13.
155
+
156
+ ```
157
+ npm install glob-bin
158
+ ```
159
+
160
+ ## `glob(pattern: string | string[], options?: GlobOptions) => Promise<string[] | Path[]>`
161
+
162
+ Perform an asynchronous glob search for the pattern(s) specified.
163
+ Returns
164
+ [Path](https://isaacs.github.io/path-scurry/classes/PathBase)
165
+ objects if the `withFileTypes` option is set to `true`. See below
166
+ for full options field desciptions.
167
+
168
+ ## `globSync(pattern: string | string[], options?: GlobOptions) => string[] | Path[]`
169
+
170
+ Synchronous form of `glob()`.
171
+
172
+ Alias: `glob.sync()`
173
+
174
+ ## `globIterate(pattern: string | string[], options?: GlobOptions) => AsyncGenerator<string>`
175
+
176
+ Return an async iterator for walking glob pattern matches.
177
+
178
+ Alias: `glob.iterate()`
179
+
180
+ ## `globIterateSync(pattern: string | string[], options?: GlobOptions) => Generator<string>`
181
+
182
+ Return a sync iterator for walking glob pattern matches.
183
+
184
+ Alias: `glob.iterate.sync()`, `glob.sync.iterate()`
185
+
186
+ ## `globStream(pattern: string | string[], options?: GlobOptions) => Minipass<string | Path>`
187
+
188
+ Return a stream that emits all the strings or `Path` objects and
189
+ then emits `end` when completed.
190
+
191
+ Alias: `glob.stream()`
192
+
193
+ ## `globStreamSync(pattern: string | string[], options?: GlobOptions) => Minipass<string | Path>`
194
+
195
+ Syncronous form of `globStream()`. Will read all the matches as
196
+ fast as you consume them, even all in a single tick if you
197
+ consume them immediately, but will still respond to backpressure
198
+ if they're not consumed immediately.
199
+
200
+ Alias: `glob.stream.sync()`, `glob.sync.stream()`
201
+
202
+ ## `hasMagic(pattern: string | string[], options?: GlobOptions) => boolean`
203
+
204
+ Returns `true` if the provided pattern contains any "magic" glob
205
+ characters, given the options provided.
206
+
207
+ Brace expansion is not considered "magic" unless the
208
+ `magicalBraces` option is set, as brace expansion just turns one
209
+ string into an array of strings. So a pattern like `'x{a,b}y'`
210
+ would return `false`, because `'xay'` and `'xby'` both do not
211
+ contain any magic glob characters, and it's treated the same as
212
+ if you had called it on `['xay', 'xby']`. When
213
+ `magicalBraces:true` is in the options, brace expansion _is_
214
+ treated as a pattern having magic.
215
+
216
+ ## `escape(pattern: string, options?: GlobOptions) => string`
217
+
218
+ Escape all magic characters in a glob pattern, so that it will
219
+ only ever match literal strings
220
+
221
+ If the `windowsPathsNoEscape` option is used, then characters are
222
+ escaped by wrapping in `[]`, because a magic character wrapped in
223
+ a character class can only be satisfied by that exact character.
224
+
225
+ Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot
226
+ be escaped or unescaped.
227
+
228
+ ## `unescape(pattern: string, options?: GlobOptions) => string`
229
+
230
+ Un-escape a glob string that may contain some escaped characters.
231
+
232
+ If the `windowsPathsNoEscape` option is used, then square-brace
233
+ escapes are removed, but not backslash escapes. For example, it
234
+ will turn the string `'[*]'` into `*`, but it will not turn
235
+ `'\\*'` into `'*'`, because `\` is a path separator in
236
+ `windowsPathsNoEscape` mode.
237
+
238
+ When `windowsPathsNoEscape` is not set, then both brace escapes
239
+ and backslash escapes are removed.
240
+
241
+ Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot
242
+ be escaped or unescaped.
243
+
244
+ ## Class `Glob`
245
+
246
+ An object that can perform glob pattern traversals.
247
+
248
+ ### `const g = new Glob(pattern: string | string[], options: GlobOptions)`
249
+
250
+ Options object is required.
251
+
252
+ See full options descriptions below.
253
+
254
+ > [!NOTE]
255
+ > A previous `Glob` object can be passed as the
256
+ > `GlobOptions` to another `Glob` instantiation to re-use settings
257
+ > and caches with a new pattern.
258
+
259
+ Traversal functions can be called multiple times to run the walk
260
+ again.
261
+
262
+ ### `g.stream()`
263
+
264
+ Stream results asynchronously.
265
+
266
+ ### `g.streamSync()`
267
+
268
+ Stream results synchronously.
269
+
270
+ ### `g.iterate()`
271
+
272
+ Default async iteration function. Returns an AsyncGenerator that
273
+ iterates over the results.
274
+
275
+ ### `g.iterateSync()`
276
+
277
+ Default sync iteration function. Returns a Generator that
278
+ iterates over the results.
279
+
280
+ ### `g.walk()`
281
+
282
+ Returns a Promise that resolves to the results array.
283
+
284
+ ### `g.walkSync()`
285
+
286
+ Returns a results array.
287
+
288
+ ### Properties
289
+
290
+ All options are stored as properties on the `Glob` object.
291
+
292
+ - `opts` The options provided to the constructor.
293
+ - `patterns` An array of parsed immutable `Pattern` objects.
294
+
295
+ ## Options
296
+
297
+ Exported as `GlobOptions` TypeScript interface. A `GlobOptions`
298
+ object may be provided to any of the exported methods, and must
299
+ be provided to the `Glob` constructor.
300
+
301
+ All options are optional, boolean, and false by default, unless
302
+ otherwise noted.
303
+
304
+ All resolved options are added to the Glob object as properties.
305
+
306
+ If you are running many `glob` operations, you can pass a Glob
307
+ object as the `options` argument to a subsequent operation to
308
+ share the previously loaded cache.
309
+
310
+ - `cwd` String path or `file://` string or URL object. The
311
+ current working directory in which to search. Defaults to
312
+ `process.cwd()`. See also: "Windows, CWDs, Drive Letters, and
313
+ UNC Paths", below.
314
+
315
+ This option may be either a string path or a `file://` URL
316
+ object or string.
317
+
318
+ - `root` A string path resolved against the `cwd` option, which
319
+ is used as the starting point for absolute patterns that start
320
+ with `/`, (but not drive letters or UNC paths on Windows).
321
+
322
+ To start absolute and non-absolute patterns in the same path,
323
+ you can use `{root:''}`. However, be aware that on Windows
324
+ systems, a pattern like `x:/*` or `//host/share/*` will
325
+ _always_ start in the `x:/` or `//host/share` directory,
326
+ regardless of the `root` setting.
327
+
328
+ > [!NOTE] This _doesn't_ necessarily limit the walk to the
329
+ > `root` directory, and doesn't affect the cwd starting point
330
+ > for non-absolute patterns. A pattern containing `..` will
331
+ > still be able to traverse out of the root directory, if it
332
+ > is not an actual root directory on the filesystem, and any
333
+ > non-absolute patterns will be matched in the `cwd`. For
334
+ > example, the pattern `/../*` with `{root:'/some/path'}`
335
+ > will return all files in `/some`, not all files in
336
+ > `/some/path`. The pattern `*` with `{root:'/some/path'}`
337
+ > will return all the entries in the cwd, not the entries in
338
+ > `/some/path`.
339
+
340
+ - `windowsPathsNoEscape` Use `\\` as a path separator _only_, and
341
+ _never_ as an escape character. If set, all `\\` characters are
342
+ replaced with `/` in the pattern.
343
+
344
+ > [!NOTE]
345
+ > This makes it **impossible** to match against paths
346
+ > containing literal glob pattern characters, but allows matching
347
+ > with patterns constructed using `path.join()` and
348
+ > `path.resolve()` on Windows platforms, mimicking the (buggy!)
349
+ > behavior of Glob v7 and before on Windows. Please use with
350
+ > caution, and be mindful of [the caveat below about Windows
351
+ > paths](#windows). (For legacy reasons, this is also set if
352
+ > `allowWindowsEscape` is set to the exact value `false`.)
353
+
354
+ - `dot` Include `.dot` files in normal matches and `globstar`
355
+ matches. Note that an explicit dot in a portion of the pattern
356
+ will always match dot files.
357
+
358
+ - `magicalBraces` Treat brace expansion like `{a,b}` as a "magic"
359
+ pattern. Has no effect if {@link nobrace} is set.
360
+
361
+ Only has effect on the {@link hasMagic} function, no effect on
362
+ glob pattern matching itself.
363
+
364
+ - `dotRelative` Prepend all relative path strings with `./` (or
365
+ `.\` on Windows).
366
+
367
+ Without this option, returned relative paths are "bare", so
368
+ instead of returning `'./foo/bar'`, they are returned as
369
+ `'foo/bar'`.
370
+
371
+ Relative patterns starting with `'../'` are not prepended with
372
+ `./`, even if this option is set.
373
+
374
+ - `mark` Add a `/` character to directory matches. Note that this
375
+ requires additional stat calls.
376
+
377
+ - `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
378
+
379
+ - `noglobstar` Do not match `**` against multiple filenames. (Ie,
380
+ treat it as a normal `*` instead.)
381
+
382
+ - `noext` Do not match "extglob" patterns such as `+(a|b)`.
383
+
384
+ - `nocase` Perform a case-insensitive match. This defaults to
385
+ `true` on macOS and Windows systems, and `false` on all others.
386
+
387
+ > [!NOTE]
388
+ > `nocase` should only be explicitly set when it is known that
389
+ > the filesystem's case sensitivity differs from the platform
390
+ > default. If set `true` on case-sensitive file systems, or
391
+ > `false` on case-insensitive file systems, then the walk may
392
+ > return more or less results than expected.
393
+ >
394
+ > As a shortcut to avoid excessive `RegExp` creations, `Glob`
395
+ > will use string portions as-is to `readdir()` calls while doing
396
+ > its traversal. If you are setting a `nocase: true` match on a
397
+ > file system that is in fact case sensitive, then this will
398
+ > result in matches not being found that you might expect,
399
+ > because for example the pattern `Foo/*` will fail to read the
400
+ > `FOO/` or `foo/` directories.
401
+ >
402
+ > On the other hand, if you set `nocase: false` on a
403
+ > case-_insensitive_ system, then the opposite problem occurs:
404
+ > `Foo/*` will match `foo/bar`, but because we only detect the
405
+ > existence of the `foo/` folder by successfully performing a
406
+ > `readdir`, there's no way to know what the "real" case is, and
407
+ > the match will be reported as `Foo/bar`, using the case of the
408
+ > string portion of the glob pattern.
409
+ >
410
+ > The default is usually correct, however it _is_ possible to
411
+ > mount file systems with a different case-sensitivity from the
412
+ > host system. If you know this is the case, set this flag
413
+ > appropriately to the file system you are searching.
414
+
415
+ - `maxDepth` Specify a number to limit the depth of the directory
416
+ traversal to this many levels below the `cwd`.
417
+
418
+ - `matchBase` Perform a basename-only match if the pattern does
419
+ not contain any slash characters. That is, `*.js` would be
420
+ treated as equivalent to `**/*.js`, matching all js files in
421
+ all directories.
422
+
423
+ - `nodir` Do not match directories, only files. (Note: to match
424
+ _only_ directories, put a `/` at the end of the pattern.)
425
+
426
+ > [!NOTE]
427
+ > When `follow` and `nodir` are both set, then symbolic
428
+ > links to directories are also omitted.
429
+
430
+ - `stat` Call `lstat()` on all entries, whether required or not
431
+ to determine whether it's a valid match. When used with
432
+ `withFileTypes`, this means that matches will include data such
433
+ as modified time, permissions, and so on. Note that this will
434
+ incur a performance cost due to the added system calls.
435
+
436
+ - `ignore` string or string[], or an object with `ignored` and
437
+ `childrenIgnored` methods.
438
+
439
+ If a string or string[] is provided, then this is treated as
440
+ a glob pattern or array of glob patterns to exclude from
441
+ matches. To ignore all children within a directory, as well
442
+ as the entry itself, append `'/**'` to the ignore pattern.
443
+
444
+ If an object is provided that has `ignored(path)` and/or
445
+ `childrenIgnored(path)` methods, then these methods will be
446
+ called to determine whether any Path is a match or if its
447
+ children should be traversed, respectively.
448
+
449
+ The `path` argument to the methods will be a
450
+ [`path-scurry`](https://isaacs.github.io/path-scurry/index.html)
451
+ [`Path`](https://isaacs.github.io/path-scurry/classes/PathBase)
452
+ object, which extends
453
+ [`fs.Dirent`](https://nodejs.org/docs/latest/api/fs.html#class-fsdirent)
454
+ with additional useful methods like
455
+ [`.fullpath()`](https://isaacs.github.io/path-scurry/classes/PathBase.html#fullpath),
456
+ [`.relative()`](https://isaacs.github.io/path-scurry/classes/PathBase.html#relative),
457
+ and more.
458
+
459
+ > [!NOTE]
460
+ > `ignore` patterns are _always_ in `dot:true` mode,
461
+ > regardless of any other settings.
462
+
463
+ - `follow` Follow symlinked directories when expanding `**`
464
+ patterns. This can result in a lot of duplicate references in
465
+ the presence of cyclic links, and make performance quite bad.
466
+
467
+ By default, a `**` in a pattern will follow 1 symbolic link if
468
+ it is not the first item in the pattern, or none if it is the
469
+ first item in the pattern, following the same behavior as Bash.
470
+
471
+ > [!NOTE]
472
+ > When `follow` and `nodir` are both set, then symbolic
473
+ > links to directories are also omitted.
474
+
475
+ - `realpath` Set to true to call `fs.realpath` on all of the
476
+ results. In the case of an entry that cannot be resolved, the
477
+ entry is omitted. This incurs a slight performance penalty, of
478
+ course, because of the added system calls.
479
+
480
+ - `absolute` Set to true to always receive absolute paths for
481
+ matched files. Set to `false` to always receive relative paths
482
+ for matched files.
483
+
484
+ By default, when this option is not set, absolute paths are
485
+ returned for patterns that are absolute, and otherwise paths
486
+ are returned that are relative to the `cwd` setting.
487
+
488
+ This does _not_ make an extra system call to get the realpath,
489
+ it only does string path resolution.
490
+
491
+ `absolute` may not be used along with `withFileTypes`.
492
+
493
+ - `posix` Set to true to use `/` as the path separator in
494
+ returned results. On POSIX systems, this has no effect. On
495
+ Windows systems, this will return `/` delimited path results,
496
+ and absolute paths will be returned in their fully resolved UNC
497
+ path form, e.g. instead of `'C:\\foo\\bar'`, it will return
498
+ `//?/C:/foo/bar`.
499
+
500
+ - `platform` Defaults to the value of `process.platform` if
501
+ available, or `'linux'` if not. Setting `platform:'win32'` on
502
+ non-Windows systems may cause strange behavior.
503
+
504
+ - `withFileTypes` Return
505
+ [`path-scurry`](http://npm.im/path-scurry)
506
+ [`Path`](https://isaacs.github.io/path-scurry/classes/PathBase.html)
507
+ objects instead of strings. These are similar to a NodeJS
508
+ `fs.Dirent` object, but with additional methods and properties.
509
+
510
+ `withFileTypes` may not be used along with `absolute`.
511
+
512
+ - `signal` An AbortSignal which will cancel the Glob walk when
513
+ triggered.
514
+
515
+ - `fs` An override object to pass in custom filesystem methods.
516
+ See [`path-scurry`
517
+ docs](https://isaacs.github.io/path-scurry/interfaces/FSOption.html)
518
+ for what can be overridden.
519
+
520
+ - `scurry` A
521
+ [`PathScurry`](https://isaacs.github.io/path-scurry/classes/PathScurryBase.html)
522
+ object used to traverse the file system. If the `nocase` option
523
+ is set explicitly, then any provided `scurry` object must match
524
+ this setting.
525
+
526
+ - `includeChildMatches` boolean, default `true`. Do not match any
527
+ children of any matches. For example, the pattern `**\/foo`
528
+ would match `a/foo`, but not `a/foo/b/foo` in this mode.
529
+
530
+ This is especially useful for cases like "find all
531
+ `node_modules` folders, but not the ones in `node_modules`".
532
+
533
+ In order to support this, the `Ignore` implementation must
534
+ support an `add(pattern: string)` method. If using the default
535
+ `Ignore` class, then this is fine, but if this is set to
536
+ `false`, and a custom `Ignore` is provided that does not have
537
+ an `add()` method, then it will throw an error.
538
+
539
+ For example:
540
+
541
+ ```js
542
+ const results = await glob(
543
+ [
544
+ // likely to match first, since it's just a stat
545
+ 'a/b/c/d/e/f',
546
+
547
+ // this pattern is more complicated! It must to various readdir()
548
+ // calls and test the results against a regular expression, and that
549
+ // is certainly going to take a little bit longer.
550
+ //
551
+ // So, later on, it encounters a match at 'a/b/c/d/e', but it's too
552
+ // late to ignore a/b/c/d/e/f, because it's already been emitted.
553
+ 'a/[bdf]/?/[a-z]/*',
554
+ ],
555
+ { includeChildMatches: false },
556
+ )
557
+ ```
558
+
559
+ It's best to only set this to `false` if you can be reasonably
560
+ sure that no components of the pattern will potentially match
561
+ one another's file system descendants, or if the occasional
562
+ included child entry will not cause problems.
563
+
564
+ > [!NOTE]
565
+ > It _only_ ignores matches that would be a descendant
566
+ > of a previous match, and only if that descendant is matched
567
+ > _after_ the ancestor is encountered. Since the file system walk
568
+ > happens in indeterminate order, it's possible that a match will
569
+ > already be added before its ancestor, if multiple or braced
570
+ > patterns are used.
571
+
572
+ - `braceExpandMax` number, defaults to `10_000`. This is the
573
+ maximum number of `{x,y,...}` patterns to expand. It is very
574
+ unlikely that you'll need more than this, and setting it higher
575
+ exposes the system to out-of-memory errors.
576
+
577
+ ## Glob Primer
578
+
579
+ Much more information about glob pattern expansion can be found
580
+ by running `man bash` and searching for `Pattern Matching`.
581
+
582
+ "Globs" are the patterns you type when you do stuff like `ls
583
+ *.js` on the command line, or put `build/*` in a `.gitignore`
584
+ file.
585
+
586
+ Before parsing the path part patterns, braced sections are
587
+ expanded into a set. Braced sections start with `{` and end with
588
+ `}`, with 2 or more comma-delimited sections within. Braced
589
+ sections may contain slash characters, so `a{/b/c,bcd}` would
590
+ expand into `a/b/c` and `abcd`.
591
+
592
+ The following characters have special magic meaning when used in
593
+ a path portion. With the exception of `**`, none of these match
594
+ path separators (ie, `/` on all platforms, and `\` on Windows).
595
+
596
+ - `*` Matches 0 or more characters in a single path portion.
597
+ When alone in a path portion, it must match at least 1
598
+ character. If `dot:true` is not specified, then `*` will not
599
+ match against a `.` character at the start of a path portion.
600
+ - `?` Matches 1 character. If `dot:true` is not specified, then
601
+ `?` will not match against a `.` character at the start of a
602
+ path portion.
603
+ - `[...]` Matches a range of characters, similar to a RegExp
604
+ range. If the first character of the range is `!` or `^` then
605
+ it matches any character not in the range. If the first
606
+ character is `]`, then it will be considered the same as `\]`,
607
+ rather than the end of the character class.
608
+ - `!(pattern|pattern|pattern)` Matches anything that does not
609
+ match any of the patterns provided. May _not_ contain `/`
610
+ characters. Similar to `*`, if alone in a path portion, then
611
+ the path portion must have at least one character.
612
+ - `?(pattern|pattern|pattern)` Matches zero or one occurrence of
613
+ the patterns provided. May _not_ contain `/` characters.
614
+ - `+(pattern|pattern|pattern)` Matches one or more occurrences of
615
+ the patterns provided. May _not_ contain `/` characters.
616
+ - `*(a|b|c)` Matches zero or more occurrences of the patterns
617
+ provided. May _not_ contain `/` characters.
618
+ - `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
619
+ provided. May _not_ contain `/` characters.
620
+ - `**` If a "globstar" is alone in a path portion, then it
621
+ matches zero or more directories and subdirectories searching
622
+ for matches. It does not crawl symlinked directories, unless
623
+ `{follow:true}` is passed in the options object. A pattern
624
+ like `a/b/**` will only match `a/b` if it is a directory.
625
+ Follows 1 symbolic link if not the first item in the pattern,
626
+ or 0 if it is the first item, unless `follow:true` is set, in
627
+ which case it follows all symbolic links.
628
+
629
+ `[:class:]` patterns are supported by this implementation, but
630
+ `[=c=]` and `[.symbol.]` style class patterns are not.
631
+
632
+ ### Dots
633
+
634
+ If a file or directory path portion has a `.` as the first
635
+ character, then it will not match any glob pattern unless that
636
+ pattern's corresponding path part also has a `.` as its first
637
+ character.
638
+
639
+ For example, the pattern `a/.*/c` would match the file at
640
+ `a/.b/c`. However the pattern `a/*/c` would not, because `*` does
641
+ not start with a dot character.
642
+
643
+ You can make glob treat dots as normal characters by setting
644
+ `dot:true` in the options.
645
+
646
+ ### Basename Matching
647
+
648
+ If you set `matchBase:true` in the options, and the pattern has
649
+ no slashes in it, then it will seek for any file anywhere in the
650
+ tree with a matching basename. For example, `*.js` would match
651
+ `test/simple/basic.js`.
652
+
653
+ ### Empty Sets
654
+
655
+ If no matching files are found, then an empty array is returned.
656
+ This differs from the shell, where the pattern itself is
657
+ returned. For example:
658
+
659
+ ```sh
660
+ $ echo a*s*d*f
661
+ a*s*d*f
662
+ ```
663
+
664
+ ## Comparisons to other fnmatch/glob implementations
665
+
666
+ While strict compliance with the existing standards is a
667
+ worthwhile goal, some discrepancies exist between node-glob and
668
+ other implementations, and are intentional.
669
+
670
+ The double-star character `**` is supported by default, unless
671
+ the `noglobstar` flag is set. This is supported in the manner of
672
+ bsdglob and bash 5, where `**` only has special significance if
673
+ it is the only thing in a path part. That is, `a/**/b` will match
674
+ `a/x/y/b`, but `a/**b` will not.
675
+
676
+ > [!NOTE]
677
+ > Symlinked directories are not traversed as part of a
678
+ > `**`, though their contents may match against subsequent portions
679
+ > of the pattern. This prevents infinite loops and duplicates and
680
+ > the like. You can force glob to traverse symlinks with `**` by
681
+ > setting `{follow:true}` in the options.
682
+
683
+ There is no equivalent of the `nonull` option. A pattern that
684
+ does not find any matches simply resolves to nothing. (An empty
685
+ array, immediately ended stream, etc.)
686
+
687
+ If brace expansion is not disabled, then it is performed before
688
+ any other interpretation of the glob pattern. Thus, a pattern
689
+ like `+(a|{b),c)}`, which would not be valid in bash or zsh, is
690
+ expanded **first** into the set of `+(a|b)` and `+(a|c)`, and
691
+ those patterns are checked for validity. Since those two are
692
+ valid, matching proceeds.
693
+
694
+ The character class patterns `[:class:]` (POSIX standard named
695
+ classes) style class patterns are supported and Unicode-aware,
696
+ but `[=c=]` (locale-specific character collation weight), and
697
+ `[.symbol.]` (collating symbol), are not.
698
+
699
+ ### Repeated Slashes
700
+
701
+ Unlike Bash and zsh, repeated `/` are always coalesced into a
702
+ single path separator.
703
+
704
+ ### Comments and Negation
705
+
706
+ Previously, this module let you mark a pattern as a "comment" if
707
+ it started with a `#` character, or a "negated" pattern if it
708
+ started with a `!` character.
709
+
710
+ These options were deprecated in version 5, and removed in
711
+ version 6.
712
+
713
+ To specify things that should not match, use the `ignore` option.
714
+
715
+ ## Windows
716
+
717
+ **Please only use forward-slashes in glob expressions.**
718
+
719
+ Though Windows uses either `/` or `\` as its path separator, only
720
+ `/` characters are used by this glob implementation. You must use
721
+ forward-slashes **only** in glob expressions. Back-slashes will
722
+ always be interpreted as escape characters, not path separators.
723
+
724
+ Results from absolute patterns such as `/foo/*` are mounted onto
725
+ the root setting using `path.join`. On Windows, this will by
726
+ default result in `/foo/*` matching `C:\foo\bar.txt`.
727
+
728
+ To automatically coerce all `\` characters to `/` in pattern
729
+ strings, **thus making it impossible to escape literal glob
730
+ characters**, you may set the `windowsPathsNoEscape` option to
731
+ `true`.
732
+
733
+ ### Windows, CWDs, Drive Letters, and UNC Paths
734
+
735
+ On POSIX systems, when a pattern starts with `/`, any `cwd`
736
+ option is ignored, and the traversal starts at `/`, plus any
737
+ non-magic path portions specified in the pattern.
738
+
739
+ On Windows systems, the behavior is similar, but the concept of
740
+ an "absolute path" is somewhat more involved.
741
+
742
+ #### UNC Paths
743
+
744
+ A UNC path may be used as the start of a pattern on Windows
745
+ platforms. For example, a pattern like: `//?/x:/*` will return
746
+ all file entries in the root of the `x:` drive. A pattern like
747
+ `//ComputerName/Share/*` will return all files in the associated
748
+ share.
749
+
750
+ UNC path roots are always compared case insensitively.
751
+
752
+ #### Drive Letters
753
+
754
+ A pattern starting with a drive letter, like `c:/*`, will search
755
+ in that drive, regardless of any `cwd` option provided.
756
+
757
+ If the pattern starts with `/`, and is not a UNC path, and there
758
+ is an explicit `cwd` option set with a drive letter, then the
759
+ drive letter in the `cwd` is used as the root of the directory
760
+ traversal.
761
+
762
+ For example, `glob('/tmp', { cwd: 'c:/any/thing' })` will return
763
+ `['c:/tmp']` as the result.
764
+
765
+ If an explicit `cwd` option is not provided, and the pattern
766
+ starts with `/`, then the traversal will run on the root of the
767
+ drive provided as the `cwd` option. (That is, it is the result of
768
+ `path.resolve('/')`.)
769
+
770
+ ## Race Conditions
771
+
772
+ Glob searching, by its very nature, is susceptible to race
773
+ conditions, since it relies on directory walking.
774
+
775
+ As a result, it is possible that a file that exists when glob
776
+ looks for it may have been deleted or modified by the time it
777
+ returns the result.
778
+
779
+ By design, this implementation caches all readdir calls that it
780
+ makes, in order to cut down on system overhead. However, this
781
+ also makes it even more susceptible to races, especially if the
782
+ cache object is reused between glob calls.
783
+
784
+ Users are thus advised not to use a glob result as a guarantee of
785
+ filesystem state in the face of rapid changes. For the vast
786
+ majority of operations, this is never a problem.
787
+
788
+ ### See Also:
789
+
790
+ - `man sh`
791
+ - `man bash` [Pattern
792
+ Matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html)
793
+ - `man 3 fnmatch`
794
+ - `man 5 gitignore`
795
+ - [minimatch documentation](https://github.com/isaacs/minimatch)
796
+
797
+ ## Glob Logo
798
+
799
+ Glob's logo was created by [Tanya
800
+ Brassie](http://tanyabrassie.com/). Logo files can be found
801
+ [here](https://github.com/isaacs/node-glob/tree/master/logo).
802
+
803
+ The logo is licensed under a [Creative Commons
804
+ Attribution-ShareAlike 4.0 International
805
+ License](https://creativecommons.org/licenses/by-sa/4.0/).
806
+
807
+ ## Contributing
808
+
809
+ Any change to behavior (including bugfixes) must come with a
810
+ test.
811
+
812
+ Patches that fail tests or reduce performance will be rejected.
813
+
814
+ ```sh
815
+ # to run tests
816
+ npm test
817
+
818
+ # to re-generate test fixtures
819
+ npm run test-regen
820
+
821
+ # run the benchmarks
822
+ npm run bench
823
+
824
+ # to profile javascript
825
+ npm run prof
826
+ ```
827
+
828
+ ## Comparison to Other JavaScript Glob Implementations
829
+
830
+ **tl;dr**
831
+
832
+ - If you want glob matching that is as faithful as possible to
833
+ Bash pattern expansion semantics, and as fast as possible
834
+ within that constraint, _use this module_.
835
+ - If you are reasonably sure that the patterns you will encounter
836
+ are relatively simple, and want the absolutely fastest glob
837
+ matcher out there, _use [fast-glob](http://npm.im/fast-glob)_.
838
+ - If you are reasonably sure that the patterns you will encounter
839
+ are relatively simple, and want the convenience of
840
+ automatically respecting `.gitignore` files, _use
841
+ [globby](http://npm.im/globby)_.
842
+
843
+ There are some other glob matcher libraries on npm, but these
844
+ three are (in my opinion, as of 2023) the best.
845
+
846
+ ---
847
+
848
+ **full explanation**
849
+
850
+ Every library reflects a set of opinions and priorities in the
851
+ trade-offs it makes. Other than this library, I can personally
852
+ recommend both [globby](http://npm.im/globby) and
853
+ [fast-glob](http://npm.im/fast-glob), though they differ in their
854
+ benefits and drawbacks.
855
+
856
+ Both have very nice APIs and are reasonably fast.
857
+
858
+ `fast-glob` is, as far as I am aware, the fastest glob
859
+ implementation in JavaScript today. However, there are many
860
+ cases where the choices that `fast-glob` makes in pursuit of
861
+ speed mean that its results differ from the results returned by
862
+ Bash and other sh-like shells, which may be surprising.
863
+
864
+ In my testing, `fast-glob` is around 10-20% faster than this
865
+ module when walking over 200k files nested 4 directories
866
+ deep[1](#fn-webscale). However, there are some inconsistencies
867
+ with Bash matching behavior that this module does not suffer
868
+ from:
869
+
870
+ - `**` only matches files, not directories
871
+ - `..` path portions are not handled unless they appear at the
872
+ start of the pattern
873
+ - `./!(<pattern>)` will not match any files that _start_ with
874
+ `<pattern>`, even if they do not match `<pattern>`. For
875
+ example, `!(9).txt` will not match `9999.txt`.
876
+ - Some brace patterns in the middle of a pattern will result in
877
+ failing to find certain matches.
878
+ - Extglob patterns are allowed to contain `/` characters.
879
+
880
+ Globby exhibits all of the same pattern semantics as fast-glob,
881
+ (as it is a wrapper around fast-glob) and is slightly slower than
882
+ node-glob (by about 10-20% in the benchmark test set, or in other
883
+ words, anywhere from 20-50% slower than fast-glob). However, it
884
+ adds some API conveniences that may be worth the costs.
885
+
886
+ - Support for `.gitignore` and other ignore files.
887
+ - Support for negated globs (ie, patterns starting with `!`
888
+ rather than using a separate `ignore` option).
889
+
890
+ The priority of this module is "correctness" in the sense of
891
+ performing a glob pattern expansion as faithfully as possible to
892
+ the behavior of Bash and other sh-like shells, with as much speed
893
+ as possible.
894
+
895
+ > [!NOTE]
896
+ > Prior versions of `node-glob` are _not_ on this list.
897
+ > Former versions of this module are far too slow for any cases
898
+ > where performance matters at all, and were designed with APIs
899
+ > that are extremely dated by current JavaScript standards.
900
+
901
+ ---
902
+
903
+ <small id="fn-webscale">[1]: In the cases where this module
904
+ returns results and `fast-glob` doesn't, it's even faster, of
905
+ course.</small>
906
+
907
+ ![lumpy space princess saying 'oh my GLOB'](https://github.com/isaacs/node-glob/raw/main/oh-my-glob.gif)
908
+
909
+ ### Benchmark Results
910
+
911
+ The first number is time, smaller is better.
912
+
913
+ The second number is the count of results returned.
914
+
915
+ ```
916
+ --- pattern: '**' ---
917
+ ~~ sync ~~
918
+ node fast-glob sync 0m0.598s 200364
919
+ node globby sync 0m0.765s 200364
920
+ node current globSync mjs 0m0.683s 222656
921
+ node current glob syncStream 0m0.649s 222656
922
+ ~~ async ~~
923
+ node fast-glob async 0m0.350s 200364
924
+ node globby async 0m0.509s 200364
925
+ node current glob async mjs 0m0.463s 222656
926
+ node current glob stream 0m0.411s 222656
927
+
928
+ --- pattern: '**/..' ---
929
+ ~~ sync ~~
930
+ node fast-glob sync 0m0.486s 0
931
+ node globby sync 0m0.769s 200364
932
+ node current globSync mjs 0m0.564s 2242
933
+ node current glob syncStream 0m0.583s 2242
934
+ ~~ async ~~
935
+ node fast-glob async 0m0.283s 0
936
+ node globby async 0m0.512s 200364
937
+ node current glob async mjs 0m0.299s 2242
938
+ node current glob stream 0m0.312s 2242
939
+
940
+ --- pattern: './**/0/**/0/**/0/**/0/**/*.txt' ---
941
+ ~~ sync ~~
942
+ node fast-glob sync 0m0.490s 10
943
+ node globby sync 0m0.517s 10
944
+ node current globSync mjs 0m0.540s 10
945
+ node current glob syncStream 0m0.550s 10
946
+ ~~ async ~~
947
+ node fast-glob async 0m0.290s 10
948
+ node globby async 0m0.296s 10
949
+ node current glob async mjs 0m0.278s 10
950
+ node current glob stream 0m0.302s 10
951
+
952
+ --- pattern: './**/[01]/**/[12]/**/[23]/**/[45]/**/*.txt' ---
953
+ ~~ sync ~~
954
+ node fast-glob sync 0m0.500s 160
955
+ node globby sync 0m0.528s 160
956
+ node current globSync mjs 0m0.556s 160
957
+ node current glob syncStream 0m0.573s 160
958
+ ~~ async ~~
959
+ node fast-glob async 0m0.283s 160
960
+ node globby async 0m0.301s 160
961
+ node current glob async mjs 0m0.306s 160
962
+ node current glob stream 0m0.322s 160
963
+
964
+ --- pattern: './**/0/**/0/**/*.txt' ---
965
+ ~~ sync ~~
966
+ node fast-glob sync 0m0.502s 5230
967
+ node globby sync 0m0.527s 5230
968
+ node current globSync mjs 0m0.544s 5230
969
+ node current glob syncStream 0m0.557s 5230
970
+ ~~ async ~~
971
+ node fast-glob async 0m0.285s 5230
972
+ node globby async 0m0.305s 5230
973
+ node current glob async mjs 0m0.304s 5230
974
+ node current glob stream 0m0.310s 5230
975
+
976
+ --- pattern: '**/*.txt' ---
977
+ ~~ sync ~~
978
+ node fast-glob sync 0m0.580s 200023
979
+ node globby sync 0m0.771s 200023
980
+ node current globSync mjs 0m0.685s 200023
981
+ node current glob syncStream 0m0.649s 200023
982
+ ~~ async ~~
983
+ node fast-glob async 0m0.349s 200023
984
+ node globby async 0m0.509s 200023
985
+ node current glob async mjs 0m0.427s 200023
986
+ node current glob stream 0m0.388s 200023
987
+
988
+ --- pattern: '{**/*.txt,**/?/**/*.txt,**/?/**/?/**/*.txt,**/?/**/?/**/?/**/*.txt,**/?/**/?/**/?/**/?/**/*.txt}' ---
989
+ ~~ sync ~~
990
+ node fast-glob sync 0m0.589s 200023
991
+ node globby sync 0m0.771s 200023
992
+ node current globSync mjs 0m0.716s 200023
993
+ node current glob syncStream 0m0.684s 200023
994
+ ~~ async ~~
995
+ node fast-glob async 0m0.351s 200023
996
+ node globby async 0m0.518s 200023
997
+ node current glob async mjs 0m0.462s 200023
998
+ node current glob stream 0m0.468s 200023
999
+
1000
+ --- pattern: '**/5555/0000/*.txt' ---
1001
+ ~~ sync ~~
1002
+ node fast-glob sync 0m0.496s 1000
1003
+ node globby sync 0m0.519s 1000
1004
+ node current globSync mjs 0m0.539s 1000
1005
+ node current glob syncStream 0m0.567s 1000
1006
+ ~~ async ~~
1007
+ node fast-glob async 0m0.285s 1000
1008
+ node globby async 0m0.299s 1000
1009
+ node current glob async mjs 0m0.305s 1000
1010
+ node current glob stream 0m0.301s 1000
1011
+
1012
+ --- pattern: './**/0/**/../[01]/**/0/../**/0/*.txt' ---
1013
+ ~~ sync ~~
1014
+ node fast-glob sync 0m0.484s 0
1015
+ node globby sync 0m0.507s 0
1016
+ node current globSync mjs 0m0.577s 4880
1017
+ node current glob syncStream 0m0.586s 4880
1018
+ ~~ async ~~
1019
+ node fast-glob async 0m0.280s 0
1020
+ node globby async 0m0.298s 0
1021
+ node current glob async mjs 0m0.327s 4880
1022
+ node current glob stream 0m0.324s 4880
1023
+
1024
+ --- pattern: '**/????/????/????/????/*.txt' ---
1025
+ ~~ sync ~~
1026
+ node fast-glob sync 0m0.547s 100000
1027
+ node globby sync 0m0.673s 100000
1028
+ node current globSync mjs 0m0.626s 100000
1029
+ node current glob syncStream 0m0.618s 100000
1030
+ ~~ async ~~
1031
+ node fast-glob async 0m0.315s 100000
1032
+ node globby async 0m0.414s 100000
1033
+ node current glob async mjs 0m0.366s 100000
1034
+ node current glob stream 0m0.345s 100000
1035
+
1036
+ --- pattern: './{**/?{/**/?{/**/?{/**/?,,,,},,,,},,,,},,,}/**/*.txt' ---
1037
+ ~~ sync ~~
1038
+ node fast-glob sync 0m0.588s 100000
1039
+ node globby sync 0m0.670s 100000
1040
+ node current globSync mjs 0m0.717s 200023
1041
+ node current glob syncStream 0m0.687s 200023
1042
+ ~~ async ~~
1043
+ node fast-glob async 0m0.343s 100000
1044
+ node globby async 0m0.418s 100000
1045
+ node current glob async mjs 0m0.519s 200023
1046
+ node current glob stream 0m0.451s 200023
1047
+
1048
+ --- pattern: '**/!(0|9).txt' ---
1049
+ ~~ sync ~~
1050
+ node fast-glob sync 0m0.573s 160023
1051
+ node globby sync 0m0.731s 160023
1052
+ node current globSync mjs 0m0.680s 180023
1053
+ node current glob syncStream 0m0.659s 180023
1054
+ ~~ async ~~
1055
+ node fast-glob async 0m0.345s 160023
1056
+ node globby async 0m0.476s 160023
1057
+ node current glob async mjs 0m0.427s 180023
1058
+ node current glob stream 0m0.388s 180023
1059
+
1060
+ --- pattern: './{*/**/../{*/**/../{*/**/../{*/**/../{*/**,,,,},,,,},,,,},,,,},,,,}/*.txt' ---
1061
+ ~~ sync ~~
1062
+ node fast-glob sync 0m0.483s 0
1063
+ node globby sync 0m0.512s 0
1064
+ node current globSync mjs 0m0.811s 200023
1065
+ node current glob syncStream 0m0.773s 200023
1066
+ ~~ async ~~
1067
+ node fast-glob async 0m0.280s 0
1068
+ node globby async 0m0.299s 0
1069
+ node current glob async mjs 0m0.617s 200023
1070
+ node current glob stream 0m0.568s 200023
1071
+
1072
+ --- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/*.txt' ---
1073
+ ~~ sync ~~
1074
+ node fast-glob sync 0m0.485s 0
1075
+ node globby sync 0m0.507s 0
1076
+ node current globSync mjs 0m0.759s 200023
1077
+ node current glob syncStream 0m0.740s 200023
1078
+ ~~ async ~~
1079
+ node fast-glob async 0m0.281s 0
1080
+ node globby async 0m0.297s 0
1081
+ node current glob async mjs 0m0.544s 200023
1082
+ node current glob stream 0m0.464s 200023
1083
+
1084
+ --- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/*.txt' ---
1085
+ ~~ sync ~~
1086
+ node fast-glob sync 0m0.486s 0
1087
+ node globby sync 0m0.513s 0
1088
+ node current globSync mjs 0m0.734s 200023
1089
+ node current glob syncStream 0m0.696s 200023
1090
+ ~~ async ~~
1091
+ node fast-glob async 0m0.286s 0
1092
+ node globby async 0m0.296s 0
1093
+ node current glob async mjs 0m0.506s 200023
1094
+ node current glob stream 0m0.483s 200023
1095
+
1096
+ --- pattern: './0/**/../1/**/../2/**/../3/**/../4/**/../5/**/../6/**/../7/**/*.txt' ---
1097
+ ~~ sync ~~
1098
+ node fast-glob sync 0m0.060s 0
1099
+ node globby sync 0m0.074s 0
1100
+ node current globSync mjs 0m0.067s 0
1101
+ node current glob syncStream 0m0.066s 0
1102
+ ~~ async ~~
1103
+ node fast-glob async 0m0.060s 0
1104
+ node globby async 0m0.075s 0
1105
+ node current glob async mjs 0m0.066s 0
1106
+ node current glob stream 0m0.067s 0
1107
+
1108
+ --- pattern: './**/?/**/?/**/?/**/?/**/*.txt' ---
1109
+ ~~ sync ~~
1110
+ node fast-glob sync 0m0.568s 100000
1111
+ node globby sync 0m0.651s 100000
1112
+ node current globSync mjs 0m0.619s 100000
1113
+ node current glob syncStream 0m0.617s 100000
1114
+ ~~ async ~~
1115
+ node fast-glob async 0m0.332s 100000
1116
+ node globby async 0m0.409s 100000
1117
+ node current glob async mjs 0m0.372s 100000
1118
+ node current glob stream 0m0.351s 100000
1119
+
1120
+ --- pattern: '**/*/**/*/**/*/**/*/**' ---
1121
+ ~~ sync ~~
1122
+ node fast-glob sync 0m0.603s 200113
1123
+ node globby sync 0m0.798s 200113
1124
+ node current globSync mjs 0m0.730s 222137
1125
+ node current glob syncStream 0m0.693s 222137
1126
+ ~~ async ~~
1127
+ node fast-glob async 0m0.356s 200113
1128
+ node globby async 0m0.525s 200113
1129
+ node current glob async mjs 0m0.508s 222137
1130
+ node current glob stream 0m0.455s 222137
1131
+
1132
+ --- pattern: './**/*/**/*/**/*/**/*/**/*.txt' ---
1133
+ ~~ sync ~~
1134
+ node fast-glob sync 0m0.622s 200000
1135
+ node globby sync 0m0.792s 200000
1136
+ node current globSync mjs 0m0.722s 200000
1137
+ node current glob syncStream 0m0.695s 200000
1138
+ ~~ async ~~
1139
+ node fast-glob async 0m0.369s 200000
1140
+ node globby async 0m0.527s 200000
1141
+ node current glob async mjs 0m0.502s 200000
1142
+ node current glob stream 0m0.481s 200000
1143
+
1144
+ --- pattern: '**/*.txt' ---
1145
+ ~~ sync ~~
1146
+ node fast-glob sync 0m0.588s 200023
1147
+ node globby sync 0m0.771s 200023
1148
+ node current globSync mjs 0m0.684s 200023
1149
+ node current glob syncStream 0m0.658s 200023
1150
+ ~~ async ~~
1151
+ node fast-glob async 0m0.352s 200023
1152
+ node globby async 0m0.516s 200023
1153
+ node current glob async mjs 0m0.432s 200023
1154
+ node current glob stream 0m0.384s 200023
1155
+
1156
+ --- pattern: './**/**/**/**/**/**/**/**/*.txt' ---
1157
+ ~~ sync ~~
1158
+ node fast-glob sync 0m0.589s 200023
1159
+ node globby sync 0m0.766s 200023
1160
+ node current globSync mjs 0m0.682s 200023
1161
+ node current glob syncStream 0m0.652s 200023
1162
+ ~~ async ~~
1163
+ node fast-glob async 0m0.352s 200023
1164
+ node globby async 0m0.523s 200023
1165
+ node current glob async mjs 0m0.436s 200023
1166
+ node current glob stream 0m0.380s 200023
1167
+
1168
+ --- pattern: '**/*/*.txt' ---
1169
+ ~~ sync ~~
1170
+ node fast-glob sync 0m0.592s 200023
1171
+ node globby sync 0m0.776s 200023
1172
+ node current globSync mjs 0m0.691s 200023
1173
+ node current glob syncStream 0m0.659s 200023
1174
+ ~~ async ~~
1175
+ node fast-glob async 0m0.357s 200023
1176
+ node globby async 0m0.513s 200023
1177
+ node current glob async mjs 0m0.471s 200023
1178
+ node current glob stream 0m0.424s 200023
1179
+
1180
+ --- pattern: '**/*/**/*.txt' ---
1181
+ ~~ sync ~~
1182
+ node fast-glob sync 0m0.585s 200023
1183
+ node globby sync 0m0.766s 200023
1184
+ node current globSync mjs 0m0.694s 200023
1185
+ node current glob syncStream 0m0.664s 200023
1186
+ ~~ async ~~
1187
+ node fast-glob async 0m0.350s 200023
1188
+ node globby async 0m0.514s 200023
1189
+ node current glob async mjs 0m0.472s 200023
1190
+ node current glob stream 0m0.424s 200023
1191
+
1192
+ --- pattern: '**/[0-9]/**/*.txt' ---
1193
+ ~~ sync ~~
1194
+ node fast-glob sync 0m0.544s 100000
1195
+ node globby sync 0m0.636s 100000
1196
+ node current globSync mjs 0m0.626s 100000
1197
+ node current glob syncStream 0m0.621s 100000
1198
+ ~~ async ~~
1199
+ node fast-glob async 0m0.322s 100000
1200
+ node globby async 0m0.404s 100000
1201
+ node current glob async mjs 0m0.360s 100000
1202
+ node current glob stream 0m0.352s 100000
1203
+ ```