@alexlit/lint-kit 173.3.0 → 175.0.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 (670) hide show
  1. package/package.json +1 -1
  2. package/packages/config-eslint/node_modules/@eslint/config-array/LICENSE +201 -0
  3. package/packages/config-eslint/node_modules/@eslint/config-array/README.md +368 -0
  4. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/index.cjs +1536 -0
  5. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/index.d.cts +144 -0
  6. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs +1336 -0
  7. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs +1678 -0
  8. package/packages/config-eslint/node_modules/@eslint/config-array/dist/cjs/types.cts +29 -0
  9. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/index.d.ts +144 -0
  10. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/index.js +1511 -0
  11. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/std__path/posix.js +1314 -0
  12. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/std__path/windows.js +1656 -0
  13. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/types.d.ts +23 -0
  14. package/packages/config-eslint/node_modules/@eslint/config-array/dist/esm/types.ts +29 -0
  15. package/packages/config-eslint/node_modules/@eslint/config-array/package.json +65 -0
  16. package/packages/config-eslint/node_modules/@eslint/config-helpers/LICENSE +201 -0
  17. package/packages/config-eslint/node_modules/@eslint/config-helpers/README.md +97 -0
  18. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/cjs/index.cjs +588 -0
  19. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts +26 -0
  20. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/cjs/types.cts +29 -0
  21. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/index.d.ts +26 -0
  22. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/index.js +586 -0
  23. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/types.d.ts +23 -0
  24. package/packages/config-eslint/node_modules/@eslint/config-helpers/dist/esm/types.ts +29 -0
  25. package/packages/config-eslint/node_modules/@eslint/config-helpers/package.json +60 -0
  26. package/packages/config-eslint/node_modules/@eslint/js/LICENSE +19 -0
  27. package/packages/config-eslint/node_modules/@eslint/js/README.md +103 -0
  28. package/packages/config-eslint/node_modules/@eslint/js/package.json +44 -0
  29. package/packages/config-eslint/node_modules/@eslint/js/src/configs/eslint-all.js +210 -0
  30. package/packages/config-eslint/node_modules/@eslint/js/src/configs/eslint-recommended.js +75 -0
  31. package/packages/config-eslint/node_modules/@eslint/js/src/index.js +23 -0
  32. package/packages/config-eslint/node_modules/@eslint/js/types/index.d.ts +14 -0
  33. package/packages/config-eslint/node_modules/@eslint/object-schema/LICENSE +201 -0
  34. package/packages/config-eslint/node_modules/@eslint/object-schema/README.md +243 -0
  35. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/cjs/index.cjs +459 -0
  36. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/cjs/index.d.cts +127 -0
  37. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/cjs/types.cts +57 -0
  38. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/index.d.ts +127 -0
  39. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/index.js +456 -0
  40. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/types.d.ts +40 -0
  41. package/packages/config-eslint/node_modules/@eslint/object-schema/dist/esm/types.ts +57 -0
  42. package/packages/config-eslint/node_modules/@eslint/object-schema/package.json +62 -0
  43. package/packages/config-eslint/node_modules/@eslint/plugin-kit/LICENSE +201 -0
  44. package/packages/config-eslint/node_modules/@eslint/plugin-kit/README.md +273 -0
  45. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/cjs/index.cjs +895 -0
  46. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts +329 -0
  47. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/cjs/types.cts +81 -0
  48. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts +329 -0
  49. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/index.js +890 -0
  50. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/types.d.ts +46 -0
  51. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/types.ts +81 -0
  52. package/packages/config-eslint/node_modules/@eslint/plugin-kit/package.json +62 -0
  53. package/packages/config-eslint/node_modules/ajv/.tonic_example.js +20 -0
  54. package/packages/config-eslint/node_modules/ajv/LICENSE +22 -0
  55. package/packages/config-eslint/node_modules/ajv/README.md +1497 -0
  56. package/packages/config-eslint/node_modules/ajv/dist/ajv.bundle.js +7189 -0
  57. package/packages/config-eslint/node_modules/ajv/dist/ajv.min.js +3 -0
  58. package/packages/config-eslint/node_modules/ajv/dist/ajv.min.js.map +1 -0
  59. package/packages/config-eslint/node_modules/ajv/lib/ajv.d.ts +397 -0
  60. package/packages/config-eslint/node_modules/ajv/lib/ajv.js +506 -0
  61. package/packages/config-eslint/node_modules/ajv/lib/cache.js +26 -0
  62. package/packages/config-eslint/node_modules/ajv/lib/compile/async.js +90 -0
  63. package/packages/config-eslint/node_modules/ajv/lib/compile/equal.js +5 -0
  64. package/packages/config-eslint/node_modules/ajv/lib/compile/error_classes.js +34 -0
  65. package/packages/config-eslint/node_modules/ajv/lib/compile/formats.js +142 -0
  66. package/packages/config-eslint/node_modules/ajv/lib/compile/index.js +387 -0
  67. package/packages/config-eslint/node_modules/ajv/lib/compile/resolve.js +270 -0
  68. package/packages/config-eslint/node_modules/ajv/lib/compile/rules.js +66 -0
  69. package/packages/config-eslint/node_modules/ajv/lib/compile/schema_obj.js +9 -0
  70. package/packages/config-eslint/node_modules/ajv/lib/compile/ucs2length.js +20 -0
  71. package/packages/config-eslint/node_modules/ajv/lib/compile/util.js +239 -0
  72. package/packages/config-eslint/node_modules/ajv/lib/data.js +49 -0
  73. package/packages/config-eslint/node_modules/ajv/lib/definition_schema.js +37 -0
  74. package/packages/config-eslint/node_modules/ajv/lib/dot/_limit.jst +113 -0
  75. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitItems.jst +12 -0
  76. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitLength.jst +12 -0
  77. package/packages/config-eslint/node_modules/ajv/lib/dot/_limitProperties.jst +12 -0
  78. package/packages/config-eslint/node_modules/ajv/lib/dot/allOf.jst +32 -0
  79. package/packages/config-eslint/node_modules/ajv/lib/dot/anyOf.jst +46 -0
  80. package/packages/config-eslint/node_modules/ajv/lib/dot/coerce.def +51 -0
  81. package/packages/config-eslint/node_modules/ajv/lib/dot/comment.jst +9 -0
  82. package/packages/config-eslint/node_modules/ajv/lib/dot/const.jst +11 -0
  83. package/packages/config-eslint/node_modules/ajv/lib/dot/contains.jst +55 -0
  84. package/packages/config-eslint/node_modules/ajv/lib/dot/custom.jst +191 -0
  85. package/packages/config-eslint/node_modules/ajv/lib/dot/defaults.def +47 -0
  86. package/packages/config-eslint/node_modules/ajv/lib/dot/definitions.def +203 -0
  87. package/packages/config-eslint/node_modules/ajv/lib/dot/dependencies.jst +79 -0
  88. package/packages/config-eslint/node_modules/ajv/lib/dot/enum.jst +30 -0
  89. package/packages/config-eslint/node_modules/ajv/lib/dot/errors.def +194 -0
  90. package/packages/config-eslint/node_modules/ajv/lib/dot/format.jst +106 -0
  91. package/packages/config-eslint/node_modules/ajv/lib/dot/if.jst +73 -0
  92. package/packages/config-eslint/node_modules/ajv/lib/dot/items.jst +98 -0
  93. package/packages/config-eslint/node_modules/ajv/lib/dot/missing.def +39 -0
  94. package/packages/config-eslint/node_modules/ajv/lib/dot/multipleOf.jst +22 -0
  95. package/packages/config-eslint/node_modules/ajv/lib/dot/not.jst +43 -0
  96. package/packages/config-eslint/node_modules/ajv/lib/dot/oneOf.jst +54 -0
  97. package/packages/config-eslint/node_modules/ajv/lib/dot/pattern.jst +14 -0
  98. package/packages/config-eslint/node_modules/ajv/lib/dot/properties.jst +245 -0
  99. package/packages/config-eslint/node_modules/ajv/lib/dot/propertyNames.jst +52 -0
  100. package/packages/config-eslint/node_modules/ajv/lib/dot/ref.jst +85 -0
  101. package/packages/config-eslint/node_modules/ajv/lib/dot/required.jst +108 -0
  102. package/packages/config-eslint/node_modules/ajv/lib/dot/uniqueItems.jst +62 -0
  103. package/packages/config-eslint/node_modules/ajv/lib/dot/validate.jst +276 -0
  104. package/packages/config-eslint/node_modules/ajv/lib/dotjs/README.md +3 -0
  105. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limit.js +163 -0
  106. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitItems.js +80 -0
  107. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitLength.js +85 -0
  108. package/packages/config-eslint/node_modules/ajv/lib/dotjs/_limitProperties.js +80 -0
  109. package/packages/config-eslint/node_modules/ajv/lib/dotjs/allOf.js +42 -0
  110. package/packages/config-eslint/node_modules/ajv/lib/dotjs/anyOf.js +73 -0
  111. package/packages/config-eslint/node_modules/ajv/lib/dotjs/comment.js +14 -0
  112. package/packages/config-eslint/node_modules/ajv/lib/dotjs/const.js +56 -0
  113. package/packages/config-eslint/node_modules/ajv/lib/dotjs/contains.js +81 -0
  114. package/packages/config-eslint/node_modules/ajv/lib/dotjs/custom.js +228 -0
  115. package/packages/config-eslint/node_modules/ajv/lib/dotjs/dependencies.js +168 -0
  116. package/packages/config-eslint/node_modules/ajv/lib/dotjs/enum.js +66 -0
  117. package/packages/config-eslint/node_modules/ajv/lib/dotjs/format.js +150 -0
  118. package/packages/config-eslint/node_modules/ajv/lib/dotjs/if.js +103 -0
  119. package/packages/config-eslint/node_modules/ajv/lib/dotjs/index.js +33 -0
  120. package/packages/config-eslint/node_modules/ajv/lib/dotjs/items.js +140 -0
  121. package/packages/config-eslint/node_modules/ajv/lib/dotjs/multipleOf.js +80 -0
  122. package/packages/config-eslint/node_modules/ajv/lib/dotjs/not.js +84 -0
  123. package/packages/config-eslint/node_modules/ajv/lib/dotjs/oneOf.js +73 -0
  124. package/packages/config-eslint/node_modules/ajv/lib/dotjs/pattern.js +75 -0
  125. package/packages/config-eslint/node_modules/ajv/lib/dotjs/properties.js +335 -0
  126. package/packages/config-eslint/node_modules/ajv/lib/dotjs/propertyNames.js +81 -0
  127. package/packages/config-eslint/node_modules/ajv/lib/dotjs/ref.js +124 -0
  128. package/packages/config-eslint/node_modules/ajv/lib/dotjs/required.js +270 -0
  129. package/packages/config-eslint/node_modules/ajv/lib/dotjs/uniqueItems.js +86 -0
  130. package/packages/config-eslint/node_modules/ajv/lib/dotjs/validate.js +482 -0
  131. package/packages/config-eslint/node_modules/ajv/lib/keyword.js +146 -0
  132. package/packages/config-eslint/node_modules/ajv/lib/refs/data.json +17 -0
  133. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-04.json +149 -0
  134. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-06.json +154 -0
  135. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-draft-07.json +168 -0
  136. package/packages/config-eslint/node_modules/ajv/lib/refs/json-schema-secure.json +94 -0
  137. package/packages/config-eslint/node_modules/ajv/package.json +106 -0
  138. package/packages/config-eslint/node_modules/ajv/scripts/.eslintrc.yml +3 -0
  139. package/packages/config-eslint/node_modules/ajv/scripts/bundle.js +61 -0
  140. package/packages/config-eslint/node_modules/ajv/scripts/compile-dots.js +73 -0
  141. package/packages/config-eslint/node_modules/ajv/scripts/info +10 -0
  142. package/packages/config-eslint/node_modules/ajv/scripts/prepare-tests +12 -0
  143. package/packages/config-eslint/node_modules/ajv/scripts/publish-built-version +32 -0
  144. package/packages/config-eslint/node_modules/ajv/scripts/travis-gh-pages +23 -0
  145. package/packages/config-eslint/node_modules/eslint/LICENSE +19 -0
  146. package/packages/config-eslint/node_modules/eslint/README.md +363 -0
  147. package/packages/config-eslint/node_modules/eslint/bin/eslint.js +195 -0
  148. package/packages/config-eslint/node_modules/eslint/conf/ecma-version.js +16 -0
  149. package/packages/config-eslint/node_modules/eslint/conf/globals.js +169 -0
  150. package/packages/config-eslint/node_modules/eslint/conf/replacements.json +26 -0
  151. package/packages/config-eslint/node_modules/eslint/conf/rule-type-list.json +91 -0
  152. package/packages/config-eslint/node_modules/eslint/lib/api.js +39 -0
  153. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json +18 -0
  154. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/html.js +359 -0
  155. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/json-with-metadata.js +16 -0
  156. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/json.js +13 -0
  157. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/formatters/stylish.js +153 -0
  158. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/hash.js +35 -0
  159. package/packages/config-eslint/node_modules/eslint/lib/cli-engine/lint-result-cache.js +220 -0
  160. package/packages/config-eslint/node_modules/eslint/lib/cli.js +521 -0
  161. package/packages/config-eslint/node_modules/eslint/lib/config/config-loader.js +668 -0
  162. package/packages/config-eslint/node_modules/eslint/lib/config/config.js +674 -0
  163. package/packages/config-eslint/node_modules/eslint/lib/config/default-config.js +78 -0
  164. package/packages/config-eslint/node_modules/eslint/lib/config/flat-config-array.js +217 -0
  165. package/packages/config-eslint/node_modules/eslint/lib/config/flat-config-schema.js +598 -0
  166. package/packages/config-eslint/node_modules/eslint/lib/config-api.js +12 -0
  167. package/packages/config-eslint/node_modules/eslint/lib/eslint/eslint-helpers.js +1462 -0
  168. package/packages/config-eslint/node_modules/eslint/lib/eslint/eslint.js +1364 -0
  169. package/packages/config-eslint/node_modules/eslint/lib/eslint/index.js +7 -0
  170. package/packages/config-eslint/node_modules/eslint/lib/eslint/worker.js +173 -0
  171. package/packages/config-eslint/node_modules/eslint/lib/languages/js/index.js +336 -0
  172. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/index.js +7 -0
  173. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/source-code.js +1178 -0
  174. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/backward-token-comment-cursor.js +61 -0
  175. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/backward-token-cursor.js +57 -0
  176. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/cursor.js +76 -0
  177. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/cursors.js +120 -0
  178. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/decorative-cursor.js +38 -0
  179. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/filter-cursor.js +42 -0
  180. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/forward-token-comment-cursor.js +65 -0
  181. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/forward-token-cursor.js +62 -0
  182. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/index.js +695 -0
  183. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/limit-cursor.js +39 -0
  184. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/padded-token-cursor.js +45 -0
  185. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/skip-cursor.js +41 -0
  186. package/packages/config-eslint/node_modules/eslint/lib/languages/js/source-code/token-store/utils.js +131 -0
  187. package/packages/config-eslint/node_modules/eslint/lib/languages/js/validate-language-options.js +196 -0
  188. package/packages/config-eslint/node_modules/eslint/lib/linter/apply-disable-directives.js +583 -0
  189. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js +828 -0
  190. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js +262 -0
  191. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js +2370 -0
  192. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/code-path.js +332 -0
  193. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js +223 -0
  194. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js +374 -0
  195. package/packages/config-eslint/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js +44 -0
  196. package/packages/config-eslint/node_modules/eslint/lib/linter/esquery.js +332 -0
  197. package/packages/config-eslint/node_modules/eslint/lib/linter/file-context.js +88 -0
  198. package/packages/config-eslint/node_modules/eslint/lib/linter/file-report.js +604 -0
  199. package/packages/config-eslint/node_modules/eslint/lib/linter/index.js +11 -0
  200. package/packages/config-eslint/node_modules/eslint/lib/linter/interpolate.js +50 -0
  201. package/packages/config-eslint/node_modules/eslint/lib/linter/linter.js +1614 -0
  202. package/packages/config-eslint/node_modules/eslint/lib/linter/rule-fixer.js +199 -0
  203. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-fixer.js +154 -0
  204. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-traverser.js +333 -0
  205. package/packages/config-eslint/node_modules/eslint/lib/linter/source-code-visitor.js +81 -0
  206. package/packages/config-eslint/node_modules/eslint/lib/linter/timing.js +209 -0
  207. package/packages/config-eslint/node_modules/eslint/lib/linter/vfile.js +115 -0
  208. package/packages/config-eslint/node_modules/eslint/lib/options.js +416 -0
  209. package/packages/config-eslint/node_modules/eslint/lib/rule-tester/index.js +7 -0
  210. package/packages/config-eslint/node_modules/eslint/lib/rule-tester/rule-tester.js +1996 -0
  211. package/packages/config-eslint/node_modules/eslint/lib/rules/accessor-pairs.js +420 -0
  212. package/packages/config-eslint/node_modules/eslint/lib/rules/array-bracket-newline.js +291 -0
  213. package/packages/config-eslint/node_modules/eslint/lib/rules/array-bracket-spacing.js +301 -0
  214. package/packages/config-eslint/node_modules/eslint/lib/rules/array-callback-return.js +510 -0
  215. package/packages/config-eslint/node_modules/eslint/lib/rules/array-element-newline.js +374 -0
  216. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-body-style.js +418 -0
  217. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-parens.js +237 -0
  218. package/packages/config-eslint/node_modules/eslint/lib/rules/arrow-spacing.js +188 -0
  219. package/packages/config-eslint/node_modules/eslint/lib/rules/block-scoped-var.js +137 -0
  220. package/packages/config-eslint/node_modules/eslint/lib/rules/block-spacing.js +202 -0
  221. package/packages/config-eslint/node_modules/eslint/lib/rules/brace-style.js +278 -0
  222. package/packages/config-eslint/node_modules/eslint/lib/rules/callback-return.js +216 -0
  223. package/packages/config-eslint/node_modules/eslint/lib/rules/camelcase.js +422 -0
  224. package/packages/config-eslint/node_modules/eslint/lib/rules/capitalized-comments.js +325 -0
  225. package/packages/config-eslint/node_modules/eslint/lib/rules/class-methods-use-this.js +250 -0
  226. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-dangle.js +424 -0
  227. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-spacing.js +205 -0
  228. package/packages/config-eslint/node_modules/eslint/lib/rules/comma-style.js +391 -0
  229. package/packages/config-eslint/node_modules/eslint/lib/rules/complexity.js +201 -0
  230. package/packages/config-eslint/node_modules/eslint/lib/rules/computed-property-spacing.js +251 -0
  231. package/packages/config-eslint/node_modules/eslint/lib/rules/consistent-return.js +221 -0
  232. package/packages/config-eslint/node_modules/eslint/lib/rules/consistent-this.js +179 -0
  233. package/packages/config-eslint/node_modules/eslint/lib/rules/constructor-super.js +453 -0
  234. package/packages/config-eslint/node_modules/eslint/lib/rules/curly.js +425 -0
  235. package/packages/config-eslint/node_modules/eslint/lib/rules/default-case-last.js +51 -0
  236. package/packages/config-eslint/node_modules/eslint/lib/rules/default-case.js +103 -0
  237. package/packages/config-eslint/node_modules/eslint/lib/rules/default-param-last.js +78 -0
  238. package/packages/config-eslint/node_modules/eslint/lib/rules/dot-location.js +138 -0
  239. package/packages/config-eslint/node_modules/eslint/lib/rules/dot-notation.js +216 -0
  240. package/packages/config-eslint/node_modules/eslint/lib/rules/eol-last.js +135 -0
  241. package/packages/config-eslint/node_modules/eslint/lib/rules/eqeqeq.js +210 -0
  242. package/packages/config-eslint/node_modules/eslint/lib/rules/for-direction.js +168 -0
  243. package/packages/config-eslint/node_modules/eslint/lib/rules/func-call-spacing.js +281 -0
  244. package/packages/config-eslint/node_modules/eslint/lib/rules/func-name-matching.js +338 -0
  245. package/packages/config-eslint/node_modules/eslint/lib/rules/func-names.js +194 -0
  246. package/packages/config-eslint/node_modules/eslint/lib/rules/func-style.js +221 -0
  247. package/packages/config-eslint/node_modules/eslint/lib/rules/function-call-argument-newline.js +166 -0
  248. package/packages/config-eslint/node_modules/eslint/lib/rules/function-paren-newline.js +368 -0
  249. package/packages/config-eslint/node_modules/eslint/lib/rules/generator-star-spacing.js +246 -0
  250. package/packages/config-eslint/node_modules/eslint/lib/rules/getter-return.js +242 -0
  251. package/packages/config-eslint/node_modules/eslint/lib/rules/global-require.js +117 -0
  252. package/packages/config-eslint/node_modules/eslint/lib/rules/grouped-accessor-pairs.js +268 -0
  253. package/packages/config-eslint/node_modules/eslint/lib/rules/guard-for-in.js +85 -0
  254. package/packages/config-eslint/node_modules/eslint/lib/rules/handle-callback-err.js +122 -0
  255. package/packages/config-eslint/node_modules/eslint/lib/rules/id-blacklist.js +241 -0
  256. package/packages/config-eslint/node_modules/eslint/lib/rules/id-denylist.js +223 -0
  257. package/packages/config-eslint/node_modules/eslint/lib/rules/id-length.js +217 -0
  258. package/packages/config-eslint/node_modules/eslint/lib/rules/id-match.js +363 -0
  259. package/packages/config-eslint/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js +125 -0
  260. package/packages/config-eslint/node_modules/eslint/lib/rules/indent-legacy.js +1369 -0
  261. package/packages/config-eslint/node_modules/eslint/lib/rules/indent.js +2334 -0
  262. package/packages/config-eslint/node_modules/eslint/lib/rules/index.js +332 -0
  263. package/packages/config-eslint/node_modules/eslint/lib/rules/init-declarations.js +172 -0
  264. package/packages/config-eslint/node_modules/eslint/lib/rules/jsx-quotes.js +128 -0
  265. package/packages/config-eslint/node_modules/eslint/lib/rules/key-spacing.js +822 -0
  266. package/packages/config-eslint/node_modules/eslint/lib/rules/keyword-spacing.js +701 -0
  267. package/packages/config-eslint/node_modules/eslint/lib/rules/line-comment-position.js +157 -0
  268. package/packages/config-eslint/node_modules/eslint/lib/rules/linebreak-style.js +135 -0
  269. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-around-comment.js +581 -0
  270. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-around-directive.js +249 -0
  271. package/packages/config-eslint/node_modules/eslint/lib/rules/lines-between-class-members.js +358 -0
  272. package/packages/config-eslint/node_modules/eslint/lib/rules/logical-assignment-operators.js +688 -0
  273. package/packages/config-eslint/node_modules/eslint/lib/rules/max-classes-per-file.js +90 -0
  274. package/packages/config-eslint/node_modules/eslint/lib/rules/max-depth.js +159 -0
  275. package/packages/config-eslint/node_modules/eslint/lib/rules/max-len.js +497 -0
  276. package/packages/config-eslint/node_modules/eslint/lib/rules/max-lines-per-function.js +238 -0
  277. package/packages/config-eslint/node_modules/eslint/lib/rules/max-lines.js +189 -0
  278. package/packages/config-eslint/node_modules/eslint/lib/rules/max-nested-callbacks.js +115 -0
  279. package/packages/config-eslint/node_modules/eslint/lib/rules/max-params.js +148 -0
  280. package/packages/config-eslint/node_modules/eslint/lib/rules/max-statements-per-line.js +224 -0
  281. package/packages/config-eslint/node_modules/eslint/lib/rules/max-statements.js +188 -0
  282. package/packages/config-eslint/node_modules/eslint/lib/rules/multiline-comment-style.js +652 -0
  283. package/packages/config-eslint/node_modules/eslint/lib/rules/multiline-ternary.js +257 -0
  284. package/packages/config-eslint/node_modules/eslint/lib/rules/new-cap.js +277 -0
  285. package/packages/config-eslint/node_modules/eslint/lib/rules/new-parens.js +120 -0
  286. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-after-var.js +307 -0
  287. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-before-return.js +242 -0
  288. package/packages/config-eslint/node_modules/eslint/lib/rules/newline-per-chained-call.js +159 -0
  289. package/packages/config-eslint/node_modules/eslint/lib/rules/no-alert.js +149 -0
  290. package/packages/config-eslint/node_modules/eslint/lib/rules/no-array-constructor.js +195 -0
  291. package/packages/config-eslint/node_modules/eslint/lib/rules/no-async-promise-executor.js +45 -0
  292. package/packages/config-eslint/node_modules/eslint/lib/rules/no-await-in-loop.js +115 -0
  293. package/packages/config-eslint/node_modules/eslint/lib/rules/no-bitwise.js +145 -0
  294. package/packages/config-eslint/node_modules/eslint/lib/rules/no-buffer-constructor.js +74 -0
  295. package/packages/config-eslint/node_modules/eslint/lib/rules/no-caller.js +52 -0
  296. package/packages/config-eslint/node_modules/eslint/lib/rules/no-case-declarations.js +80 -0
  297. package/packages/config-eslint/node_modules/eslint/lib/rules/no-catch-shadow.js +96 -0
  298. package/packages/config-eslint/node_modules/eslint/lib/rules/no-class-assign.js +66 -0
  299. package/packages/config-eslint/node_modules/eslint/lib/rules/no-compare-neg-zero.js +74 -0
  300. package/packages/config-eslint/node_modules/eslint/lib/rules/no-cond-assign.js +175 -0
  301. package/packages/config-eslint/node_modules/eslint/lib/rules/no-confusing-arrow.js +127 -0
  302. package/packages/config-eslint/node_modules/eslint/lib/rules/no-console.js +221 -0
  303. package/packages/config-eslint/node_modules/eslint/lib/rules/no-const-assign.js +73 -0
  304. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constant-binary-expression.js +603 -0
  305. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constant-condition.js +177 -0
  306. package/packages/config-eslint/node_modules/eslint/lib/rules/no-constructor-return.js +62 -0
  307. package/packages/config-eslint/node_modules/eslint/lib/rules/no-continue.js +38 -0
  308. package/packages/config-eslint/node_modules/eslint/lib/rules/no-control-regex.js +142 -0
  309. package/packages/config-eslint/node_modules/eslint/lib/rules/no-debugger.js +41 -0
  310. package/packages/config-eslint/node_modules/eslint/lib/rules/no-delete-var.js +42 -0
  311. package/packages/config-eslint/node_modules/eslint/lib/rules/no-div-regex.js +60 -0
  312. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-args.js +92 -0
  313. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-class-members.js +117 -0
  314. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-else-if.js +145 -0
  315. package/packages/config-eslint/node_modules/eslint/lib/rules/no-dupe-keys.js +165 -0
  316. package/packages/config-eslint/node_modules/eslint/lib/rules/no-duplicate-case.js +78 -0
  317. package/packages/config-eslint/node_modules/eslint/lib/rules/no-duplicate-imports.js +368 -0
  318. package/packages/config-eslint/node_modules/eslint/lib/rules/no-else-return.js +450 -0
  319. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-character-class.js +83 -0
  320. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-function.js +236 -0
  321. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-pattern.js +85 -0
  322. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty-static-block.js +73 -0
  323. package/packages/config-eslint/node_modules/eslint/lib/rules/no-empty.js +153 -0
  324. package/packages/config-eslint/node_modules/eslint/lib/rules/no-eq-null.js +51 -0
  325. package/packages/config-eslint/node_modules/eslint/lib/rules/no-eval.js +295 -0
  326. package/packages/config-eslint/node_modules/eslint/lib/rules/no-ex-assign.js +57 -0
  327. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extend-native.js +180 -0
  328. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-bind.js +224 -0
  329. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-boolean-cast.js +420 -0
  330. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-label.js +169 -0
  331. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-parens.js +1669 -0
  332. package/packages/config-eslint/node_modules/eslint/lib/rules/no-extra-semi.js +167 -0
  333. package/packages/config-eslint/node_modules/eslint/lib/rules/no-fallthrough.js +260 -0
  334. package/packages/config-eslint/node_modules/eslint/lib/rules/no-floating-decimal.js +99 -0
  335. package/packages/config-eslint/node_modules/eslint/lib/rules/no-func-assign.js +77 -0
  336. package/packages/config-eslint/node_modules/eslint/lib/rules/no-global-assign.js +101 -0
  337. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implicit-coercion.js +468 -0
  338. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implicit-globals.js +187 -0
  339. package/packages/config-eslint/node_modules/eslint/lib/rules/no-implied-eval.js +171 -0
  340. package/packages/config-eslint/node_modules/eslint/lib/rules/no-import-assign.js +227 -0
  341. package/packages/config-eslint/node_modules/eslint/lib/rules/no-inline-comments.js +115 -0
  342. package/packages/config-eslint/node_modules/eslint/lib/rules/no-inner-declarations.js +147 -0
  343. package/packages/config-eslint/node_modules/eslint/lib/rules/no-invalid-regexp.js +244 -0
  344. package/packages/config-eslint/node_modules/eslint/lib/rules/no-invalid-this.js +178 -0
  345. package/packages/config-eslint/node_modules/eslint/lib/rules/no-irregular-whitespace.js +292 -0
  346. package/packages/config-eslint/node_modules/eslint/lib/rules/no-iterator.js +48 -0
  347. package/packages/config-eslint/node_modules/eslint/lib/rules/no-label-var.js +78 -0
  348. package/packages/config-eslint/node_modules/eslint/lib/rules/no-labels.js +156 -0
  349. package/packages/config-eslint/node_modules/eslint/lib/rules/no-lone-blocks.js +140 -0
  350. package/packages/config-eslint/node_modules/eslint/lib/rules/no-lonely-if.js +126 -0
  351. package/packages/config-eslint/node_modules/eslint/lib/rules/no-loop-func.js +267 -0
  352. package/packages/config-eslint/node_modules/eslint/lib/rules/no-loss-of-precision.js +249 -0
  353. package/packages/config-eslint/node_modules/eslint/lib/rules/no-magic-numbers.js +365 -0
  354. package/packages/config-eslint/node_modules/eslint/lib/rules/no-misleading-character-class.js +595 -0
  355. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-operators.js +253 -0
  356. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-requires.js +267 -0
  357. package/packages/config-eslint/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +148 -0
  358. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-assign.js +66 -0
  359. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-spaces.js +179 -0
  360. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multi-str.js +67 -0
  361. package/packages/config-eslint/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +210 -0
  362. package/packages/config-eslint/node_modules/eslint/lib/rules/no-native-reassign.js +114 -0
  363. package/packages/config-eslint/node_modules/eslint/lib/rules/no-negated-condition.js +100 -0
  364. package/packages/config-eslint/node_modules/eslint/lib/rules/no-negated-in-lhs.js +59 -0
  365. package/packages/config-eslint/node_modules/eslint/lib/rules/no-nested-ternary.js +46 -0
  366. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-func.js +96 -0
  367. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js +70 -0
  368. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-object.js +76 -0
  369. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-require.js +67 -0
  370. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-symbol.js +74 -0
  371. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new-wrappers.js +62 -0
  372. package/packages/config-eslint/node_modules/eslint/lib/rules/no-new.js +42 -0
  373. package/packages/config-eslint/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js +176 -0
  374. package/packages/config-eslint/node_modules/eslint/lib/rules/no-obj-calls.js +99 -0
  375. package/packages/config-eslint/node_modules/eslint/lib/rules/no-object-constructor.js +124 -0
  376. package/packages/config-eslint/node_modules/eslint/lib/rules/no-octal-escape.js +53 -0
  377. package/packages/config-eslint/node_modules/eslint/lib/rules/no-octal.js +42 -0
  378. package/packages/config-eslint/node_modules/eslint/lib/rules/no-param-reassign.js +248 -0
  379. package/packages/config-eslint/node_modules/eslint/lib/rules/no-path-concat.js +79 -0
  380. package/packages/config-eslint/node_modules/eslint/lib/rules/no-plusplus.js +102 -0
  381. package/packages/config-eslint/node_modules/eslint/lib/rules/no-process-env.js +68 -0
  382. package/packages/config-eslint/node_modules/eslint/lib/rules/no-process-exit.js +67 -0
  383. package/packages/config-eslint/node_modules/eslint/lib/rules/no-promise-executor-return.js +264 -0
  384. package/packages/config-eslint/node_modules/eslint/lib/rules/no-proto.js +45 -0
  385. package/packages/config-eslint/node_modules/eslint/lib/rules/no-prototype-builtins.js +181 -0
  386. package/packages/config-eslint/node_modules/eslint/lib/rules/no-redeclare.js +173 -0
  387. package/packages/config-eslint/node_modules/eslint/lib/rules/no-regex-spaces.js +219 -0
  388. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-exports.js +227 -0
  389. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-globals.js +266 -0
  390. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-imports.js +892 -0
  391. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-modules.js +249 -0
  392. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-properties.js +233 -0
  393. package/packages/config-eslint/node_modules/eslint/lib/rules/no-restricted-syntax.js +74 -0
  394. package/packages/config-eslint/node_modules/eslint/lib/rules/no-return-assign.js +87 -0
  395. package/packages/config-eslint/node_modules/eslint/lib/rules/no-return-await.js +162 -0
  396. package/packages/config-eslint/node_modules/eslint/lib/rules/no-script-url.js +68 -0
  397. package/packages/config-eslint/node_modules/eslint/lib/rules/no-self-assign.js +186 -0
  398. package/packages/config-eslint/node_modules/eslint/lib/rules/no-self-compare.js +77 -0
  399. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sequences.js +158 -0
  400. package/packages/config-eslint/node_modules/eslint/lib/rules/no-setter-return.js +224 -0
  401. package/packages/config-eslint/node_modules/eslint/lib/rules/no-shadow-restricted-names.js +113 -0
  402. package/packages/config-eslint/node_modules/eslint/lib/rules/no-shadow.js +689 -0
  403. package/packages/config-eslint/node_modules/eslint/lib/rules/no-spaced-func.js +105 -0
  404. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sparse-arrays.js +68 -0
  405. package/packages/config-eslint/node_modules/eslint/lib/rules/no-sync.js +81 -0
  406. package/packages/config-eslint/node_modules/eslint/lib/rules/no-tabs.js +110 -0
  407. package/packages/config-eslint/node_modules/eslint/lib/rules/no-template-curly-in-string.js +45 -0
  408. package/packages/config-eslint/node_modules/eslint/lib/rules/no-ternary.js +38 -0
  409. package/packages/config-eslint/node_modules/eslint/lib/rules/no-this-before-super.js +365 -0
  410. package/packages/config-eslint/node_modules/eslint/lib/rules/no-throw-literal.js +46 -0
  411. package/packages/config-eslint/node_modules/eslint/lib/rules/no-trailing-spaces.js +227 -0
  412. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unassigned-vars.js +80 -0
  413. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undef-init.js +101 -0
  414. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undef.js +84 -0
  415. package/packages/config-eslint/node_modules/eslint/lib/rules/no-undefined.js +85 -0
  416. package/packages/config-eslint/node_modules/eslint/lib/rules/no-underscore-dangle.js +383 -0
  417. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unexpected-multiline.js +130 -0
  418. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js +360 -0
  419. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unneeded-ternary.js +232 -0
  420. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unreachable-loop.js +190 -0
  421. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unreachable.js +300 -0
  422. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-finally.js +119 -0
  423. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-negation.js +152 -0
  424. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js +221 -0
  425. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-expressions.js +227 -0
  426. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-labels.js +158 -0
  427. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-private-class-members.js +219 -0
  428. package/packages/config-eslint/node_modules/eslint/lib/rules/no-unused-vars.js +1739 -0
  429. package/packages/config-eslint/node_modules/eslint/lib/rules/no-use-before-define.js +446 -0
  430. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-assignment.js +657 -0
  431. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-backreference.js +263 -0
  432. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-call.js +95 -0
  433. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-catch.js +57 -0
  434. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-computed-key.js +204 -0
  435. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-concat.js +121 -0
  436. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-constructor.js +262 -0
  437. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-escape.js +406 -0
  438. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-rename.js +202 -0
  439. package/packages/config-eslint/node_modules/eslint/lib/rules/no-useless-return.js +401 -0
  440. package/packages/config-eslint/node_modules/eslint/lib/rules/no-var.js +367 -0
  441. package/packages/config-eslint/node_modules/eslint/lib/rules/no-void.js +69 -0
  442. package/packages/config-eslint/node_modules/eslint/lib/rules/no-warning-comments.js +209 -0
  443. package/packages/config-eslint/node_modules/eslint/lib/rules/no-whitespace-before-property.js +150 -0
  444. package/packages/config-eslint/node_modules/eslint/lib/rules/no-with.js +37 -0
  445. package/packages/config-eslint/node_modules/eslint/lib/rules/nonblock-statement-body-position.js +164 -0
  446. package/packages/config-eslint/node_modules/eslint/lib/rules/object-curly-newline.js +383 -0
  447. package/packages/config-eslint/node_modules/eslint/lib/rules/object-curly-spacing.js +369 -0
  448. package/packages/config-eslint/node_modules/eslint/lib/rules/object-property-newline.js +151 -0
  449. package/packages/config-eslint/node_modules/eslint/lib/rules/object-shorthand.js +652 -0
  450. package/packages/config-eslint/node_modules/eslint/lib/rules/one-var-declaration-per-line.js +117 -0
  451. package/packages/config-eslint/node_modules/eslint/lib/rules/one-var.js +717 -0
  452. package/packages/config-eslint/node_modules/eslint/lib/rules/operator-assignment.js +270 -0
  453. package/packages/config-eslint/node_modules/eslint/lib/rules/operator-linebreak.js +315 -0
  454. package/packages/config-eslint/node_modules/eslint/lib/rules/padded-blocks.js +366 -0
  455. package/packages/config-eslint/node_modules/eslint/lib/rules/padding-line-between-statements.js +612 -0
  456. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-arrow-callback.js +437 -0
  457. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-const.js +546 -0
  458. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-destructuring.js +332 -0
  459. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js +235 -0
  460. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-named-capture-group.js +197 -0
  461. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-numeric-literals.js +157 -0
  462. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-object-has-own.js +148 -0
  463. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-object-spread.js +319 -0
  464. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js +154 -0
  465. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-reflect.js +150 -0
  466. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-regex-literals.js +605 -0
  467. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-rest-params.js +117 -0
  468. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-spread.js +91 -0
  469. package/packages/config-eslint/node_modules/eslint/lib/rules/prefer-template.js +347 -0
  470. package/packages/config-eslint/node_modules/eslint/lib/rules/preserve-caught-error.js +535 -0
  471. package/packages/config-eslint/node_modules/eslint/lib/rules/quote-props.js +394 -0
  472. package/packages/config-eslint/node_modules/eslint/lib/rules/quotes.js +416 -0
  473. package/packages/config-eslint/node_modules/eslint/lib/rules/radix.js +193 -0
  474. package/packages/config-eslint/node_modules/eslint/lib/rules/require-atomic-updates.js +365 -0
  475. package/packages/config-eslint/node_modules/eslint/lib/rules/require-await.js +184 -0
  476. package/packages/config-eslint/node_modules/eslint/lib/rules/require-unicode-regexp.js +317 -0
  477. package/packages/config-eslint/node_modules/eslint/lib/rules/require-yield.js +86 -0
  478. package/packages/config-eslint/node_modules/eslint/lib/rules/rest-spread-spacing.js +150 -0
  479. package/packages/config-eslint/node_modules/eslint/lib/rules/semi-spacing.js +297 -0
  480. package/packages/config-eslint/node_modules/eslint/lib/rules/semi-style.js +218 -0
  481. package/packages/config-eslint/node_modules/eslint/lib/rules/semi.js +476 -0
  482. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-imports.js +319 -0
  483. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-keys.js +268 -0
  484. package/packages/config-eslint/node_modules/eslint/lib/rules/sort-vars.js +140 -0
  485. package/packages/config-eslint/node_modules/eslint/lib/rules/space-before-blocks.js +232 -0
  486. package/packages/config-eslint/node_modules/eslint/lib/rules/space-before-function-paren.js +202 -0
  487. package/packages/config-eslint/node_modules/eslint/lib/rules/space-in-parens.js +374 -0
  488. package/packages/config-eslint/node_modules/eslint/lib/rules/space-infix-ops.js +249 -0
  489. package/packages/config-eslint/node_modules/eslint/lib/rules/space-unary-ops.js +400 -0
  490. package/packages/config-eslint/node_modules/eslint/lib/rules/spaced-comment.js +447 -0
  491. package/packages/config-eslint/node_modules/eslint/lib/rules/strict.js +324 -0
  492. package/packages/config-eslint/node_modules/eslint/lib/rules/switch-colon-spacing.js +158 -0
  493. package/packages/config-eslint/node_modules/eslint/lib/rules/symbol-description.js +70 -0
  494. package/packages/config-eslint/node_modules/eslint/lib/rules/template-curly-spacing.js +168 -0
  495. package/packages/config-eslint/node_modules/eslint/lib/rules/template-tag-spacing.js +121 -0
  496. package/packages/config-eslint/node_modules/eslint/lib/rules/unicode-bom.js +73 -0
  497. package/packages/config-eslint/node_modules/eslint/lib/rules/use-isnan.js +268 -0
  498. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/ast-utils.js +2841 -0
  499. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/char-source.js +247 -0
  500. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/fix-tracker.js +125 -0
  501. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/keywords.js +67 -0
  502. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js +118 -0
  503. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/regular-expressions.js +58 -0
  504. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/index.js +16 -0
  505. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-combining-character.js +13 -0
  506. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-emoji-modifier.js +13 -0
  507. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-regional-indicator-symbol.js +13 -0
  508. package/packages/config-eslint/node_modules/eslint/lib/rules/utils/unicode/is-surrogate-pair.js +14 -0
  509. package/packages/config-eslint/node_modules/eslint/lib/rules/valid-typeof.js +171 -0
  510. package/packages/config-eslint/node_modules/eslint/lib/rules/vars-on-top.js +165 -0
  511. package/packages/config-eslint/node_modules/eslint/lib/rules/wrap-iife.js +238 -0
  512. package/packages/config-eslint/node_modules/eslint/lib/rules/wrap-regex.js +91 -0
  513. package/packages/config-eslint/node_modules/eslint/lib/rules/yield-star-spacing.js +158 -0
  514. package/packages/config-eslint/node_modules/eslint/lib/rules/yoda.js +362 -0
  515. package/packages/config-eslint/node_modules/eslint/lib/services/parser-service.js +64 -0
  516. package/packages/config-eslint/node_modules/eslint/lib/services/processor-service.js +100 -0
  517. package/packages/config-eslint/node_modules/eslint/lib/services/suppressions-service.js +302 -0
  518. package/packages/config-eslint/node_modules/eslint/lib/services/warning-service.js +87 -0
  519. package/packages/config-eslint/node_modules/eslint/lib/shared/ajv.js +34 -0
  520. package/packages/config-eslint/node_modules/eslint/lib/shared/assert.js +21 -0
  521. package/packages/config-eslint/node_modules/eslint/lib/shared/ast-utils.js +30 -0
  522. package/packages/config-eslint/node_modules/eslint/lib/shared/deep-merge-arrays.js +62 -0
  523. package/packages/config-eslint/node_modules/eslint/lib/shared/directives.js +16 -0
  524. package/packages/config-eslint/node_modules/eslint/lib/shared/flags.js +89 -0
  525. package/packages/config-eslint/node_modules/eslint/lib/shared/logging.js +38 -0
  526. package/packages/config-eslint/node_modules/eslint/lib/shared/naming.js +109 -0
  527. package/packages/config-eslint/node_modules/eslint/lib/shared/option-utils.js +63 -0
  528. package/packages/config-eslint/node_modules/eslint/lib/shared/relative-module-resolver.js +28 -0
  529. package/packages/config-eslint/node_modules/eslint/lib/shared/runtime-info.js +177 -0
  530. package/packages/config-eslint/node_modules/eslint/lib/shared/serialization.js +78 -0
  531. package/packages/config-eslint/node_modules/eslint/lib/shared/severity.js +49 -0
  532. package/packages/config-eslint/node_modules/eslint/lib/shared/stats.js +30 -0
  533. package/packages/config-eslint/node_modules/eslint/lib/shared/string-utils.js +58 -0
  534. package/packages/config-eslint/node_modules/eslint/lib/shared/text-table.js +68 -0
  535. package/packages/config-eslint/node_modules/eslint/lib/shared/translate-cli-options.js +223 -0
  536. package/packages/config-eslint/node_modules/eslint/lib/shared/traverser.js +202 -0
  537. package/packages/config-eslint/node_modules/eslint/lib/types/config-api.d.ts +12 -0
  538. package/packages/config-eslint/node_modules/eslint/lib/types/index.d.ts +1475 -0
  539. package/packages/config-eslint/node_modules/eslint/lib/types/rules.d.ts +5603 -0
  540. package/packages/config-eslint/node_modules/eslint/lib/types/universal.d.ts +6 -0
  541. package/packages/config-eslint/node_modules/eslint/lib/types/use-at-your-own-risk.d.ts +34 -0
  542. package/packages/config-eslint/node_modules/eslint/lib/universal.js +10 -0
  543. package/packages/config-eslint/node_modules/eslint/lib/unsupported-api.js +21 -0
  544. package/packages/config-eslint/node_modules/eslint/messages/all-files-ignored.js +16 -0
  545. package/packages/config-eslint/node_modules/eslint/messages/all-matched-files-ignored.js +21 -0
  546. package/packages/config-eslint/node_modules/eslint/messages/config-file-missing.js +16 -0
  547. package/packages/config-eslint/node_modules/eslint/messages/config-plugin-missing.js +14 -0
  548. package/packages/config-eslint/node_modules/eslint/messages/config-serialize-function.js +30 -0
  549. package/packages/config-eslint/node_modules/eslint/messages/eslintrc-incompat.js +117 -0
  550. package/packages/config-eslint/node_modules/eslint/messages/eslintrc-plugins.js +27 -0
  551. package/packages/config-eslint/node_modules/eslint/messages/extend-config-missing.js +13 -0
  552. package/packages/config-eslint/node_modules/eslint/messages/failed-to-read-json.js +11 -0
  553. package/packages/config-eslint/node_modules/eslint/messages/file-not-found.js +10 -0
  554. package/packages/config-eslint/node_modules/eslint/messages/invalid-rule-options.js +17 -0
  555. package/packages/config-eslint/node_modules/eslint/messages/invalid-rule-severity.js +13 -0
  556. package/packages/config-eslint/node_modules/eslint/messages/no-config-found.js +15 -0
  557. package/packages/config-eslint/node_modules/eslint/messages/plugin-conflict.js +22 -0
  558. package/packages/config-eslint/node_modules/eslint/messages/plugin-invalid.js +16 -0
  559. package/packages/config-eslint/node_modules/eslint/messages/plugin-missing.js +19 -0
  560. package/packages/config-eslint/node_modules/eslint/messages/print-config-with-directory-path.js +8 -0
  561. package/packages/config-eslint/node_modules/eslint/messages/shared.js +23 -0
  562. package/packages/config-eslint/node_modules/eslint/messages/whitespace-found.js +11 -0
  563. package/packages/config-eslint/node_modules/eslint/package.json +220 -0
  564. package/packages/config-eslint/node_modules/eslint-scope/LICENSE +22 -0
  565. package/packages/config-eslint/node_modules/eslint-scope/README.md +206 -0
  566. package/packages/config-eslint/node_modules/eslint-scope/dist/eslint-scope.cjs +2420 -0
  567. package/packages/config-eslint/node_modules/eslint-scope/lib/assert.js +17 -0
  568. package/packages/config-eslint/node_modules/eslint-scope/lib/definition.js +89 -0
  569. package/packages/config-eslint/node_modules/eslint-scope/lib/index.d.cts +1069 -0
  570. package/packages/config-eslint/node_modules/eslint-scope/lib/index.d.ts +6 -0
  571. package/packages/config-eslint/node_modules/eslint-scope/lib/index.js +170 -0
  572. package/packages/config-eslint/node_modules/eslint-scope/lib/pattern-visitor.js +157 -0
  573. package/packages/config-eslint/node_modules/eslint-scope/lib/reference.js +165 -0
  574. package/packages/config-eslint/node_modules/eslint-scope/lib/referencer.js +712 -0
  575. package/packages/config-eslint/node_modules/eslint-scope/lib/scope-manager.js +271 -0
  576. package/packages/config-eslint/node_modules/eslint-scope/lib/scope.js +839 -0
  577. package/packages/config-eslint/node_modules/eslint-scope/lib/variable.js +91 -0
  578. package/packages/config-eslint/node_modules/eslint-scope/package.json +69 -0
  579. package/packages/config-eslint/node_modules/eslint-visitor-keys/LICENSE +201 -0
  580. package/packages/config-eslint/node_modules/eslint-visitor-keys/README.md +121 -0
  581. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +396 -0
  582. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +28 -0
  583. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/index.d.ts +16 -0
  584. package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +12 -0
  585. package/packages/config-eslint/node_modules/eslint-visitor-keys/lib/index.js +67 -0
  586. package/packages/config-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.js +327 -0
  587. package/packages/config-eslint/node_modules/eslint-visitor-keys/package.json +59 -0
  588. package/packages/config-eslint/node_modules/espree/LICENSE +25 -0
  589. package/packages/config-eslint/node_modules/espree/README.md +262 -0
  590. package/packages/config-eslint/node_modules/espree/dist/espree.cjs +1272 -0
  591. package/packages/config-eslint/node_modules/espree/dist/espree.d.cts +3 -0
  592. package/packages/config-eslint/node_modules/espree/dist/espree.d.cts.map +1 -0
  593. package/packages/config-eslint/node_modules/espree/dist/espree.d.ts +71 -0
  594. package/packages/config-eslint/node_modules/espree/dist/espree.d.ts.map +1 -0
  595. package/packages/config-eslint/node_modules/espree/espree.js +291 -0
  596. package/packages/config-eslint/node_modules/espree/lib/espree.js +482 -0
  597. package/packages/config-eslint/node_modules/espree/lib/features.js +21 -0
  598. package/packages/config-eslint/node_modules/espree/lib/options.js +164 -0
  599. package/packages/config-eslint/node_modules/espree/lib/token-translator.js +306 -0
  600. package/packages/config-eslint/node_modules/espree/lib/types.js +118 -0
  601. package/packages/config-eslint/node_modules/espree/package.json +72 -0
  602. package/packages/config-eslint/node_modules/ignore/LICENSE-MIT +21 -0
  603. package/packages/config-eslint/node_modules/ignore/README.md +412 -0
  604. package/packages/config-eslint/node_modules/ignore/index.d.ts +61 -0
  605. package/packages/config-eslint/node_modules/ignore/index.js +636 -0
  606. package/packages/config-eslint/node_modules/ignore/legacy.js +559 -0
  607. package/packages/config-eslint/node_modules/ignore/package.json +74 -0
  608. package/packages/config-eslint/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
  609. package/packages/config-eslint/node_modules/json-schema-traverse/.travis.yml +8 -0
  610. package/packages/config-eslint/node_modules/json-schema-traverse/LICENSE +21 -0
  611. package/packages/config-eslint/node_modules/json-schema-traverse/README.md +83 -0
  612. package/packages/config-eslint/node_modules/json-schema-traverse/index.js +89 -0
  613. package/packages/config-eslint/node_modules/json-schema-traverse/package.json +43 -0
  614. package/packages/config-eslint/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
  615. package/packages/config-eslint/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
  616. package/packages/config-eslint/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
  617. package/packages/config-eslint/node_modules/minimatch/LICENSE.md +55 -0
  618. package/packages/config-eslint/node_modules/minimatch/README.md +453 -0
  619. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
  620. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  621. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  622. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  623. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.d.ts +20 -0
  624. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
  625. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.js +591 -0
  626. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
  627. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
  628. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
  629. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
  630. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
  631. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
  632. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  633. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.js +30 -0
  634. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  635. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.d.ts +94 -0
  636. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  637. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.js +1029 -0
  638. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  639. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/package.json +3 -0
  640. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
  641. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  642. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
  643. package/packages/config-eslint/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  644. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
  645. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  646. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  647. package/packages/config-eslint/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  648. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.d.ts +20 -0
  649. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
  650. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.js +587 -0
  651. package/packages/config-eslint/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  652. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
  653. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
  654. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
  655. package/packages/config-eslint/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  656. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
  657. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  658. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.js +26 -0
  659. package/packages/config-eslint/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  660. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.d.ts +94 -0
  661. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  662. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.js +1016 -0
  663. package/packages/config-eslint/node_modules/minimatch/dist/esm/index.js.map +1 -0
  664. package/packages/config-eslint/node_modules/minimatch/dist/esm/package.json +3 -0
  665. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
  666. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  667. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.js +34 -0
  668. package/packages/config-eslint/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  669. package/packages/config-eslint/node_modules/minimatch/package.json +67 -0
  670. package/packages/config-eslint/package.json +7 -7
@@ -0,0 +1,1656 @@
1
+ // @ts-nocheck
2
+ // Copyright 2018-2025 the Deno authors. MIT license.
3
+ // Copyright the Browserify authors. MIT License.
4
+ function assertPath(path) {
5
+ if (typeof path !== "string") {
6
+ throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`);
7
+ }
8
+ }
9
+
10
+ // Copyright 2018-2025 the Deno authors. MIT license.
11
+ // This module is browser compatible.
12
+ function stripSuffix(name, suffix) {
13
+ if (suffix.length >= name.length) {
14
+ return name;
15
+ }
16
+ const lenDiff = name.length - suffix.length;
17
+ for(let i = suffix.length - 1; i >= 0; --i){
18
+ if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) {
19
+ return name;
20
+ }
21
+ }
22
+ return name.slice(0, -suffix.length);
23
+ }
24
+ function lastPathSegment(path, isSep, start = 0) {
25
+ let matchedNonSeparator = false;
26
+ let end = path.length;
27
+ for(let i = path.length - 1; i >= start; --i){
28
+ if (isSep(path.charCodeAt(i))) {
29
+ if (matchedNonSeparator) {
30
+ start = i + 1;
31
+ break;
32
+ }
33
+ } else if (!matchedNonSeparator) {
34
+ matchedNonSeparator = true;
35
+ end = i + 1;
36
+ }
37
+ }
38
+ return path.slice(start, end);
39
+ }
40
+ function assertArgs$1(path, suffix) {
41
+ assertPath(path);
42
+ if (path.length === 0) return path;
43
+ if (typeof suffix !== "string") {
44
+ throw new TypeError(`Suffix must be a string, received "${JSON.stringify(suffix)}"`);
45
+ }
46
+ }
47
+
48
+ // Copyright 2018-2025 the Deno authors. MIT license.
49
+ // Copyright the Browserify authors. MIT License.
50
+ // Ported from https://github.com/browserify/path-browserify/
51
+ // This module is browser compatible.
52
+ // Alphabet chars.
53
+ const CHAR_UPPERCASE_A = 65; /* A */
54
+ const CHAR_LOWERCASE_A = 97; /* a */
55
+ const CHAR_UPPERCASE_Z = 90; /* Z */
56
+ const CHAR_LOWERCASE_Z = 122; /* z */
57
+ // Non-alphabetic chars.
58
+ const CHAR_DOT = 46; /* . */
59
+ const CHAR_FORWARD_SLASH = 47; /* / */
60
+ const CHAR_BACKWARD_SLASH = 92; /* \ */
61
+ const CHAR_COLON = 58; /* : */
62
+ const CHAR_QUESTION_MARK = 63; /* ? */
63
+
64
+ // Copyright 2018-2025 the Deno authors. MIT license.
65
+ // Copyright the Browserify authors. MIT License.
66
+ // Ported from https://github.com/browserify/path-browserify/
67
+ // This module is browser compatible.
68
+ function stripTrailingSeparators(segment, isSep) {
69
+ if (segment.length <= 1) {
70
+ return segment;
71
+ }
72
+ let end = segment.length;
73
+ for(let i = segment.length - 1; i > 0; i--){
74
+ if (isSep(segment.charCodeAt(i))) {
75
+ end = i;
76
+ } else {
77
+ break;
78
+ }
79
+ }
80
+ return segment.slice(0, end);
81
+ }
82
+
83
+ // Copyright 2018-2025 the Deno authors. MIT license.
84
+ // Copyright the Browserify authors. MIT License.
85
+ // Ported from https://github.com/browserify/path-browserify/
86
+ // This module is browser compatible.
87
+ function isPosixPathSeparator(code) {
88
+ return code === CHAR_FORWARD_SLASH;
89
+ }
90
+ function isPathSeparator(code) {
91
+ return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
92
+ }
93
+ function isWindowsDeviceRoot(code) {
94
+ return code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z || code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z;
95
+ }
96
+
97
+ // Copyright 2018-2025 the Deno authors. MIT license.
98
+ // This module is browser compatible.
99
+ function assertArg$3(url) {
100
+ url = url instanceof URL ? url : new URL(url);
101
+ if (url.protocol !== "file:") {
102
+ throw new TypeError(`URL must be a file URL: received "${url.protocol}"`);
103
+ }
104
+ return url;
105
+ }
106
+
107
+ // Copyright 2018-2025 the Deno authors. MIT license.
108
+ // This module is browser compatible.
109
+ /**
110
+ * Converts a file URL to a path string.
111
+ *
112
+ * @example Usage
113
+ * ```ts
114
+ * import { fromFileUrl } from "@std/path/windows/from-file-url";
115
+ * import { assertEquals } from "@std/assert";
116
+ *
117
+ * assertEquals(fromFileUrl("file:///home/foo"), "\\home\\foo");
118
+ * assertEquals(fromFileUrl("file:///C:/Users/foo"), "C:\\Users\\foo");
119
+ * assertEquals(fromFileUrl("file://localhost/home/foo"), "\\home\\foo");
120
+ * ```
121
+ *
122
+ * @param url The file URL to convert.
123
+ * @returns The path string.
124
+ */ function fromFileUrl(url) {
125
+ url = assertArg$3(url);
126
+ let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
127
+ if (url.hostname !== "") {
128
+ // Note: The `URL` implementation guarantees that the drive letter and
129
+ // hostname are mutually exclusive. Otherwise it would not have been valid
130
+ // to append the hostname and path like this.
131
+ path = `\\\\${url.hostname}${path}`;
132
+ }
133
+ return path;
134
+ }
135
+
136
+ // Copyright 2018-2025 the Deno authors. MIT license.
137
+ // This module is browser compatible.
138
+ /**
139
+ * Return the last portion of a `path`.
140
+ * Trailing directory separators are ignored, and optional suffix is removed.
141
+ *
142
+ * @example Usage
143
+ * ```ts
144
+ * import { basename } from "@std/path/windows/basename";
145
+ * import { assertEquals } from "@std/assert";
146
+ *
147
+ * assertEquals(basename("C:\\user\\Documents\\"), "Documents");
148
+ * assertEquals(basename("C:\\user\\Documents\\image.png"), "image.png");
149
+ * assertEquals(basename("C:\\user\\Documents\\image.png", ".png"), "image");
150
+ * assertEquals(basename(new URL("file:///C:/user/Documents/image.png")), "image.png");
151
+ * assertEquals(basename(new URL("file:///C:/user/Documents/image.png"), ".png"), "image");
152
+ * ```
153
+ *
154
+ * @param path The path to extract the name from.
155
+ * @param suffix The suffix to remove from extracted name.
156
+ * @returns The extracted name.
157
+ */ function basename(path, suffix = "") {
158
+ if (path instanceof URL) {
159
+ path = fromFileUrl(path);
160
+ }
161
+ assertArgs$1(path, suffix);
162
+ // Check for a drive letter prefix so as not to mistake the following
163
+ // path separator as an extra separator at the end of the path that can be
164
+ // disregarded
165
+ let start = 0;
166
+ if (path.length >= 2) {
167
+ const drive = path.charCodeAt(0);
168
+ if (isWindowsDeviceRoot(drive)) {
169
+ if (path.charCodeAt(1) === CHAR_COLON) start = 2;
170
+ }
171
+ }
172
+ const lastSegment = lastPathSegment(path, isPathSeparator, start);
173
+ const strippedSegment = stripTrailingSeparators(lastSegment, isPathSeparator);
174
+ return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment;
175
+ }
176
+
177
+ // Copyright 2018-2025 the Deno authors. MIT license.
178
+ // This module is browser compatible.
179
+ /**
180
+ * The character used to separate entries in the PATH environment variable.
181
+ */ const DELIMITER = ";";
182
+ /**
183
+ * The character used to separate components of a file path.
184
+ */ const SEPARATOR = "\\";
185
+ /**
186
+ * A regular expression that matches one or more path separators.
187
+ */ const SEPARATOR_PATTERN = /[\\/]+/;
188
+
189
+ // Copyright 2018-2025 the Deno authors. MIT license.
190
+ // This module is browser compatible.
191
+ function assertArg$2(path) {
192
+ assertPath(path);
193
+ if (path.length === 0) return ".";
194
+ }
195
+
196
+ // Copyright 2018-2025 the Deno authors. MIT license.
197
+ // This module is browser compatible.
198
+ /**
199
+ * Return the directory path of a `path`.
200
+ *
201
+ * @example Usage
202
+ * ```ts
203
+ * import { dirname } from "@std/path/windows/dirname";
204
+ * import { assertEquals } from "@std/assert";
205
+ *
206
+ * assertEquals(dirname("C:\\foo\\bar\\baz.ext"), "C:\\foo\\bar");
207
+ * assertEquals(dirname(new URL("file:///C:/foo/bar/baz.ext")), "C:\\foo\\bar");
208
+ * ```
209
+ *
210
+ * @param path The path to get the directory from.
211
+ * @returns The directory path.
212
+ */ function dirname(path) {
213
+ if (path instanceof URL) {
214
+ path = fromFileUrl(path);
215
+ }
216
+ assertArg$2(path);
217
+ const len = path.length;
218
+ let rootEnd = -1;
219
+ let end = -1;
220
+ let matchedSlash = true;
221
+ let offset = 0;
222
+ const code = path.charCodeAt(0);
223
+ // Try to match a root
224
+ if (len > 1) {
225
+ if (isPathSeparator(code)) {
226
+ // Possible UNC root
227
+ rootEnd = offset = 1;
228
+ if (isPathSeparator(path.charCodeAt(1))) {
229
+ // Matched double path separator at beginning
230
+ let j = 2;
231
+ let last = j;
232
+ // Match 1 or more non-path separators
233
+ for(; j < len; ++j){
234
+ if (isPathSeparator(path.charCodeAt(j))) break;
235
+ }
236
+ if (j < len && j !== last) {
237
+ // Matched!
238
+ last = j;
239
+ // Match 1 or more path separators
240
+ for(; j < len; ++j){
241
+ if (!isPathSeparator(path.charCodeAt(j))) break;
242
+ }
243
+ if (j < len && j !== last) {
244
+ // Matched!
245
+ last = j;
246
+ // Match 1 or more non-path separators
247
+ for(; j < len; ++j){
248
+ if (isPathSeparator(path.charCodeAt(j))) break;
249
+ }
250
+ if (j === len) {
251
+ // We matched a UNC root only
252
+ return path;
253
+ }
254
+ if (j !== last) {
255
+ // We matched a UNC root with leftovers
256
+ // Offset by 1 to include the separator after the UNC root to
257
+ // treat it as a "normal root" on top of a (UNC) root
258
+ rootEnd = offset = j + 1;
259
+ }
260
+ }
261
+ }
262
+ }
263
+ } else if (isWindowsDeviceRoot(code)) {
264
+ // Possible device root
265
+ if (path.charCodeAt(1) === CHAR_COLON) {
266
+ rootEnd = offset = 2;
267
+ if (len > 2) {
268
+ if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3;
269
+ }
270
+ }
271
+ }
272
+ } else if (isPathSeparator(code)) {
273
+ // `path` contains just a path separator, exit early to avoid
274
+ // unnecessary work
275
+ return path;
276
+ }
277
+ for(let i = len - 1; i >= offset; --i){
278
+ if (isPathSeparator(path.charCodeAt(i))) {
279
+ if (!matchedSlash) {
280
+ end = i;
281
+ break;
282
+ }
283
+ } else {
284
+ // We saw the first non-path separator
285
+ matchedSlash = false;
286
+ }
287
+ }
288
+ if (end === -1) {
289
+ if (rootEnd === -1) return ".";
290
+ else end = rootEnd;
291
+ }
292
+ return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);
293
+ }
294
+
295
+ // Copyright 2018-2025 the Deno authors. MIT license.
296
+ // This module is browser compatible.
297
+ /**
298
+ * Return the extension of the `path` with leading period.
299
+ *
300
+ * @example Usage
301
+ * ```ts
302
+ * import { extname } from "@std/path/windows/extname";
303
+ * import { assertEquals } from "@std/assert";
304
+ *
305
+ * assertEquals(extname("file.ts"), ".ts");
306
+ * assertEquals(extname(new URL("file:///C:/foo/bar/baz.ext")), ".ext");
307
+ * ```
308
+ *
309
+ * @param path The path to get the extension from.
310
+ * @returns The extension of the `path`.
311
+ */ function extname(path) {
312
+ if (path instanceof URL) {
313
+ path = fromFileUrl(path);
314
+ }
315
+ assertPath(path);
316
+ let start = 0;
317
+ let startDot = -1;
318
+ let startPart = 0;
319
+ let end = -1;
320
+ let matchedSlash = true;
321
+ // Track the state of characters (if any) we see before our first dot and
322
+ // after any path separator we find
323
+ let preDotState = 0;
324
+ // Check for a drive letter prefix so as not to mistake the following
325
+ // path separator as an extra separator at the end of the path that can be
326
+ // disregarded
327
+ if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) {
328
+ start = startPart = 2;
329
+ }
330
+ for(let i = path.length - 1; i >= start; --i){
331
+ const code = path.charCodeAt(i);
332
+ if (isPathSeparator(code)) {
333
+ // If we reached a path separator that was not part of a set of path
334
+ // separators at the end of the string, stop now
335
+ if (!matchedSlash) {
336
+ startPart = i + 1;
337
+ break;
338
+ }
339
+ continue;
340
+ }
341
+ if (end === -1) {
342
+ // We saw the first non-path separator, mark this as the end of our
343
+ // extension
344
+ matchedSlash = false;
345
+ end = i + 1;
346
+ }
347
+ if (code === CHAR_DOT) {
348
+ // If this is our first dot, mark it as the start of our extension
349
+ if (startDot === -1) startDot = i;
350
+ else if (preDotState !== 1) preDotState = 1;
351
+ } else if (startDot !== -1) {
352
+ // We saw a non-dot and non-path separator before our dot, so we should
353
+ // have a good chance at having a non-empty extension
354
+ preDotState = -1;
355
+ }
356
+ }
357
+ if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
358
+ preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
359
+ preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
360
+ return "";
361
+ }
362
+ return path.slice(startDot, end);
363
+ }
364
+
365
+ // Copyright 2018-2025 the Deno authors. MIT license.
366
+ // This module is browser compatible.
367
+ function _format(sep, pathObject) {
368
+ const dir = pathObject.dir || pathObject.root;
369
+ const base = pathObject.base || (pathObject.name ?? "") + (pathObject.ext ?? "");
370
+ if (!dir) return base;
371
+ if (base === sep) return dir;
372
+ if (dir === pathObject.root) return dir + base;
373
+ return dir + sep + base;
374
+ }
375
+ function assertArg$1(pathObject) {
376
+ if (pathObject === null || typeof pathObject !== "object") {
377
+ throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof pathObject}"`);
378
+ }
379
+ }
380
+
381
+ // Copyright 2018-2025 the Deno authors. MIT license.
382
+ // This module is browser compatible.
383
+ /**
384
+ * Generate a path from `ParsedPath` object.
385
+ *
386
+ * @example Usage
387
+ * ```ts
388
+ * import { format } from "@std/path/windows/format";
389
+ * import { assertEquals } from "@std/assert";
390
+ *
391
+ * const path = format({
392
+ * root: "C:\\",
393
+ * dir: "C:\\path\\dir",
394
+ * base: "file.txt",
395
+ * ext: ".txt",
396
+ * name: "file"
397
+ * });
398
+ * assertEquals(path, "C:\\path\\dir\\file.txt");
399
+ * ```
400
+ *
401
+ * @param pathObject The path object to format.
402
+ * @returns The formatted path.
403
+ */ function format(pathObject) {
404
+ assertArg$1(pathObject);
405
+ return _format("\\", pathObject);
406
+ }
407
+
408
+ // Copyright 2018-2025 the Deno authors. MIT license.
409
+ // This module is browser compatible.
410
+ /**
411
+ * Verifies whether provided path is absolute.
412
+ *
413
+ * @example Usage
414
+ * ```ts
415
+ * import { isAbsolute } from "@std/path/windows/is-absolute";
416
+ * import { assert, assertFalse } from "@std/assert";
417
+ *
418
+ * assert(isAbsolute("C:\\foo\\bar"));
419
+ * assertFalse(isAbsolute("..\\baz"));
420
+ * ```
421
+ *
422
+ * @param path The path to verify.
423
+ * @returns `true` if the path is absolute, `false` otherwise.
424
+ */ function isAbsolute(path) {
425
+ assertPath(path);
426
+ const len = path.length;
427
+ if (len === 0) return false;
428
+ const code = path.charCodeAt(0);
429
+ if (isPathSeparator(code)) {
430
+ return true;
431
+ } else if (isWindowsDeviceRoot(code)) {
432
+ // Possible device root
433
+ if (len > 2 && path.charCodeAt(1) === CHAR_COLON) {
434
+ if (isPathSeparator(path.charCodeAt(2))) return true;
435
+ }
436
+ }
437
+ return false;
438
+ }
439
+
440
+ // Copyright 2018-2025 the Deno authors. MIT license.
441
+ // This module is browser compatible.
442
+ function assertArg(path) {
443
+ assertPath(path);
444
+ if (path.length === 0) return ".";
445
+ }
446
+
447
+ // Copyright 2018-2025 the Deno authors. MIT license.
448
+ // Copyright the Browserify authors. MIT License.
449
+ // Ported from https://github.com/browserify/path-browserify/
450
+ // This module is browser compatible.
451
+ // Resolves . and .. elements in a path with directory names
452
+ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
453
+ let res = "";
454
+ let lastSegmentLength = 0;
455
+ let lastSlash = -1;
456
+ let dots = 0;
457
+ let code;
458
+ for(let i = 0; i <= path.length; ++i){
459
+ if (i < path.length) code = path.charCodeAt(i);
460
+ else if (isPathSeparator(code)) break;
461
+ else code = CHAR_FORWARD_SLASH;
462
+ if (isPathSeparator(code)) {
463
+ if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) {
464
+ if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) {
465
+ if (res.length > 2) {
466
+ const lastSlashIndex = res.lastIndexOf(separator);
467
+ if (lastSlashIndex === -1) {
468
+ res = "";
469
+ lastSegmentLength = 0;
470
+ } else {
471
+ res = res.slice(0, lastSlashIndex);
472
+ lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);
473
+ }
474
+ lastSlash = i;
475
+ dots = 0;
476
+ continue;
477
+ } else if (res.length === 2 || res.length === 1) {
478
+ res = "";
479
+ lastSegmentLength = 0;
480
+ lastSlash = i;
481
+ dots = 0;
482
+ continue;
483
+ }
484
+ }
485
+ if (allowAboveRoot) {
486
+ if (res.length > 0) res += `${separator}..`;
487
+ else res = "..";
488
+ lastSegmentLength = 2;
489
+ }
490
+ } else {
491
+ if (res.length > 0) res += separator + path.slice(lastSlash + 1, i);
492
+ else res = path.slice(lastSlash + 1, i);
493
+ lastSegmentLength = i - lastSlash - 1;
494
+ }
495
+ lastSlash = i;
496
+ dots = 0;
497
+ } else if (code === CHAR_DOT && dots !== -1) {
498
+ ++dots;
499
+ } else {
500
+ dots = -1;
501
+ }
502
+ }
503
+ return res;
504
+ }
505
+
506
+ // Copyright 2018-2025 the Deno authors. MIT license.
507
+ // This module is browser compatible.
508
+ /**
509
+ * Normalize the `path`, resolving `'..'` and `'.'` segments.
510
+ * Note that resolving these segments does not necessarily mean that all will be eliminated.
511
+ * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.
512
+ *
513
+ * @example Usage
514
+ * ```ts
515
+ * import { normalize } from "@std/path/windows/normalize";
516
+ * import { assertEquals } from "@std/assert";
517
+ *
518
+ * assertEquals(normalize("C:\\foo\\..\\bar"), "C:\\bar");
519
+ * assertEquals(normalize(new URL("file:///C:/foo/../bar")), "C:\\bar");
520
+ * ```
521
+ *
522
+ * @param path The path to normalize
523
+ * @returns The normalized path
524
+ */ function normalize(path) {
525
+ if (path instanceof URL) {
526
+ path = fromFileUrl(path);
527
+ }
528
+ assertArg(path);
529
+ const len = path.length;
530
+ let rootEnd = 0;
531
+ let device;
532
+ let isAbsolute = false;
533
+ const code = path.charCodeAt(0);
534
+ // Try to match a root
535
+ if (len > 1) {
536
+ if (isPathSeparator(code)) {
537
+ // Possible UNC root
538
+ // If we started with a separator, we know we at least have an absolute
539
+ // path of some kind (UNC or otherwise)
540
+ isAbsolute = true;
541
+ if (isPathSeparator(path.charCodeAt(1))) {
542
+ // Matched double path separator at beginning
543
+ let j = 2;
544
+ let last = j;
545
+ // Match 1 or more non-path separators
546
+ for(; j < len; ++j){
547
+ if (isPathSeparator(path.charCodeAt(j))) break;
548
+ }
549
+ if (j < len && j !== last) {
550
+ const firstPart = path.slice(last, j);
551
+ // Matched!
552
+ last = j;
553
+ // Match 1 or more path separators
554
+ for(; j < len; ++j){
555
+ if (!isPathSeparator(path.charCodeAt(j))) break;
556
+ }
557
+ if (j < len && j !== last) {
558
+ // Matched!
559
+ last = j;
560
+ // Match 1 or more non-path separators
561
+ for(; j < len; ++j){
562
+ if (isPathSeparator(path.charCodeAt(j))) break;
563
+ }
564
+ if (j === len) {
565
+ // We matched a UNC root only
566
+ // Return the normalized version of the UNC root since there
567
+ // is nothing left to process
568
+ return `\\\\${firstPart}\\${path.slice(last)}\\`;
569
+ } else if (j !== last) {
570
+ // We matched a UNC root with leftovers
571
+ device = `\\\\${firstPart}\\${path.slice(last, j)}`;
572
+ rootEnd = j;
573
+ }
574
+ }
575
+ }
576
+ } else {
577
+ rootEnd = 1;
578
+ }
579
+ } else if (isWindowsDeviceRoot(code)) {
580
+ // Possible device root
581
+ if (path.charCodeAt(1) === CHAR_COLON) {
582
+ device = path.slice(0, 2);
583
+ rootEnd = 2;
584
+ if (len > 2) {
585
+ if (isPathSeparator(path.charCodeAt(2))) {
586
+ // Treat separator following drive name as an absolute path
587
+ // indicator
588
+ isAbsolute = true;
589
+ rootEnd = 3;
590
+ }
591
+ }
592
+ }
593
+ }
594
+ } else if (isPathSeparator(code)) {
595
+ // `path` contains just a path separator, exit early to avoid unnecessary
596
+ // work
597
+ return "\\";
598
+ }
599
+ let tail;
600
+ if (rootEnd < len) {
601
+ tail = normalizeString(path.slice(rootEnd), !isAbsolute, "\\", isPathSeparator);
602
+ } else {
603
+ tail = "";
604
+ }
605
+ if (tail.length === 0 && !isAbsolute) tail = ".";
606
+ if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {
607
+ tail += "\\";
608
+ }
609
+ if (device === undefined) {
610
+ if (isAbsolute) {
611
+ if (tail.length > 0) return `\\${tail}`;
612
+ else return "\\";
613
+ }
614
+ return tail;
615
+ } else if (isAbsolute) {
616
+ if (tail.length > 0) return `${device}\\${tail}`;
617
+ else return `${device}\\`;
618
+ }
619
+ return device + tail;
620
+ }
621
+
622
+ // Copyright 2018-2025 the Deno authors. MIT license.
623
+ // This module is browser compatible.
624
+ /**
625
+ * Join all given a sequence of `paths`,then normalizes the resulting path.
626
+ *
627
+ * @example Usage
628
+ * ```ts
629
+ * import { join } from "@std/path/windows/join";
630
+ * import { assertEquals } from "@std/assert";
631
+ *
632
+ * assertEquals(join("C:\\foo", "bar", "baz\\.."), "C:\\foo\\bar");
633
+ * assertEquals(join(new URL("file:///C:/foo"), "bar", "baz\\.."), "C:\\foo\\bar");
634
+ * ```
635
+ *
636
+ * @param path The path to join. This can be string or file URL.
637
+ * @param paths The paths to join.
638
+ * @returns The joined path.
639
+ */ function join(path, ...paths) {
640
+ if (path instanceof URL) {
641
+ path = fromFileUrl(path);
642
+ }
643
+ paths = path ? [
644
+ path,
645
+ ...paths
646
+ ] : paths;
647
+ paths.forEach((path)=>assertPath(path));
648
+ paths = paths.filter((path)=>path.length > 0);
649
+ if (paths.length === 0) return ".";
650
+ // Make sure that the joined path doesn't start with two slashes, because
651
+ // normalize() will mistake it for an UNC path then.
652
+ //
653
+ // This step is skipped when it is very clear that the user actually
654
+ // intended to point at an UNC path. This is assumed when the first
655
+ // non-empty string arguments starts with exactly two slashes followed by
656
+ // at least one more non-slash character.
657
+ //
658
+ // Note that for normalize() to treat a path as an UNC path it needs to
659
+ // have at least 2 components, so we don't filter for that here.
660
+ // This means that the user can use join to construct UNC paths from
661
+ // a server name and a share name; for example:
662
+ // path.join('//server', 'share') -> '\\\\server\\share\\'
663
+ let needsReplace = true;
664
+ let slashCount = 0;
665
+ const firstPart = paths[0];
666
+ if (isPathSeparator(firstPart.charCodeAt(0))) {
667
+ ++slashCount;
668
+ const firstLen = firstPart.length;
669
+ if (firstLen > 1) {
670
+ if (isPathSeparator(firstPart.charCodeAt(1))) {
671
+ ++slashCount;
672
+ if (firstLen > 2) {
673
+ if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount;
674
+ else {
675
+ // We matched a UNC path in the first part
676
+ needsReplace = false;
677
+ }
678
+ }
679
+ }
680
+ }
681
+ }
682
+ let joined = paths.join("\\");
683
+ if (needsReplace) {
684
+ // Find any more consecutive slashes we need to replace
685
+ for(; slashCount < joined.length; ++slashCount){
686
+ if (!isPathSeparator(joined.charCodeAt(slashCount))) break;
687
+ }
688
+ // Replace the slashes if needed
689
+ if (slashCount >= 2) joined = `\\${joined.slice(slashCount)}`;
690
+ }
691
+ return normalize(joined);
692
+ }
693
+
694
+ // Copyright 2018-2025 the Deno authors. MIT license.
695
+ // This module is browser compatible.
696
+ /**
697
+ * Return a `ParsedPath` object of the `path`.
698
+ *
699
+ * @example Usage
700
+ * ```ts
701
+ * import { parse } from "@std/path/windows/parse";
702
+ * import { assertEquals } from "@std/assert";
703
+ *
704
+ * const parsed = parse("C:\\foo\\bar\\baz.ext");
705
+ * assertEquals(parsed, {
706
+ * root: "C:\\",
707
+ * dir: "C:\\foo\\bar",
708
+ * base: "baz.ext",
709
+ * ext: ".ext",
710
+ * name: "baz",
711
+ * });
712
+ * ```
713
+ *
714
+ * @param path The path to parse.
715
+ * @returns The `ParsedPath` object.
716
+ */ function parse(path) {
717
+ assertPath(path);
718
+ const ret = {
719
+ root: "",
720
+ dir: "",
721
+ base: "",
722
+ ext: "",
723
+ name: ""
724
+ };
725
+ const len = path.length;
726
+ if (len === 0) return ret;
727
+ let rootEnd = 0;
728
+ let code = path.charCodeAt(0);
729
+ // Try to match a root
730
+ if (len > 1) {
731
+ if (isPathSeparator(code)) {
732
+ // Possible UNC root
733
+ rootEnd = 1;
734
+ if (isPathSeparator(path.charCodeAt(1))) {
735
+ // Matched double path separator at beginning
736
+ let j = 2;
737
+ let last = j;
738
+ // Match 1 or more non-path separators
739
+ for(; j < len; ++j){
740
+ if (isPathSeparator(path.charCodeAt(j))) break;
741
+ }
742
+ if (j < len && j !== last) {
743
+ // Matched!
744
+ last = j;
745
+ // Match 1 or more path separators
746
+ for(; j < len; ++j){
747
+ if (!isPathSeparator(path.charCodeAt(j))) break;
748
+ }
749
+ if (j < len && j !== last) {
750
+ // Matched!
751
+ last = j;
752
+ // Match 1 or more non-path separators
753
+ for(; j < len; ++j){
754
+ if (isPathSeparator(path.charCodeAt(j))) break;
755
+ }
756
+ if (j === len) {
757
+ // We matched a UNC root only
758
+ rootEnd = j;
759
+ } else if (j !== last) {
760
+ // We matched a UNC root with leftovers
761
+ rootEnd = j + 1;
762
+ }
763
+ }
764
+ }
765
+ }
766
+ } else if (isWindowsDeviceRoot(code)) {
767
+ // Possible device root
768
+ if (path.charCodeAt(1) === CHAR_COLON) {
769
+ rootEnd = 2;
770
+ if (len > 2) {
771
+ if (isPathSeparator(path.charCodeAt(2))) {
772
+ if (len === 3) {
773
+ // `path` contains just a drive root, exit early to avoid
774
+ // unnecessary work
775
+ ret.root = ret.dir = path;
776
+ ret.base = "\\";
777
+ return ret;
778
+ }
779
+ rootEnd = 3;
780
+ }
781
+ } else {
782
+ // `path` contains just a relative drive root, exit early to avoid
783
+ // unnecessary work
784
+ ret.root = ret.dir = path;
785
+ return ret;
786
+ }
787
+ }
788
+ }
789
+ } else if (isPathSeparator(code)) {
790
+ // `path` contains just a path separator, exit early to avoid
791
+ // unnecessary work
792
+ ret.root = ret.dir = path;
793
+ ret.base = "\\";
794
+ return ret;
795
+ }
796
+ if (rootEnd > 0) ret.root = path.slice(0, rootEnd);
797
+ let startDot = -1;
798
+ let startPart = rootEnd;
799
+ let end = -1;
800
+ let matchedSlash = true;
801
+ let i = path.length - 1;
802
+ // Track the state of characters (if any) we see before our first dot and
803
+ // after any path separator we find
804
+ let preDotState = 0;
805
+ // Get non-dir info
806
+ for(; i >= rootEnd; --i){
807
+ code = path.charCodeAt(i);
808
+ if (isPathSeparator(code)) {
809
+ // If we reached a path separator that was not part of a set of path
810
+ // separators at the end of the string, stop now
811
+ if (!matchedSlash) {
812
+ startPart = i + 1;
813
+ break;
814
+ }
815
+ continue;
816
+ }
817
+ if (end === -1) {
818
+ // We saw the first non-path separator, mark this as the end of our
819
+ // extension
820
+ matchedSlash = false;
821
+ end = i + 1;
822
+ }
823
+ if (code === CHAR_DOT) {
824
+ // If this is our first dot, mark it as the start of our extension
825
+ if (startDot === -1) startDot = i;
826
+ else if (preDotState !== 1) preDotState = 1;
827
+ } else if (startDot !== -1) {
828
+ // We saw a non-dot and non-path separator before our dot, so we should
829
+ // have a good chance at having a non-empty extension
830
+ preDotState = -1;
831
+ }
832
+ }
833
+ if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot
834
+ preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
835
+ preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
836
+ if (end !== -1) {
837
+ ret.base = ret.name = path.slice(startPart, end);
838
+ }
839
+ } else {
840
+ ret.name = path.slice(startPart, startDot);
841
+ ret.base = path.slice(startPart, end);
842
+ ret.ext = path.slice(startDot, end);
843
+ }
844
+ // Fallback to '\' in case there is no basename
845
+ ret.base = ret.base || "\\";
846
+ // If the directory is the root, use the entire root as the `dir` including
847
+ // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the
848
+ // trailing slash (`C:\abc\def` -> `C:\abc`).
849
+ if (startPart > 0 && startPart !== rootEnd) {
850
+ ret.dir = path.slice(0, startPart - 1);
851
+ } else ret.dir = ret.root;
852
+ return ret;
853
+ }
854
+
855
+ // Copyright 2018-2025 the Deno authors. MIT license.
856
+ // This module is browser compatible.
857
+ /**
858
+ * Resolves path segments into a `path`.
859
+ *
860
+ * @example Usage
861
+ * ```ts
862
+ * import { resolve } from "@std/path/windows/resolve";
863
+ * import { assertEquals } from "@std/assert";
864
+ *
865
+ * const resolved = resolve("C:\\foo\\bar", "..\\baz");
866
+ * assertEquals(resolved, "C:\\foo\\baz");
867
+ * ```
868
+ *
869
+ * @param pathSegments The path segments to process to path
870
+ * @returns The resolved path
871
+ */ function resolve(...pathSegments) {
872
+ let resolvedDevice = "";
873
+ let resolvedTail = "";
874
+ let resolvedAbsolute = false;
875
+ for(let i = pathSegments.length - 1; i >= -1; i--){
876
+ let path;
877
+ // deno-lint-ignore no-explicit-any
878
+ const { Deno } = globalThis;
879
+ if (i >= 0) {
880
+ path = pathSegments[i];
881
+ } else if (!resolvedDevice) {
882
+ if (typeof Deno?.cwd !== "function") {
883
+ throw new TypeError("Resolved a drive-letter-less path without a current working directory (CWD)");
884
+ }
885
+ path = Deno.cwd();
886
+ } else {
887
+ if (typeof Deno?.env?.get !== "function" || typeof Deno?.cwd !== "function") {
888
+ throw new TypeError("Resolved a relative path without a current working directory (CWD)");
889
+ }
890
+ path = Deno.cwd();
891
+ // Verify that a cwd was found and that it actually points
892
+ // to our drive. If not, default to the drive's root.
893
+ if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) {
894
+ path = `${resolvedDevice}\\`;
895
+ }
896
+ }
897
+ assertPath(path);
898
+ const len = path.length;
899
+ // Skip empty entries
900
+ if (len === 0) continue;
901
+ let rootEnd = 0;
902
+ let device = "";
903
+ let isAbsolute = false;
904
+ const code = path.charCodeAt(0);
905
+ // Try to match a root
906
+ if (len > 1) {
907
+ if (isPathSeparator(code)) {
908
+ // Possible UNC root
909
+ // If we started with a separator, we know we at least have an
910
+ // absolute path of some kind (UNC or otherwise)
911
+ isAbsolute = true;
912
+ if (isPathSeparator(path.charCodeAt(1))) {
913
+ // Matched double path separator at beginning
914
+ let j = 2;
915
+ let last = j;
916
+ // Match 1 or more non-path separators
917
+ for(; j < len; ++j){
918
+ if (isPathSeparator(path.charCodeAt(j))) break;
919
+ }
920
+ if (j < len && j !== last) {
921
+ const firstPart = path.slice(last, j);
922
+ // Matched!
923
+ last = j;
924
+ // Match 1 or more path separators
925
+ for(; j < len; ++j){
926
+ if (!isPathSeparator(path.charCodeAt(j))) break;
927
+ }
928
+ if (j < len && j !== last) {
929
+ // Matched!
930
+ last = j;
931
+ // Match 1 or more non-path separators
932
+ for(; j < len; ++j){
933
+ if (isPathSeparator(path.charCodeAt(j))) break;
934
+ }
935
+ if (j === len) {
936
+ // We matched a UNC root only
937
+ device = `\\\\${firstPart}\\${path.slice(last)}`;
938
+ rootEnd = j;
939
+ } else if (j !== last) {
940
+ // We matched a UNC root with leftovers
941
+ device = `\\\\${firstPart}\\${path.slice(last, j)}`;
942
+ rootEnd = j;
943
+ }
944
+ }
945
+ }
946
+ } else {
947
+ rootEnd = 1;
948
+ }
949
+ } else if (isWindowsDeviceRoot(code)) {
950
+ // Possible device root
951
+ if (path.charCodeAt(1) === CHAR_COLON) {
952
+ device = path.slice(0, 2);
953
+ rootEnd = 2;
954
+ if (len > 2) {
955
+ if (isPathSeparator(path.charCodeAt(2))) {
956
+ // Treat separator following drive name as an absolute path
957
+ // indicator
958
+ isAbsolute = true;
959
+ rootEnd = 3;
960
+ }
961
+ }
962
+ }
963
+ }
964
+ } else if (isPathSeparator(code)) {
965
+ // `path` contains just a path separator
966
+ rootEnd = 1;
967
+ isAbsolute = true;
968
+ }
969
+ if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) {
970
+ continue;
971
+ }
972
+ if (resolvedDevice.length === 0 && device.length > 0) {
973
+ resolvedDevice = device;
974
+ }
975
+ if (!resolvedAbsolute) {
976
+ resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`;
977
+ resolvedAbsolute = isAbsolute;
978
+ }
979
+ if (resolvedAbsolute && resolvedDevice.length > 0) break;
980
+ }
981
+ // At this point the path should be resolved to a full absolute path,
982
+ // but handle relative paths to be safe (might happen when Deno.cwd()
983
+ // fails)
984
+ // Normalize the tail path
985
+ resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, "\\", isPathSeparator);
986
+ return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
987
+ }
988
+
989
+ // Copyright 2018-2025 the Deno authors. MIT license.
990
+ // This module is browser compatible.
991
+ function assertArgs(from, to) {
992
+ assertPath(from);
993
+ assertPath(to);
994
+ if (from === to) return "";
995
+ }
996
+
997
+ // Copyright 2018-2025 the Deno authors. MIT license.
998
+ // This module is browser compatible.
999
+ /**
1000
+ * Return the relative path from `from` to `to` based on current working directory.
1001
+ *
1002
+ * An example in windows, for instance:
1003
+ * from = 'C:\\orandea\\test\\aaa'
1004
+ * to = 'C:\\orandea\\impl\\bbb'
1005
+ * The output of the function should be: '..\\..\\impl\\bbb'
1006
+ *
1007
+ * @example Usage
1008
+ * ```ts
1009
+ * import { relative } from "@std/path/windows/relative";
1010
+ * import { assertEquals } from "@std/assert";
1011
+ *
1012
+ * const relativePath = relative("C:\\foobar\\test\\aaa", "C:\\foobar\\impl\\bbb");
1013
+ * assertEquals(relativePath, "..\\..\\impl\\bbb");
1014
+ * ```
1015
+ *
1016
+ * @param from The path from which to calculate the relative path
1017
+ * @param to The path to which to calculate the relative path
1018
+ * @returns The relative path from `from` to `to`
1019
+ */ function relative(from, to) {
1020
+ assertArgs(from, to);
1021
+ const fromOrig = resolve(from);
1022
+ const toOrig = resolve(to);
1023
+ if (fromOrig === toOrig) return "";
1024
+ from = fromOrig.toLowerCase();
1025
+ to = toOrig.toLowerCase();
1026
+ if (from === to) return "";
1027
+ // Trim any leading backslashes
1028
+ let fromStart = 0;
1029
+ let fromEnd = from.length;
1030
+ for(; fromStart < fromEnd; ++fromStart){
1031
+ if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH) break;
1032
+ }
1033
+ // Trim trailing backslashes (applicable to UNC paths only)
1034
+ for(; fromEnd - 1 > fromStart; --fromEnd){
1035
+ if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH) break;
1036
+ }
1037
+ const fromLen = fromEnd - fromStart;
1038
+ // Trim any leading backslashes
1039
+ let toStart = 0;
1040
+ let toEnd = to.length;
1041
+ for(; toStart < toEnd; ++toStart){
1042
+ if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH) break;
1043
+ }
1044
+ // Trim trailing backslashes (applicable to UNC paths only)
1045
+ for(; toEnd - 1 > toStart; --toEnd){
1046
+ if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH) break;
1047
+ }
1048
+ const toLen = toEnd - toStart;
1049
+ // Compare paths to find the longest common path from root
1050
+ const length = fromLen < toLen ? fromLen : toLen;
1051
+ let lastCommonSep = -1;
1052
+ let i = 0;
1053
+ for(; i <= length; ++i){
1054
+ if (i === length) {
1055
+ if (toLen > length) {
1056
+ if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {
1057
+ // We get here if `from` is the exact base path for `to`.
1058
+ // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz'
1059
+ return toOrig.slice(toStart + i + 1);
1060
+ } else if (i === 2) {
1061
+ // We get here if `from` is the device root.
1062
+ // For example: from='C:\\'; to='C:\\foo'
1063
+ return toOrig.slice(toStart + i);
1064
+ }
1065
+ }
1066
+ if (fromLen > length) {
1067
+ if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {
1068
+ // We get here if `to` is the exact base path for `from`.
1069
+ // For example: from='C:\\foo\\bar'; to='C:\\foo'
1070
+ lastCommonSep = i;
1071
+ } else if (i === 2) {
1072
+ // We get here if `to` is the device root.
1073
+ // For example: from='C:\\foo\\bar'; to='C:\\'
1074
+ lastCommonSep = 3;
1075
+ }
1076
+ }
1077
+ break;
1078
+ }
1079
+ const fromCode = from.charCodeAt(fromStart + i);
1080
+ const toCode = to.charCodeAt(toStart + i);
1081
+ if (fromCode !== toCode) break;
1082
+ else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i;
1083
+ }
1084
+ // We found a mismatch before the first common path separator was seen, so
1085
+ // return the original `to`.
1086
+ if (i !== length && lastCommonSep === -1) {
1087
+ return toOrig;
1088
+ }
1089
+ let out = "";
1090
+ if (lastCommonSep === -1) lastCommonSep = 0;
1091
+ // Generate the relative path based on the path difference between `to` and
1092
+ // `from`
1093
+ for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){
1094
+ if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {
1095
+ if (out.length === 0) out += "..";
1096
+ else out += "\\..";
1097
+ }
1098
+ }
1099
+ // Lastly, append the rest of the destination (`to`) path that comes after
1100
+ // the common path parts
1101
+ if (out.length > 0) {
1102
+ return out + toOrig.slice(toStart + lastCommonSep, toEnd);
1103
+ } else {
1104
+ toStart += lastCommonSep;
1105
+ if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart;
1106
+ return toOrig.slice(toStart, toEnd);
1107
+ }
1108
+ }
1109
+
1110
+ // Copyright 2018-2025 the Deno authors. MIT license.
1111
+ // This module is browser compatible.
1112
+ const WHITESPACE_ENCODINGS = {
1113
+ "\u0009": "%09",
1114
+ "\u000A": "%0A",
1115
+ "\u000B": "%0B",
1116
+ "\u000C": "%0C",
1117
+ "\u000D": "%0D",
1118
+ "\u0020": "%20"
1119
+ };
1120
+ function encodeWhitespace(string) {
1121
+ return string.replaceAll(/[\s]/g, (c)=>{
1122
+ return WHITESPACE_ENCODINGS[c] ?? c;
1123
+ });
1124
+ }
1125
+
1126
+ // Copyright 2018-2025 the Deno authors. MIT license.
1127
+ // This module is browser compatible.
1128
+ /**
1129
+ * Converts a path string to a file URL.
1130
+ *
1131
+ * @example Usage
1132
+ * ```ts
1133
+ * import { toFileUrl } from "@std/path/windows/to-file-url";
1134
+ * import { assertEquals } from "@std/assert";
1135
+ *
1136
+ * assertEquals(toFileUrl("\\home\\foo"), new URL("file:///home/foo"));
1137
+ * assertEquals(toFileUrl("C:\\Users\\foo"), new URL("file:///C:/Users/foo"));
1138
+ * assertEquals(toFileUrl("\\\\127.0.0.1\\home\\foo"), new URL("file://127.0.0.1/home/foo"));
1139
+ * ```
1140
+ * @param path The path to convert.
1141
+ * @returns The file URL.
1142
+ */ function toFileUrl(path) {
1143
+ if (!isAbsolute(path)) {
1144
+ throw new TypeError(`Path must be absolute: received "${path}"`);
1145
+ }
1146
+ const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
1147
+ const url = new URL("file:///");
1148
+ url.pathname = encodeWhitespace(pathname.replace(/%/g, "%25"));
1149
+ if (hostname !== undefined && hostname !== "localhost") {
1150
+ url.hostname = hostname;
1151
+ if (!url.hostname) {
1152
+ throw new TypeError(`Invalid hostname: "${url.hostname}"`);
1153
+ }
1154
+ }
1155
+ return url;
1156
+ }
1157
+
1158
+ // Copyright 2018-2025 the Deno authors. MIT license.
1159
+ // This module is browser compatible.
1160
+ /**
1161
+ * Resolves path to a namespace path
1162
+ *
1163
+ * @example Usage
1164
+ * ```ts
1165
+ * import { toNamespacedPath } from "@std/path/windows/to-namespaced-path";
1166
+ * import { assertEquals } from "@std/assert";
1167
+ *
1168
+ * const namespaced = toNamespacedPath("C:\\foo\\bar");
1169
+ * assertEquals(namespaced, "\\\\?\\C:\\foo\\bar");
1170
+ * ```
1171
+ *
1172
+ * @param path The path to resolve to namespaced path
1173
+ * @returns The resolved namespaced path
1174
+ */ function toNamespacedPath(path) {
1175
+ // Note: this will *probably* throw somewhere.
1176
+ if (typeof path !== "string") return path;
1177
+ if (path.length === 0) return "";
1178
+ const resolvedPath = resolve(path);
1179
+ if (resolvedPath.length >= 3) {
1180
+ if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {
1181
+ // Possible UNC root
1182
+ if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {
1183
+ const code = resolvedPath.charCodeAt(2);
1184
+ if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {
1185
+ // Matched non-long UNC root, convert the path to a long UNC path
1186
+ return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
1187
+ }
1188
+ }
1189
+ } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) {
1190
+ // Possible device root
1191
+ if (resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {
1192
+ // Matched device root, convert the path to a long UNC path
1193
+ return `\\\\?\\${resolvedPath}`;
1194
+ }
1195
+ }
1196
+ }
1197
+ return path;
1198
+ }
1199
+
1200
+ // Copyright 2018-2025 the Deno authors. MIT license.
1201
+ // This module is browser compatible.
1202
+ function common$1(paths, sep) {
1203
+ const [first = "", ...remaining] = paths;
1204
+ const parts = first.split(sep);
1205
+ let endOfPrefix = parts.length;
1206
+ let append = "";
1207
+ for (const path of remaining){
1208
+ const compare = path.split(sep);
1209
+ if (compare.length <= endOfPrefix) {
1210
+ endOfPrefix = compare.length;
1211
+ append = "";
1212
+ }
1213
+ for(let i = 0; i < endOfPrefix; i++){
1214
+ if (compare[i] !== parts[i]) {
1215
+ endOfPrefix = i;
1216
+ append = i === 0 ? "" : sep;
1217
+ break;
1218
+ }
1219
+ }
1220
+ }
1221
+ return parts.slice(0, endOfPrefix).join(sep) + append;
1222
+ }
1223
+
1224
+ // Copyright 2018-2025 the Deno authors. MIT license.
1225
+ // This module is browser compatible.
1226
+ /**
1227
+ * Determines the common path from a set of paths for Windows systems.
1228
+ *
1229
+ * @example Usage
1230
+ * ```ts
1231
+ * import { common } from "@std/path/windows/common";
1232
+ * import { assertEquals } from "@std/assert";
1233
+ *
1234
+ * const path = common([
1235
+ * "C:\\foo\\bar",
1236
+ * "C:\\foo\\baz",
1237
+ * ]);
1238
+ * assertEquals(path, "C:\\foo\\");
1239
+ * ```
1240
+ *
1241
+ * @param paths The paths to compare.
1242
+ * @returns The common path.
1243
+ */ function common(paths) {
1244
+ return common$1(paths, SEPARATOR);
1245
+ }
1246
+
1247
+ // Copyright 2018-2025 the Deno authors. MIT license.
1248
+ // This module is browser compatible.
1249
+ /**
1250
+ * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs},
1251
+ * {@linkcode normalizeGlob} and {@linkcode expandGlob}.
1252
+ */ const REG_EXP_ESCAPE_CHARS = [
1253
+ "!",
1254
+ "$",
1255
+ "(",
1256
+ ")",
1257
+ "*",
1258
+ "+",
1259
+ ".",
1260
+ "=",
1261
+ "?",
1262
+ "[",
1263
+ "\\",
1264
+ "^",
1265
+ "{",
1266
+ "|"
1267
+ ];
1268
+ const RANGE_ESCAPE_CHARS = [
1269
+ "-",
1270
+ "\\",
1271
+ "]"
1272
+ ];
1273
+ function _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType,
1274
+ caseInsensitive = false } = {}) {
1275
+ if (glob === "") {
1276
+ return /(?!)/;
1277
+ }
1278
+ // Remove trailing separators.
1279
+ let newLength = glob.length;
1280
+ for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--);
1281
+ glob = glob.slice(0, newLength);
1282
+ let regExpString = "";
1283
+ // Terminates correctly. Trust that `j` is incremented every iteration.
1284
+ for(let j = 0; j < glob.length;){
1285
+ let segment = "";
1286
+ const groupStack = [];
1287
+ let inRange = false;
1288
+ let inEscape = false;
1289
+ let endsWithSep = false;
1290
+ let i = j;
1291
+ // Terminates with `i` at the non-inclusive end of the current segment.
1292
+ for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){
1293
+ if (inEscape) {
1294
+ inEscape = false;
1295
+ const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS;
1296
+ segment += escapeChars.includes(glob[i]) ? `\\${glob[i]}` : glob[i];
1297
+ continue;
1298
+ }
1299
+ if (glob[i] === c.escapePrefix) {
1300
+ inEscape = true;
1301
+ continue;
1302
+ }
1303
+ if (glob[i] === "[") {
1304
+ if (!inRange) {
1305
+ inRange = true;
1306
+ segment += "[";
1307
+ if (glob[i + 1] === "!") {
1308
+ i++;
1309
+ segment += "^";
1310
+ } else if (glob[i + 1] === "^") {
1311
+ i++;
1312
+ segment += "\\^";
1313
+ }
1314
+ continue;
1315
+ } else if (glob[i + 1] === ":") {
1316
+ let k = i + 1;
1317
+ let value = "";
1318
+ while(glob[k + 1] !== undefined && glob[k + 1] !== ":"){
1319
+ value += glob[k + 1];
1320
+ k++;
1321
+ }
1322
+ if (glob[k + 1] === ":" && glob[k + 2] === "]") {
1323
+ i = k + 2;
1324
+ if (value === "alnum") segment += "\\dA-Za-z";
1325
+ else if (value === "alpha") segment += "A-Za-z";
1326
+ else if (value === "ascii") segment += "\x00-\x7F";
1327
+ else if (value === "blank") segment += "\t ";
1328
+ else if (value === "cntrl") segment += "\x00-\x1F\x7F";
1329
+ else if (value === "digit") segment += "\\d";
1330
+ else if (value === "graph") segment += "\x21-\x7E";
1331
+ else if (value === "lower") segment += "a-z";
1332
+ else if (value === "print") segment += "\x20-\x7E";
1333
+ else if (value === "punct") {
1334
+ segment += "!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~";
1335
+ } else if (value === "space") segment += "\\s\v";
1336
+ else if (value === "upper") segment += "A-Z";
1337
+ else if (value === "word") segment += "\\w";
1338
+ else if (value === "xdigit") segment += "\\dA-Fa-f";
1339
+ continue;
1340
+ }
1341
+ }
1342
+ }
1343
+ if (glob[i] === "]" && inRange) {
1344
+ inRange = false;
1345
+ segment += "]";
1346
+ continue;
1347
+ }
1348
+ if (inRange) {
1349
+ segment += glob[i];
1350
+ continue;
1351
+ }
1352
+ if (glob[i] === ")" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") {
1353
+ segment += ")";
1354
+ const type = groupStack.pop();
1355
+ if (type === "!") {
1356
+ segment += c.wildcard;
1357
+ } else if (type !== "@") {
1358
+ segment += type;
1359
+ }
1360
+ continue;
1361
+ }
1362
+ if (glob[i] === "|" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== "BRACE") {
1363
+ segment += "|";
1364
+ continue;
1365
+ }
1366
+ if (glob[i] === "+" && extended && glob[i + 1] === "(") {
1367
+ i++;
1368
+ groupStack.push("+");
1369
+ segment += "(?:";
1370
+ continue;
1371
+ }
1372
+ if (glob[i] === "@" && extended && glob[i + 1] === "(") {
1373
+ i++;
1374
+ groupStack.push("@");
1375
+ segment += "(?:";
1376
+ continue;
1377
+ }
1378
+ if (glob[i] === "?") {
1379
+ if (extended && glob[i + 1] === "(") {
1380
+ i++;
1381
+ groupStack.push("?");
1382
+ segment += "(?:";
1383
+ } else {
1384
+ segment += ".";
1385
+ }
1386
+ continue;
1387
+ }
1388
+ if (glob[i] === "!" && extended && glob[i + 1] === "(") {
1389
+ i++;
1390
+ groupStack.push("!");
1391
+ segment += "(?!";
1392
+ continue;
1393
+ }
1394
+ if (glob[i] === "{") {
1395
+ groupStack.push("BRACE");
1396
+ segment += "(?:";
1397
+ continue;
1398
+ }
1399
+ if (glob[i] === "}" && groupStack[groupStack.length - 1] === "BRACE") {
1400
+ groupStack.pop();
1401
+ segment += ")";
1402
+ continue;
1403
+ }
1404
+ if (glob[i] === "," && groupStack[groupStack.length - 1] === "BRACE") {
1405
+ segment += "|";
1406
+ continue;
1407
+ }
1408
+ if (glob[i] === "*") {
1409
+ if (extended && glob[i + 1] === "(") {
1410
+ i++;
1411
+ groupStack.push("*");
1412
+ segment += "(?:";
1413
+ } else {
1414
+ const prevChar = glob[i - 1];
1415
+ let numStars = 1;
1416
+ while(glob[i + 1] === "*"){
1417
+ i++;
1418
+ numStars++;
1419
+ }
1420
+ const nextChar = glob[i + 1];
1421
+ if (globstarOption && numStars === 2 && [
1422
+ ...c.seps,
1423
+ undefined
1424
+ ].includes(prevChar) && [
1425
+ ...c.seps,
1426
+ undefined
1427
+ ].includes(nextChar)) {
1428
+ segment += c.globstar;
1429
+ endsWithSep = true;
1430
+ } else {
1431
+ segment += c.wildcard;
1432
+ }
1433
+ }
1434
+ continue;
1435
+ }
1436
+ segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\${glob[i]}` : glob[i];
1437
+ }
1438
+ // Check for unclosed groups or a dangling backslash.
1439
+ if (groupStack.length > 0 || inRange || inEscape) {
1440
+ // Parse failure. Take all characters from this segment literally.
1441
+ segment = "";
1442
+ for (const c of glob.slice(j, i)){
1443
+ segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\${c}` : c;
1444
+ endsWithSep = false;
1445
+ }
1446
+ }
1447
+ regExpString += segment;
1448
+ if (!endsWithSep) {
1449
+ regExpString += i < glob.length ? c.sep : c.sepMaybe;
1450
+ endsWithSep = true;
1451
+ }
1452
+ // Terminates with `i` at the start of the next segment.
1453
+ while(c.seps.includes(glob[i]))i++;
1454
+ j = i;
1455
+ }
1456
+ regExpString = `^${regExpString}$`;
1457
+ return new RegExp(regExpString, caseInsensitive ? "i" : "");
1458
+ }
1459
+
1460
+ // Copyright 2018-2025 the Deno authors. MIT license.
1461
+ // This module is browser compatible.
1462
+ const constants = {
1463
+ sep: "(?:\\\\|/)+",
1464
+ sepMaybe: "(?:\\\\|/)*",
1465
+ seps: [
1466
+ "\\",
1467
+ "/"
1468
+ ],
1469
+ globstar: "(?:[^\\\\/]*(?:\\\\|/|$)+)*",
1470
+ wildcard: "[^\\\\/]*",
1471
+ escapePrefix: "`"
1472
+ };
1473
+ /** Convert a glob string to a regular expression.
1474
+ *
1475
+ * Tries to match bash glob expansion as closely as possible.
1476
+ *
1477
+ * Basic glob syntax:
1478
+ * - `*` - Matches everything without leaving the path segment.
1479
+ * - `?` - Matches any single character.
1480
+ * - `{foo,bar}` - Matches `foo` or `bar`.
1481
+ * - `[abcd]` - Matches `a`, `b`, `c` or `d`.
1482
+ * - `[a-d]` - Matches `a`, `b`, `c` or `d`.
1483
+ * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.
1484
+ * - `[[:<class>:]]` - Matches any character belonging to `<class>`.
1485
+ * - `[[:alnum:]]` - Matches any digit or letter.
1486
+ * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.
1487
+ * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes
1488
+ * for a complete list of supported character classes.
1489
+ * - `\` - Escapes the next character for an `os` other than `"windows"`.
1490
+ * - \` - Escapes the next character for `os` set to `"windows"`.
1491
+ * - `/` - Path separator.
1492
+ * - `\` - Additional path separator only for `os` set to `"windows"`.
1493
+ *
1494
+ * Extended syntax:
1495
+ * - Requires `{ extended: true }`.
1496
+ * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.
1497
+ * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.
1498
+ * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.
1499
+ * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.
1500
+ * - `!(foo|bar)` - Matches anything other than `{foo,bar}`.
1501
+ * - See https://www.linuxjournal.com/content/bash-extended-globbing.
1502
+ *
1503
+ * Globstar syntax:
1504
+ * - Requires `{ globstar: true }`.
1505
+ * - `**` - Matches any number of any path segments.
1506
+ * - Must comprise its entire path segment in the provided glob.
1507
+ * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.
1508
+ *
1509
+ * Note the following properties:
1510
+ * - The generated `RegExp` is anchored at both start and end.
1511
+ * - Repeating and trailing separators are tolerated. Trailing separators in the
1512
+ * provided glob have no meaning and are discarded.
1513
+ * - Absolute globs will only match absolute paths, etc.
1514
+ * - Empty globs will match nothing.
1515
+ * - Any special glob syntax must be contained to one path segment. For example,
1516
+ * `?(foo|bar/baz)` is invalid. The separator will take precedence and the
1517
+ * first segment ends with an unclosed group.
1518
+ * - If a path segment ends with unclosed groups or a dangling escape prefix, a
1519
+ * parse error has occurred. Every character for that segment is taken
1520
+ * literally in this event.
1521
+ *
1522
+ * Limitations:
1523
+ * - A negative group like `!(foo|bar)` will wrongly be converted to a negative
1524
+ * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly
1525
+ * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,
1526
+ * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if
1527
+ * the group occurs not nested at the end of the segment.
1528
+ *
1529
+ * @example Usage
1530
+ * ```ts
1531
+ * import { globToRegExp } from "@std/path/windows/glob-to-regexp";
1532
+ * import { assertEquals } from "@std/assert";
1533
+ *
1534
+ * assertEquals(globToRegExp("*.js"), /^[^\\/]*\.js(?:\\|\/)*$/);
1535
+ * ```
1536
+ *
1537
+ * @param glob Glob string to convert.
1538
+ * @param options Conversion options.
1539
+ * @returns The regular expression equivalent to the glob.
1540
+ */ function globToRegExp(glob, options = {}) {
1541
+ return _globToRegExp(constants, glob, options);
1542
+ }
1543
+
1544
+ // Copyright 2018-2025 the Deno authors. MIT license.
1545
+ // This module is browser compatible.
1546
+ /**
1547
+ * Test whether the given string is a glob.
1548
+ *
1549
+ * @example Usage
1550
+ * ```ts
1551
+ * import { isGlob } from "@std/path/is-glob";
1552
+ * import { assert } from "@std/assert";
1553
+ *
1554
+ * assert(!isGlob("foo/bar/../baz"));
1555
+ * assert(isGlob("foo/*ar/../baz"));
1556
+ * ```
1557
+ *
1558
+ * @param str String to test.
1559
+ * @returns `true` if the given string is a glob, otherwise `false`
1560
+ */ function isGlob(str) {
1561
+ const chars = {
1562
+ "{": "}",
1563
+ "(": ")",
1564
+ "[": "]"
1565
+ };
1566
+ const regex = /\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\)|@\([^)]+\))/;
1567
+ if (str === "") {
1568
+ return false;
1569
+ }
1570
+ let match;
1571
+ while(match = regex.exec(str)){
1572
+ if (match[2]) return true;
1573
+ let idx = match.index + match[0].length;
1574
+ // if an open bracket/brace/paren is escaped,
1575
+ // set the index to the next closing character
1576
+ const open = match[1];
1577
+ const close = open ? chars[open] : null;
1578
+ if (open && close) {
1579
+ const n = str.indexOf(close, idx);
1580
+ if (n !== -1) {
1581
+ idx = n + 1;
1582
+ }
1583
+ }
1584
+ str = str.slice(idx);
1585
+ }
1586
+ return false;
1587
+ }
1588
+
1589
+ // Copyright 2018-2025 the Deno authors. MIT license.
1590
+ // This module is browser compatible.
1591
+ /**
1592
+ * Like normalize(), but doesn't collapse "**\/.." when `globstar` is true.
1593
+ *
1594
+ * @example Usage
1595
+ * ```ts
1596
+ * import { normalizeGlob } from "@std/path/windows/normalize-glob";
1597
+ * import { assertEquals } from "@std/assert";
1598
+ *
1599
+ * const normalized = normalizeGlob("**\\foo\\..\\bar", { globstar: true });
1600
+ * assertEquals(normalized, "**\\bar");
1601
+ * ```
1602
+ *
1603
+ * @param glob The glob pattern to normalize.
1604
+ * @param options The options for glob pattern.
1605
+ * @returns The normalized glob pattern.
1606
+ */ function normalizeGlob(glob, options = {}) {
1607
+ const { globstar = false } = options;
1608
+ if (glob.match(/\0/g)) {
1609
+ throw new Error(`Glob contains invalid characters: "${glob}"`);
1610
+ }
1611
+ if (!globstar) {
1612
+ return normalize(glob);
1613
+ }
1614
+ const s = SEPARATOR_PATTERN.source;
1615
+ const badParentPattern = new RegExp(`(?<=(${s}|^)\\*\\*${s})\\.\\.(?=${s}|$)`, "g");
1616
+ return normalize(glob.replace(badParentPattern, "\0")).replace(/\0/g, "..");
1617
+ }
1618
+
1619
+ // Copyright 2018-2025 the Deno authors. MIT license.
1620
+ // This module is browser compatible.
1621
+ /**
1622
+ * Like join(), but doesn't collapse "**\/.." when `globstar` is true.
1623
+ *
1624
+ * @example Usage
1625
+ *
1626
+ * ```ts
1627
+ * import { joinGlobs } from "@std/path/windows/join-globs";
1628
+ * import { assertEquals } from "@std/assert";
1629
+ *
1630
+ * const joined = joinGlobs(["foo", "**", "bar"], { globstar: true });
1631
+ * assertEquals(joined, "foo\\**\\bar");
1632
+ * ```
1633
+ *
1634
+ * @param globs The globs to join.
1635
+ * @param options The options for glob pattern.
1636
+ * @returns The joined glob pattern.
1637
+ */ function joinGlobs(globs, options = {}) {
1638
+ const { globstar = false } = options;
1639
+ if (!globstar || globs.length === 0) {
1640
+ return join(...globs);
1641
+ }
1642
+ let joined;
1643
+ for (const glob of globs){
1644
+ const path = glob;
1645
+ if (path.length > 0) {
1646
+ if (!joined) joined = path;
1647
+ else joined += `${SEPARATOR}${path}`;
1648
+ }
1649
+ }
1650
+ if (!joined) return ".";
1651
+ return normalizeGlob(joined, {
1652
+ globstar
1653
+ });
1654
+ }
1655
+
1656
+ export { DELIMITER, SEPARATOR, SEPARATOR_PATTERN, basename, common, dirname, extname, format, fromFileUrl, globToRegExp, isAbsolute, isGlob, join, joinGlobs, normalize, normalizeGlob, parse, relative, resolve, toFileUrl, toNamespacedPath };