keep-a-changelog 2.5.2 → 2.6.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 (673) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/README.md +15 -14
  3. package/esm/keep-a-changelog/bin.d.ts +2 -0
  4. package/esm/{bin.js → keep-a-changelog/bin.js} +96 -18
  5. package/esm/{mod.d.ts → keep-a-changelog/mod.d.ts} +1 -1
  6. package/esm/{mod.js → keep-a-changelog/mod.js} +1 -1
  7. package/esm/keep-a-changelog/test/changelog.azdo.md +24 -0
  8. package/esm/keep-a-changelog/test/changelog.sort.md +17 -0
  9. package/esm/std/cli/parse_args.d.ts +193 -0
  10. package/esm/std/cli/parse_args.js +357 -0
  11. package/esm/std/ini/_ini_map.d.ts +90 -0
  12. package/esm/std/ini/_ini_map.js +371 -0
  13. package/esm/std/ini/mod.d.ts +31 -0
  14. package/esm/std/ini/mod.js +33 -0
  15. package/esm/std/ini/parse.d.ts +77 -0
  16. package/esm/std/ini/parse.js +72 -0
  17. package/esm/std/ini/stringify.d.ts +83 -0
  18. package/esm/std/ini/stringify.js +66 -0
  19. package/esm/std/path/_common/assert_path.d.ts +1 -0
  20. package/esm/std/path/_common/assert_path.js +7 -0
  21. package/esm/std/path/_common/basename.d.ts +3 -0
  22. package/esm/std/path/_common/basename.js +40 -0
  23. package/esm/std/path/_common/common.d.ts +1 -0
  24. package/esm/std/path/_common/common.js +23 -0
  25. package/esm/{deps/deno.land/std@0.189.0/path/_constants.js → std/path/_common/constants.js} +1 -1
  26. package/esm/std/path/_common/dirname.d.ts +1 -0
  27. package/esm/std/path/_common/dirname.js +8 -0
  28. package/esm/std/path/_common/format.d.ts +3 -0
  29. package/esm/std/path/_common/format.js +19 -0
  30. package/esm/std/path/_common/from_file_url.d.ts +2 -0
  31. package/esm/std/path/_common/from_file_url.js +9 -0
  32. package/esm/std/path/_common/glob_to_reg_exp.d.ts +34 -0
  33. package/esm/std/path/_common/glob_to_reg_exp.js +234 -0
  34. package/esm/std/path/_common/normalize.d.ts +1 -0
  35. package/esm/std/path/_common/normalize.js +8 -0
  36. package/esm/std/path/_common/normalize_string.d.ts +1 -0
  37. package/esm/std/path/_common/normalize_string.js +77 -0
  38. package/esm/std/path/_common/relative.d.ts +1 -0
  39. package/esm/std/path/_common/relative.js +9 -0
  40. package/esm/std/path/_common/strip_trailing_separators.d.ts +1 -0
  41. package/esm/std/path/_common/strip_trailing_separators.js +19 -0
  42. package/esm/std/path/_common/to_file_url.d.ts +1 -0
  43. package/esm/std/path/_common/to_file_url.js +15 -0
  44. package/esm/std/path/_os.d.ts +1 -0
  45. package/esm/std/path/_os.js +9 -0
  46. package/esm/std/path/basename.d.ts +27 -0
  47. package/esm/std/path/basename.js +36 -0
  48. package/esm/std/path/common.d.ts +27 -0
  49. package/esm/std/path/common.js +33 -0
  50. package/esm/std/path/constants.d.ts +14 -0
  51. package/esm/std/path/constants.js +17 -0
  52. package/esm/std/path/dirname.d.ts +22 -0
  53. package/esm/std/path/dirname.js +29 -0
  54. package/esm/std/path/extname.d.ts +22 -0
  55. package/esm/std/path/extname.js +29 -0
  56. package/esm/std/path/format.d.ts +21 -0
  57. package/esm/std/path/format.js +27 -0
  58. package/esm/std/path/from_file_url.d.ts +22 -0
  59. package/esm/std/path/from_file_url.js +28 -0
  60. package/esm/std/path/glob_to_regexp.d.ts +76 -0
  61. package/esm/std/path/glob_to_regexp.js +83 -0
  62. package/esm/std/path/is_absolute.d.ts +21 -0
  63. package/esm/std/path/is_absolute.js +28 -0
  64. package/esm/std/path/is_glob.d.ts +16 -0
  65. package/esm/std/path/is_glob.js +42 -0
  66. package/esm/std/path/join.d.ts +22 -0
  67. package/esm/std/path/join.js +29 -0
  68. package/esm/std/path/join_globs.d.ts +27 -0
  69. package/esm/std/path/join_globs.js +34 -0
  70. package/esm/std/path/mod.d.ts +53 -0
  71. package/esm/std/path/mod.js +57 -0
  72. package/esm/std/path/normalize.d.ts +26 -0
  73. package/esm/std/path/normalize.js +33 -0
  74. package/esm/std/path/normalize_glob.d.ts +28 -0
  75. package/esm/std/path/normalize_glob.js +35 -0
  76. package/esm/std/path/parse.d.ts +34 -0
  77. package/esm/std/path/parse.js +39 -0
  78. package/esm/std/path/posix/_util.d.ts +1 -0
  79. package/esm/std/path/posix/_util.js +8 -0
  80. package/esm/std/path/posix/basename.d.ts +39 -0
  81. package/esm/std/path/posix/basename.js +49 -0
  82. package/esm/std/path/posix/constants.d.ts +12 -0
  83. package/esm/std/path/posix/constants.js +14 -0
  84. package/esm/std/path/posix/dirname.d.ts +31 -0
  85. package/esm/std/path/posix/dirname.js +62 -0
  86. package/esm/std/path/posix/extname.d.ts +36 -0
  87. package/esm/std/path/posix/extname.js +89 -0
  88. package/esm/std/path/posix/format.d.ts +23 -0
  89. package/esm/std/path/posix/format.js +28 -0
  90. package/esm/std/path/posix/from_file_url.d.ts +16 -0
  91. package/esm/std/path/posix/from_file_url.js +21 -0
  92. package/esm/std/path/posix/glob_to_regexp.d.ts +71 -0
  93. package/{script/deps/deno.land/std@0.189.0/path/glob.d.ts → esm/std/path/posix/glob_to_regexp.js} +28 -29
  94. package/esm/std/path/posix/is_absolute.d.ts +16 -0
  95. package/esm/std/path/posix/is_absolute.js +23 -0
  96. package/esm/std/path/posix/join.d.ts +32 -0
  97. package/esm/std/path/posix/join.js +42 -0
  98. package/esm/std/path/posix/join_globs.d.ts +19 -0
  99. package/esm/std/path/posix/join_globs.js +40 -0
  100. package/esm/std/path/posix/normalize.d.ts +39 -0
  101. package/esm/std/path/posix/normalize.js +57 -0
  102. package/esm/std/path/posix/normalize_glob.d.ts +19 -0
  103. package/esm/std/path/posix/normalize_glob.js +32 -0
  104. package/esm/std/path/posix/parse.d.ts +24 -0
  105. package/esm/std/path/posix/parse.js +115 -0
  106. package/esm/std/path/posix/relative.d.ts +19 -0
  107. package/esm/std/path/posix/relative.js +106 -0
  108. package/esm/std/path/posix/resolve.d.ts +16 -0
  109. package/esm/std/path/posix/resolve.js +59 -0
  110. package/esm/std/path/posix/to_file_url.d.ts +17 -0
  111. package/esm/std/path/posix/to_file_url.js +27 -0
  112. package/esm/std/path/posix/to_namespaced_path.d.ts +15 -0
  113. package/esm/std/path/posix/to_namespaced_path.js +20 -0
  114. package/esm/std/path/relative.d.ts +23 -0
  115. package/esm/std/path/relative.js +30 -0
  116. package/esm/std/path/resolve.d.ts +21 -0
  117. package/esm/std/path/resolve.js +30 -0
  118. package/esm/std/path/to_file_url.d.ts +22 -0
  119. package/esm/std/path/to_file_url.js +28 -0
  120. package/esm/std/path/to_namespaced_path.d.ts +20 -0
  121. package/esm/std/path/to_namespaced_path.js +29 -0
  122. package/esm/{deps/deno.land/std@0.189.0/path/_interface.d.ts → std/path/types.d.ts} +13 -2
  123. package/esm/std/path/types.js +3 -0
  124. package/esm/std/path/windows/_util.d.ts +3 -0
  125. package/esm/std/path/windows/_util.js +15 -0
  126. package/esm/std/path/windows/basename.d.ts +22 -0
  127. package/esm/std/path/windows/basename.js +44 -0
  128. package/esm/std/path/windows/constants.d.ts +12 -0
  129. package/esm/std/path/windows/constants.js +14 -0
  130. package/esm/std/path/windows/dirname.d.ts +19 -0
  131. package/esm/std/path/windows/dirname.js +112 -0
  132. package/esm/std/path/windows/extname.d.ts +19 -0
  133. package/esm/std/path/windows/extname.js +81 -0
  134. package/esm/std/path/windows/format.d.ts +23 -0
  135. package/esm/std/path/windows/format.js +28 -0
  136. package/esm/std/path/windows/from_file_url.d.ts +18 -0
  137. package/esm/std/path/windows/from_file_url.js +30 -0
  138. package/esm/std/path/windows/glob_to_regexp.d.ts +70 -0
  139. package/esm/{deps/deno.land/std@0.189.0/path/glob.d.ts → std/path/windows/glob_to_regexp.js} +28 -29
  140. package/esm/std/path/windows/is_absolute.d.ts +16 -0
  141. package/esm/std/path/windows/is_absolute.js +38 -0
  142. package/esm/std/path/windows/join.d.ts +19 -0
  143. package/esm/std/path/windows/join.js +74 -0
  144. package/esm/std/path/windows/join_globs.d.ts +20 -0
  145. package/esm/std/path/windows/join_globs.js +41 -0
  146. package/esm/std/path/windows/normalize.d.ts +21 -0
  147. package/esm/std/path/windows/normalize.js +134 -0
  148. package/esm/std/path/windows/normalize_glob.d.ts +19 -0
  149. package/esm/std/path/windows/normalize_glob.js +32 -0
  150. package/esm/std/path/windows/parse.d.ts +24 -0
  151. package/esm/std/path/windows/parse.js +176 -0
  152. package/esm/std/path/windows/relative.d.ts +22 -0
  153. package/esm/std/path/windows/relative.js +131 -0
  154. package/esm/std/path/windows/resolve.d.ts +16 -0
  155. package/esm/std/path/windows/resolve.js +154 -0
  156. package/esm/std/path/windows/to_file_url.d.ts +17 -0
  157. package/esm/std/path/windows/to_file_url.js +34 -0
  158. package/esm/std/path/windows/to_namespaced_path.d.ts +16 -0
  159. package/esm/std/path/windows/to_namespaced_path.js +49 -0
  160. package/esm/std/semver/_constants.d.ts +15 -0
  161. package/esm/std/semver/_constants.js +38 -0
  162. package/esm/std/semver/_shared.d.ts +43 -0
  163. package/esm/std/semver/_shared.js +162 -0
  164. package/esm/std/semver/_test_comparator_set.d.ts +2 -0
  165. package/esm/std/semver/_test_comparator_set.js +58 -0
  166. package/esm/std/semver/can_parse.d.ts +16 -0
  167. package/esm/std/semver/can_parse.js +27 -0
  168. package/esm/std/semver/compare.d.ts +27 -0
  169. package/esm/std/semver/compare.js +35 -0
  170. package/esm/std/semver/difference.d.ts +26 -0
  171. package/esm/std/semver/difference.js +41 -0
  172. package/esm/std/semver/equals.d.ts +23 -0
  173. package/esm/std/semver/equals.js +27 -0
  174. package/esm/std/semver/format.d.ts +21 -0
  175. package/esm/std/semver/format.js +32 -0
  176. package/esm/std/semver/format_range.d.ts +17 -0
  177. package/esm/std/semver/format_range.js +27 -0
  178. package/esm/std/semver/greater_or_equal.d.ts +24 -0
  179. package/esm/std/semver/greater_or_equal.js +26 -0
  180. package/esm/std/semver/greater_than.d.ts +24 -0
  181. package/esm/std/semver/greater_than.js +28 -0
  182. package/esm/std/semver/greater_than_range.d.ts +22 -0
  183. package/esm/std/semver/greater_than_range.js +58 -0
  184. package/{script/deps/deno.land/std@0.205.0 → esm/std}/semver/increment.d.ts +27 -5
  185. package/esm/std/semver/increment.js +176 -0
  186. package/esm/std/semver/is_range.d.ts +22 -0
  187. package/esm/std/semver/is_range.js +38 -0
  188. package/{script/deps/deno.land/std@0.205.0 → esm/std}/semver/is_semver.d.ts +16 -0
  189. package/esm/{deps/deno.land/std@0.205.0 → std}/semver/is_semver.js +25 -13
  190. package/esm/std/semver/less_or_equal.d.ts +24 -0
  191. package/esm/std/semver/less_or_equal.js +26 -0
  192. package/esm/std/semver/less_than.d.ts +24 -0
  193. package/esm/std/semver/less_than.js +26 -0
  194. package/esm/std/semver/less_than_range.d.ts +22 -0
  195. package/esm/std/semver/less_than_range.js +58 -0
  196. package/esm/std/semver/max_satisfying.d.ts +21 -0
  197. package/esm/std/semver/max_satisfying.js +30 -0
  198. package/esm/std/semver/min_satisfying.d.ts +21 -0
  199. package/esm/std/semver/min_satisfying.js +30 -0
  200. package/{script/deps/deno.land/std@0.205.0 → esm/std}/semver/mod.d.ts +72 -85
  201. package/esm/{deps/deno.land/std@0.205.0 → std}/semver/mod.js +73 -86
  202. package/esm/std/semver/not_equals.d.ts +23 -0
  203. package/esm/std/semver/not_equals.js +25 -0
  204. package/esm/std/semver/parse.d.ts +24 -0
  205. package/esm/std/semver/parse.js +44 -0
  206. package/esm/std/semver/parse_range.d.ts +26 -0
  207. package/esm/std/semver/parse_range.js +358 -0
  208. package/esm/std/semver/range_intersects.d.ts +24 -0
  209. package/esm/std/semver/range_intersects.js +89 -0
  210. package/esm/std/semver/satisfies.d.ts +23 -0
  211. package/esm/std/semver/satisfies.js +26 -0
  212. package/esm/std/semver/try_parse.d.ts +20 -0
  213. package/esm/std/semver/try_parse.js +27 -0
  214. package/esm/std/semver/try_parse_range.d.ts +22 -0
  215. package/esm/std/semver/try_parse_range.js +33 -0
  216. package/esm/std/semver/types.d.ts +57 -0
  217. package/esm/std/semver/types.js +3 -0
  218. package/package.json +14 -13
  219. package/script/keep-a-changelog/bin.d.ts +2 -0
  220. package/script/{bin.js → keep-a-changelog/bin.js} +97 -19
  221. package/script/{mod.d.ts → keep-a-changelog/mod.d.ts} +1 -1
  222. package/script/{mod.js → keep-a-changelog/mod.js} +1 -1
  223. package/script/keep-a-changelog/test/changelog.azdo.md +24 -0
  224. package/script/keep-a-changelog/test/changelog.sort.md +17 -0
  225. package/script/std/cli/parse_args.d.ts +193 -0
  226. package/script/std/cli/parse_args.js +361 -0
  227. package/script/std/ini/_ini_map.d.ts +90 -0
  228. package/script/std/ini/_ini_map.js +375 -0
  229. package/script/std/ini/mod.d.ts +31 -0
  230. package/script/std/ini/mod.js +49 -0
  231. package/script/std/ini/parse.d.ts +77 -0
  232. package/script/std/ini/parse.js +76 -0
  233. package/script/std/ini/stringify.d.ts +83 -0
  234. package/script/std/ini/stringify.js +70 -0
  235. package/script/std/path/_common/assert_path.d.ts +1 -0
  236. package/script/std/path/_common/assert_path.js +11 -0
  237. package/script/std/path/_common/basename.d.ts +3 -0
  238. package/script/std/path/_common/basename.js +46 -0
  239. package/script/std/path/_common/common.d.ts +1 -0
  240. package/script/std/path/_common/common.js +27 -0
  241. package/script/{deps/deno.land/std@0.189.0/path/_constants.js → std/path/_common/constants.js} +1 -1
  242. package/script/std/path/_common/dirname.d.ts +1 -0
  243. package/script/std/path/_common/dirname.js +12 -0
  244. package/script/std/path/_common/format.d.ts +3 -0
  245. package/script/std/path/_common/format.js +24 -0
  246. package/script/std/path/_common/from_file_url.d.ts +2 -0
  247. package/script/std/path/_common/from_file_url.js +13 -0
  248. package/script/std/path/_common/glob_to_reg_exp.d.ts +34 -0
  249. package/script/std/path/_common/glob_to_reg_exp.js +238 -0
  250. package/script/std/path/_common/normalize.d.ts +1 -0
  251. package/script/std/path/_common/normalize.js +12 -0
  252. package/script/std/path/_common/normalize_string.d.ts +1 -0
  253. package/script/std/path/_common/normalize_string.js +81 -0
  254. package/script/std/path/_common/relative.d.ts +1 -0
  255. package/script/std/path/_common/relative.js +13 -0
  256. package/script/std/path/_common/strip_trailing_separators.d.ts +1 -0
  257. package/script/std/path/_common/strip_trailing_separators.js +23 -0
  258. package/script/std/path/_common/to_file_url.d.ts +1 -0
  259. package/script/std/path/_common/to_file_url.js +19 -0
  260. package/script/std/path/_os.d.ts +1 -0
  261. package/script/{deps/deno.land/std@0.189.0/_util/os.js → std/path/_os.js} +10 -19
  262. package/script/std/path/basename.d.ts +27 -0
  263. package/script/std/path/basename.js +40 -0
  264. package/script/std/path/common.d.ts +27 -0
  265. package/script/std/path/common.js +37 -0
  266. package/script/std/path/constants.d.ts +14 -0
  267. package/script/std/path/constants.js +20 -0
  268. package/script/std/path/dirname.d.ts +22 -0
  269. package/script/std/path/dirname.js +33 -0
  270. package/script/std/path/extname.d.ts +22 -0
  271. package/script/std/path/extname.js +33 -0
  272. package/script/std/path/format.d.ts +21 -0
  273. package/script/std/path/format.js +31 -0
  274. package/script/std/path/from_file_url.d.ts +22 -0
  275. package/script/std/path/from_file_url.js +32 -0
  276. package/script/std/path/glob_to_regexp.d.ts +76 -0
  277. package/script/std/path/glob_to_regexp.js +87 -0
  278. package/script/std/path/is_absolute.d.ts +21 -0
  279. package/script/std/path/is_absolute.js +32 -0
  280. package/script/std/path/is_glob.d.ts +16 -0
  281. package/script/std/path/is_glob.js +46 -0
  282. package/script/std/path/join.d.ts +22 -0
  283. package/script/std/path/join.js +33 -0
  284. package/script/std/path/join_globs.d.ts +27 -0
  285. package/script/std/path/join_globs.js +38 -0
  286. package/script/std/path/mod.d.ts +53 -0
  287. package/script/std/path/mod.js +73 -0
  288. package/script/std/path/normalize.d.ts +26 -0
  289. package/script/std/path/normalize.js +37 -0
  290. package/script/std/path/normalize_glob.d.ts +28 -0
  291. package/script/std/path/normalize_glob.js +39 -0
  292. package/script/std/path/parse.d.ts +34 -0
  293. package/script/std/path/parse.js +43 -0
  294. package/script/std/path/posix/_util.d.ts +1 -0
  295. package/script/std/path/posix/_util.js +12 -0
  296. package/script/std/path/posix/basename.d.ts +39 -0
  297. package/script/std/path/posix/basename.js +53 -0
  298. package/script/std/path/posix/constants.d.ts +12 -0
  299. package/script/std/path/posix/constants.js +17 -0
  300. package/script/std/path/posix/dirname.d.ts +31 -0
  301. package/script/std/path/posix/dirname.js +66 -0
  302. package/script/std/path/posix/extname.d.ts +36 -0
  303. package/script/std/path/posix/extname.js +93 -0
  304. package/script/std/path/posix/format.d.ts +23 -0
  305. package/script/std/path/posix/format.js +32 -0
  306. package/script/std/path/posix/from_file_url.d.ts +16 -0
  307. package/script/std/path/posix/from_file_url.js +25 -0
  308. package/script/std/path/posix/glob_to_regexp.d.ts +71 -0
  309. package/script/std/path/posix/glob_to_regexp.js +86 -0
  310. package/script/std/path/posix/is_absolute.d.ts +16 -0
  311. package/script/std/path/posix/is_absolute.js +27 -0
  312. package/script/std/path/posix/join.d.ts +32 -0
  313. package/script/std/path/posix/join.js +46 -0
  314. package/script/std/path/posix/join_globs.d.ts +19 -0
  315. package/script/std/path/posix/join_globs.js +44 -0
  316. package/script/std/path/posix/normalize.d.ts +39 -0
  317. package/script/std/path/posix/normalize.js +61 -0
  318. package/script/std/path/posix/normalize_glob.d.ts +19 -0
  319. package/script/std/path/posix/normalize_glob.js +36 -0
  320. package/script/std/path/posix/parse.d.ts +24 -0
  321. package/script/std/path/posix/parse.js +119 -0
  322. package/script/std/path/posix/relative.d.ts +19 -0
  323. package/script/std/path/posix/relative.js +110 -0
  324. package/script/std/path/posix/resolve.d.ts +16 -0
  325. package/script/std/path/posix/resolve.js +86 -0
  326. package/script/std/path/posix/to_file_url.d.ts +17 -0
  327. package/script/std/path/posix/to_file_url.js +31 -0
  328. package/script/std/path/posix/to_namespaced_path.d.ts +15 -0
  329. package/script/std/path/posix/to_namespaced_path.js +24 -0
  330. package/script/std/path/relative.d.ts +23 -0
  331. package/script/std/path/relative.js +34 -0
  332. package/script/std/path/resolve.d.ts +21 -0
  333. package/script/std/path/resolve.js +34 -0
  334. package/script/std/path/to_file_url.d.ts +22 -0
  335. package/script/std/path/to_file_url.js +32 -0
  336. package/script/std/path/to_namespaced_path.d.ts +20 -0
  337. package/script/std/path/to_namespaced_path.js +33 -0
  338. package/script/{deps/deno.land/std@0.189.0/path/_interface.d.ts → std/path/types.d.ts} +13 -2
  339. package/script/{deps/deno.land/std@0.189.0/path/_interface.js → std/path/types.js} +1 -1
  340. package/script/std/path/windows/_util.d.ts +3 -0
  341. package/script/std/path/windows/_util.js +21 -0
  342. package/script/std/path/windows/basename.d.ts +22 -0
  343. package/script/std/path/windows/basename.js +48 -0
  344. package/script/std/path/windows/constants.d.ts +12 -0
  345. package/script/std/path/windows/constants.js +17 -0
  346. package/script/std/path/windows/dirname.d.ts +19 -0
  347. package/script/std/path/windows/dirname.js +116 -0
  348. package/script/std/path/windows/extname.d.ts +19 -0
  349. package/script/std/path/windows/extname.js +85 -0
  350. package/script/std/path/windows/format.d.ts +23 -0
  351. package/script/std/path/windows/format.js +32 -0
  352. package/script/std/path/windows/from_file_url.d.ts +18 -0
  353. package/script/std/path/windows/from_file_url.js +34 -0
  354. package/script/std/path/windows/glob_to_regexp.d.ts +70 -0
  355. package/script/std/path/windows/glob_to_regexp.js +86 -0
  356. package/script/std/path/windows/is_absolute.d.ts +16 -0
  357. package/script/std/path/windows/is_absolute.js +42 -0
  358. package/script/std/path/windows/join.d.ts +19 -0
  359. package/script/std/path/windows/join.js +78 -0
  360. package/script/std/path/windows/join_globs.d.ts +20 -0
  361. package/script/std/path/windows/join_globs.js +45 -0
  362. package/script/std/path/windows/normalize.d.ts +21 -0
  363. package/script/std/path/windows/normalize.js +138 -0
  364. package/script/std/path/windows/normalize_glob.d.ts +19 -0
  365. package/script/std/path/windows/normalize_glob.js +36 -0
  366. package/script/std/path/windows/parse.d.ts +24 -0
  367. package/script/std/path/windows/parse.js +180 -0
  368. package/script/std/path/windows/relative.d.ts +22 -0
  369. package/script/std/path/windows/relative.js +135 -0
  370. package/script/std/path/windows/resolve.d.ts +16 -0
  371. package/script/std/path/windows/resolve.js +181 -0
  372. package/script/std/path/windows/to_file_url.d.ts +17 -0
  373. package/script/std/path/windows/to_file_url.js +38 -0
  374. package/script/std/path/windows/to_namespaced_path.d.ts +16 -0
  375. package/script/std/path/windows/to_namespaced_path.js +53 -0
  376. package/script/std/semver/_constants.d.ts +15 -0
  377. package/script/std/semver/_constants.js +41 -0
  378. package/script/std/semver/_shared.d.ts +43 -0
  379. package/script/std/semver/_shared.js +174 -0
  380. package/script/std/semver/_test_comparator_set.d.ts +2 -0
  381. package/script/std/semver/_test_comparator_set.js +62 -0
  382. package/script/std/semver/can_parse.d.ts +16 -0
  383. package/script/std/semver/can_parse.js +31 -0
  384. package/script/std/semver/compare.d.ts +27 -0
  385. package/script/std/semver/compare.js +39 -0
  386. package/script/std/semver/difference.d.ts +26 -0
  387. package/script/std/semver/difference.js +45 -0
  388. package/script/std/semver/equals.d.ts +23 -0
  389. package/script/std/semver/equals.js +31 -0
  390. package/script/std/semver/format.d.ts +21 -0
  391. package/script/std/semver/format.js +36 -0
  392. package/script/std/semver/format_range.d.ts +17 -0
  393. package/script/std/semver/format_range.js +31 -0
  394. package/script/std/semver/greater_or_equal.d.ts +24 -0
  395. package/script/std/semver/greater_or_equal.js +30 -0
  396. package/script/std/semver/greater_than.d.ts +24 -0
  397. package/script/std/semver/greater_than.js +32 -0
  398. package/script/std/semver/greater_than_range.d.ts +22 -0
  399. package/script/std/semver/greater_than_range.js +62 -0
  400. package/{esm/deps/deno.land/std@0.205.0 → script/std}/semver/increment.d.ts +27 -5
  401. package/script/std/semver/increment.js +180 -0
  402. package/script/std/semver/is_range.d.ts +22 -0
  403. package/script/std/semver/is_range.js +42 -0
  404. package/{esm/deps/deno.land/std@0.205.0 → script/std}/semver/is_semver.d.ts +16 -0
  405. package/script/{deps/deno.land/std@0.205.0 → std}/semver/is_semver.js +26 -14
  406. package/script/std/semver/less_or_equal.d.ts +24 -0
  407. package/script/std/semver/less_or_equal.js +30 -0
  408. package/script/std/semver/less_than.d.ts +24 -0
  409. package/script/std/semver/less_than.js +30 -0
  410. package/script/std/semver/less_than_range.d.ts +22 -0
  411. package/script/std/semver/less_than_range.js +62 -0
  412. package/script/std/semver/max_satisfying.d.ts +21 -0
  413. package/script/std/semver/max_satisfying.js +34 -0
  414. package/script/std/semver/min_satisfying.d.ts +21 -0
  415. package/script/std/semver/min_satisfying.js +34 -0
  416. package/{esm/deps/deno.land/std@0.205.0 → script/std}/semver/mod.d.ts +72 -85
  417. package/script/{deps/deno.land/std@0.205.0 → std}/semver/mod.js +73 -87
  418. package/script/std/semver/not_equals.d.ts +23 -0
  419. package/script/std/semver/not_equals.js +29 -0
  420. package/script/std/semver/parse.d.ts +24 -0
  421. package/script/std/semver/parse.js +48 -0
  422. package/script/std/semver/parse_range.d.ts +26 -0
  423. package/script/std/semver/parse_range.js +362 -0
  424. package/script/std/semver/range_intersects.d.ts +24 -0
  425. package/script/std/semver/range_intersects.js +93 -0
  426. package/script/std/semver/satisfies.d.ts +23 -0
  427. package/script/std/semver/satisfies.js +30 -0
  428. package/script/std/semver/try_parse.d.ts +20 -0
  429. package/script/std/semver/try_parse.js +31 -0
  430. package/script/std/semver/try_parse_range.d.ts +22 -0
  431. package/script/std/semver/try_parse_range.js +37 -0
  432. package/script/std/semver/types.d.ts +57 -0
  433. package/script/std/semver/types.js +4 -0
  434. package/esm/bin.d.ts +0 -2
  435. package/esm/deps/deno.land/std@0.189.0/_util/asserts.d.ts +0 -10
  436. package/esm/deps/deno.land/std@0.189.0/_util/asserts.js +0 -21
  437. package/esm/deps/deno.land/std@0.189.0/_util/os.d.ts +0 -4
  438. package/esm/deps/deno.land/std@0.189.0/_util/os.js +0 -18
  439. package/esm/deps/deno.land/std@0.189.0/flags/mod.d.ts +0 -166
  440. package/esm/deps/deno.land/std@0.189.0/flags/mod.js +0 -365
  441. package/esm/deps/deno.land/std@0.189.0/path/_interface.js +0 -3
  442. package/esm/deps/deno.land/std@0.189.0/path/_util.d.ts +0 -11
  443. package/esm/deps/deno.land/std@0.189.0/path/_util.js +0 -161
  444. package/esm/deps/deno.land/std@0.189.0/path/common.d.ts +0 -13
  445. package/esm/deps/deno.land/std@0.189.0/path/common.js +0 -36
  446. package/esm/deps/deno.land/std@0.189.0/path/glob.js +0 -361
  447. package/esm/deps/deno.land/std@0.189.0/path/mod.d.ts +0 -11
  448. package/esm/deps/deno.land/std@0.189.0/path/mod.js +0 -35
  449. package/esm/deps/deno.land/std@0.189.0/path/posix.d.ts +0 -86
  450. package/esm/deps/deno.land/std@0.189.0/path/posix.js +0 -442
  451. package/esm/deps/deno.land/std@0.189.0/path/separator.d.ts +0 -2
  452. package/esm/deps/deno.land/std@0.189.0/path/separator.js +0 -5
  453. package/esm/deps/deno.land/std@0.189.0/path/win32.d.ts +0 -91
  454. package/esm/deps/deno.land/std@0.189.0/path/win32.js +0 -909
  455. package/esm/deps/deno.land/std@0.205.0/semver/_shared.d.ts +0 -42
  456. package/esm/deps/deno.land/std@0.205.0/semver/_shared.js +0 -230
  457. package/esm/deps/deno.land/std@0.205.0/semver/cmp.d.ts +0 -9
  458. package/esm/deps/deno.land/std@0.205.0/semver/cmp.js +0 -35
  459. package/esm/deps/deno.land/std@0.205.0/semver/comparator_format.d.ts +0 -8
  460. package/esm/deps/deno.land/std@0.205.0/semver/comparator_format.js +0 -11
  461. package/esm/deps/deno.land/std@0.205.0/semver/comparator_intersects.d.ts +0 -8
  462. package/esm/deps/deno.land/std@0.205.0/semver/comparator_intersects.js +0 -45
  463. package/esm/deps/deno.land/std@0.205.0/semver/comparator_max.d.ts +0 -9
  464. package/esm/deps/deno.land/std@0.205.0/semver/comparator_max.js +0 -45
  465. package/esm/deps/deno.land/std@0.205.0/semver/comparator_min.d.ts +0 -8
  466. package/esm/deps/deno.land/std@0.205.0/semver/comparator_min.js +0 -32
  467. package/esm/deps/deno.land/std@0.205.0/semver/compare.d.ts +0 -10
  468. package/esm/deps/deno.land/std@0.205.0/semver/compare.js +0 -18
  469. package/esm/deps/deno.land/std@0.205.0/semver/compare_build.d.ts +0 -13
  470. package/esm/deps/deno.land/std@0.205.0/semver/compare_build.js +0 -23
  471. package/esm/deps/deno.land/std@0.205.0/semver/constants.d.ts +0 -42
  472. package/esm/deps/deno.land/std@0.205.0/semver/constants.js +0 -75
  473. package/esm/deps/deno.land/std@0.205.0/semver/difference.d.ts +0 -4
  474. package/esm/deps/deno.land/std@0.205.0/semver/difference.js +0 -26
  475. package/esm/deps/deno.land/std@0.205.0/semver/eq.d.ts +0 -4
  476. package/esm/deps/deno.land/std@0.205.0/semver/eq.js +0 -7
  477. package/esm/deps/deno.land/std@0.205.0/semver/format.d.ts +0 -12
  478. package/esm/deps/deno.land/std@0.205.0/semver/format.js +0 -54
  479. package/esm/deps/deno.land/std@0.205.0/semver/gt.d.ts +0 -3
  480. package/esm/deps/deno.land/std@0.205.0/semver/gt.js +0 -5
  481. package/esm/deps/deno.land/std@0.205.0/semver/gte.d.ts +0 -3
  482. package/esm/deps/deno.land/std@0.205.0/semver/gte.js +0 -5
  483. package/esm/deps/deno.land/std@0.205.0/semver/gtr.d.ts +0 -3
  484. package/esm/deps/deno.land/std@0.205.0/semver/gtr.js +0 -5
  485. package/esm/deps/deno.land/std@0.205.0/semver/increment.js +0 -207
  486. package/esm/deps/deno.land/std@0.205.0/semver/is_semver_comparator.d.ts +0 -12
  487. package/esm/deps/deno.land/std@0.205.0/semver/is_semver_comparator.js +0 -31
  488. package/esm/deps/deno.land/std@0.205.0/semver/is_semver_range.d.ts +0 -12
  489. package/esm/deps/deno.land/std@0.205.0/semver/is_semver_range.js +0 -22
  490. package/esm/deps/deno.land/std@0.205.0/semver/lt.d.ts +0 -3
  491. package/esm/deps/deno.land/std@0.205.0/semver/lt.js +0 -5
  492. package/esm/deps/deno.land/std@0.205.0/semver/lte.d.ts +0 -3
  493. package/esm/deps/deno.land/std@0.205.0/semver/lte.js +0 -5
  494. package/esm/deps/deno.land/std@0.205.0/semver/ltr.d.ts +0 -3
  495. package/esm/deps/deno.land/std@0.205.0/semver/ltr.js +0 -5
  496. package/esm/deps/deno.land/std@0.205.0/semver/max_satisfying.d.ts +0 -9
  497. package/esm/deps/deno.land/std@0.205.0/semver/max_satisfying.js +0 -14
  498. package/esm/deps/deno.land/std@0.205.0/semver/min_satisfying.d.ts +0 -9
  499. package/esm/deps/deno.land/std@0.205.0/semver/min_satisfying.js +0 -14
  500. package/esm/deps/deno.land/std@0.205.0/semver/neq.d.ts +0 -3
  501. package/esm/deps/deno.land/std@0.205.0/semver/neq.js +0 -5
  502. package/esm/deps/deno.land/std@0.205.0/semver/outside.d.ts +0 -11
  503. package/esm/deps/deno.land/std@0.205.0/semver/outside.js +0 -67
  504. package/esm/deps/deno.land/std@0.205.0/semver/parse.d.ts +0 -8
  505. package/esm/deps/deno.land/std@0.205.0/semver/parse.js +0 -66
  506. package/esm/deps/deno.land/std@0.205.0/semver/parse_comparator.d.ts +0 -7
  507. package/esm/deps/deno.land/std@0.205.0/semver/parse_comparator.js +0 -28
  508. package/esm/deps/deno.land/std@0.205.0/semver/parse_range.d.ts +0 -7
  509. package/esm/deps/deno.land/std@0.205.0/semver/parse_range.js +0 -292
  510. package/esm/deps/deno.land/std@0.205.0/semver/range_format.d.ts +0 -8
  511. package/esm/deps/deno.land/std@0.205.0/semver/range_format.js +0 -11
  512. package/esm/deps/deno.land/std@0.205.0/semver/range_intersects.d.ts +0 -8
  513. package/esm/deps/deno.land/std@0.205.0/semver/range_intersects.js +0 -35
  514. package/esm/deps/deno.land/std@0.205.0/semver/range_max.d.ts +0 -7
  515. package/esm/deps/deno.land/std@0.205.0/semver/range_max.js +0 -15
  516. package/esm/deps/deno.land/std@0.205.0/semver/range_min.d.ts +0 -7
  517. package/esm/deps/deno.land/std@0.205.0/semver/range_min.js +0 -14
  518. package/esm/deps/deno.land/std@0.205.0/semver/rcompare.d.ts +0 -8
  519. package/esm/deps/deno.land/std@0.205.0/semver/rcompare.js +0 -10
  520. package/esm/deps/deno.land/std@0.205.0/semver/rsort.d.ts +0 -3
  521. package/esm/deps/deno.land/std@0.205.0/semver/rsort.js +0 -5
  522. package/esm/deps/deno.land/std@0.205.0/semver/sort.d.ts +0 -3
  523. package/esm/deps/deno.land/std@0.205.0/semver/sort.js +0 -5
  524. package/esm/deps/deno.land/std@0.205.0/semver/test_comparator.d.ts +0 -8
  525. package/esm/deps/deno.land/std@0.205.0/semver/test_comparator.js +0 -10
  526. package/esm/deps/deno.land/std@0.205.0/semver/test_range.d.ts +0 -8
  527. package/esm/deps/deno.land/std@0.205.0/semver/test_range.js +0 -16
  528. package/esm/deps/deno.land/std@0.205.0/semver/types.d.ts +0 -44
  529. package/esm/deps/deno.land/std@0.205.0/semver/types.js +0 -2
  530. package/esm/deps/deno.land/std@0.51.0/fs/eol.d.ts +0 -12
  531. package/esm/deps/deno.land/std@0.51.0/fs/eol.js +0 -29
  532. package/esm/deps/deno.land/x/ini@v2.1.0/ini.d.ts +0 -53
  533. package/esm/deps/deno.land/x/ini@v2.1.0/ini.js +0 -226
  534. package/esm/deps/deno.land/x/ini@v2.1.0/mod.d.ts +0 -1
  535. package/esm/deps/deno.land/x/ini@v2.1.0/mod.js +0 -1
  536. package/esm/src/Change.d.ts +0 -8
  537. package/esm/src/Change.js +0 -48
  538. package/esm/src/Changelog.d.ts +0 -23
  539. package/esm/src/Changelog.js +0 -183
  540. package/esm/src/Release.d.ts +0 -28
  541. package/esm/src/Release.js +0 -220
  542. package/esm/src/deps.d.ts +0 -2
  543. package/esm/src/deps.js +0 -1
  544. package/esm/src/parser.d.ts +0 -11
  545. package/esm/src/parser.js +0 -178
  546. package/esm/src/settings.d.ts +0 -17
  547. package/esm/src/settings.js +0 -47
  548. package/script/bin.d.ts +0 -2
  549. package/script/deps/deno.land/std@0.189.0/_util/asserts.d.ts +0 -10
  550. package/script/deps/deno.land/std@0.189.0/_util/asserts.js +0 -27
  551. package/script/deps/deno.land/std@0.189.0/_util/os.d.ts +0 -4
  552. package/script/deps/deno.land/std@0.189.0/flags/mod.d.ts +0 -166
  553. package/script/deps/deno.land/std@0.189.0/flags/mod.js +0 -369
  554. package/script/deps/deno.land/std@0.189.0/path/_util.d.ts +0 -11
  555. package/script/deps/deno.land/std@0.189.0/path/_util.js +0 -174
  556. package/script/deps/deno.land/std@0.189.0/path/common.d.ts +0 -13
  557. package/script/deps/deno.land/std@0.189.0/path/common.js +0 -40
  558. package/script/deps/deno.land/std@0.189.0/path/glob.js +0 -391
  559. package/script/deps/deno.land/std@0.189.0/path/mod.d.ts +0 -11
  560. package/script/deps/deno.land/std@0.189.0/path/mod.js +0 -66
  561. package/script/deps/deno.land/std@0.189.0/path/posix.d.ts +0 -86
  562. package/script/deps/deno.land/std@0.189.0/path/posix.js +0 -481
  563. package/script/deps/deno.land/std@0.189.0/path/separator.d.ts +0 -2
  564. package/script/deps/deno.land/std@0.189.0/path/separator.js +0 -8
  565. package/script/deps/deno.land/std@0.189.0/path/win32.d.ts +0 -91
  566. package/script/deps/deno.land/std@0.189.0/path/win32.js +0 -948
  567. package/script/deps/deno.land/std@0.205.0/semver/_shared.d.ts +0 -42
  568. package/script/deps/deno.land/std@0.205.0/semver/_shared.js +0 -248
  569. package/script/deps/deno.land/std@0.205.0/semver/cmp.d.ts +0 -9
  570. package/script/deps/deno.land/std@0.205.0/semver/cmp.js +0 -39
  571. package/script/deps/deno.land/std@0.205.0/semver/comparator_format.d.ts +0 -8
  572. package/script/deps/deno.land/std@0.205.0/semver/comparator_format.js +0 -15
  573. package/script/deps/deno.land/std@0.205.0/semver/comparator_intersects.d.ts +0 -8
  574. package/script/deps/deno.land/std@0.205.0/semver/comparator_intersects.js +0 -49
  575. package/script/deps/deno.land/std@0.205.0/semver/comparator_max.d.ts +0 -9
  576. package/script/deps/deno.land/std@0.205.0/semver/comparator_max.js +0 -49
  577. package/script/deps/deno.land/std@0.205.0/semver/comparator_min.d.ts +0 -8
  578. package/script/deps/deno.land/std@0.205.0/semver/comparator_min.js +0 -36
  579. package/script/deps/deno.land/std@0.205.0/semver/compare.d.ts +0 -10
  580. package/script/deps/deno.land/std@0.205.0/semver/compare.js +0 -22
  581. package/script/deps/deno.land/std@0.205.0/semver/compare_build.d.ts +0 -13
  582. package/script/deps/deno.land/std@0.205.0/semver/compare_build.js +0 -27
  583. package/script/deps/deno.land/std@0.205.0/semver/constants.d.ts +0 -42
  584. package/script/deps/deno.land/std@0.205.0/semver/constants.js +0 -78
  585. package/script/deps/deno.land/std@0.205.0/semver/difference.d.ts +0 -4
  586. package/script/deps/deno.land/std@0.205.0/semver/difference.js +0 -30
  587. package/script/deps/deno.land/std@0.205.0/semver/eq.d.ts +0 -4
  588. package/script/deps/deno.land/std@0.205.0/semver/eq.js +0 -11
  589. package/script/deps/deno.land/std@0.205.0/semver/format.d.ts +0 -12
  590. package/script/deps/deno.land/std@0.205.0/semver/format.js +0 -58
  591. package/script/deps/deno.land/std@0.205.0/semver/gt.d.ts +0 -3
  592. package/script/deps/deno.land/std@0.205.0/semver/gt.js +0 -9
  593. package/script/deps/deno.land/std@0.205.0/semver/gte.d.ts +0 -3
  594. package/script/deps/deno.land/std@0.205.0/semver/gte.js +0 -9
  595. package/script/deps/deno.land/std@0.205.0/semver/gtr.d.ts +0 -3
  596. package/script/deps/deno.land/std@0.205.0/semver/gtr.js +0 -9
  597. package/script/deps/deno.land/std@0.205.0/semver/increment.js +0 -211
  598. package/script/deps/deno.land/std@0.205.0/semver/is_semver_comparator.d.ts +0 -12
  599. package/script/deps/deno.land/std@0.205.0/semver/is_semver_comparator.js +0 -35
  600. package/script/deps/deno.land/std@0.205.0/semver/is_semver_range.d.ts +0 -12
  601. package/script/deps/deno.land/std@0.205.0/semver/is_semver_range.js +0 -26
  602. package/script/deps/deno.land/std@0.205.0/semver/lt.d.ts +0 -3
  603. package/script/deps/deno.land/std@0.205.0/semver/lt.js +0 -9
  604. package/script/deps/deno.land/std@0.205.0/semver/lte.d.ts +0 -3
  605. package/script/deps/deno.land/std@0.205.0/semver/lte.js +0 -9
  606. package/script/deps/deno.land/std@0.205.0/semver/ltr.d.ts +0 -3
  607. package/script/deps/deno.land/std@0.205.0/semver/ltr.js +0 -9
  608. package/script/deps/deno.land/std@0.205.0/semver/max_satisfying.d.ts +0 -9
  609. package/script/deps/deno.land/std@0.205.0/semver/max_satisfying.js +0 -18
  610. package/script/deps/deno.land/std@0.205.0/semver/min_satisfying.d.ts +0 -9
  611. package/script/deps/deno.land/std@0.205.0/semver/min_satisfying.js +0 -18
  612. package/script/deps/deno.land/std@0.205.0/semver/neq.d.ts +0 -3
  613. package/script/deps/deno.land/std@0.205.0/semver/neq.js +0 -9
  614. package/script/deps/deno.land/std@0.205.0/semver/outside.d.ts +0 -11
  615. package/script/deps/deno.land/std@0.205.0/semver/outside.js +0 -71
  616. package/script/deps/deno.land/std@0.205.0/semver/parse.d.ts +0 -8
  617. package/script/deps/deno.land/std@0.205.0/semver/parse.js +0 -70
  618. package/script/deps/deno.land/std@0.205.0/semver/parse_comparator.d.ts +0 -7
  619. package/script/deps/deno.land/std@0.205.0/semver/parse_comparator.js +0 -32
  620. package/script/deps/deno.land/std@0.205.0/semver/parse_range.d.ts +0 -7
  621. package/script/deps/deno.land/std@0.205.0/semver/parse_range.js +0 -296
  622. package/script/deps/deno.land/std@0.205.0/semver/range_format.d.ts +0 -8
  623. package/script/deps/deno.land/std@0.205.0/semver/range_format.js +0 -15
  624. package/script/deps/deno.land/std@0.205.0/semver/range_intersects.d.ts +0 -8
  625. package/script/deps/deno.land/std@0.205.0/semver/range_intersects.js +0 -39
  626. package/script/deps/deno.land/std@0.205.0/semver/range_max.d.ts +0 -7
  627. package/script/deps/deno.land/std@0.205.0/semver/range_max.js +0 -19
  628. package/script/deps/deno.land/std@0.205.0/semver/range_min.d.ts +0 -7
  629. package/script/deps/deno.land/std@0.205.0/semver/range_min.js +0 -18
  630. package/script/deps/deno.land/std@0.205.0/semver/rcompare.d.ts +0 -8
  631. package/script/deps/deno.land/std@0.205.0/semver/rcompare.js +0 -14
  632. package/script/deps/deno.land/std@0.205.0/semver/rsort.d.ts +0 -3
  633. package/script/deps/deno.land/std@0.205.0/semver/rsort.js +0 -9
  634. package/script/deps/deno.land/std@0.205.0/semver/sort.d.ts +0 -3
  635. package/script/deps/deno.land/std@0.205.0/semver/sort.js +0 -9
  636. package/script/deps/deno.land/std@0.205.0/semver/test_comparator.d.ts +0 -8
  637. package/script/deps/deno.land/std@0.205.0/semver/test_comparator.js +0 -14
  638. package/script/deps/deno.land/std@0.205.0/semver/test_range.d.ts +0 -8
  639. package/script/deps/deno.land/std@0.205.0/semver/test_range.js +0 -20
  640. package/script/deps/deno.land/std@0.205.0/semver/types.d.ts +0 -44
  641. package/script/deps/deno.land/std@0.205.0/semver/types.js +0 -3
  642. package/script/deps/deno.land/std@0.51.0/fs/eol.d.ts +0 -12
  643. package/script/deps/deno.land/std@0.51.0/fs/eol.js +0 -34
  644. package/script/deps/deno.land/x/ini@v2.1.0/ini.d.ts +0 -53
  645. package/script/deps/deno.land/x/ini@v2.1.0/ini.js +0 -256
  646. package/script/deps/deno.land/x/ini@v2.1.0/mod.d.ts +0 -1
  647. package/script/deps/deno.land/x/ini@v2.1.0/mod.js +0 -17
  648. package/script/src/Change.d.ts +0 -8
  649. package/script/src/Change.js +0 -51
  650. package/script/src/Changelog.d.ts +0 -23
  651. package/script/src/Changelog.js +0 -186
  652. package/script/src/Release.d.ts +0 -28
  653. package/script/src/Release.js +0 -226
  654. package/script/src/deps.d.ts +0 -2
  655. package/script/src/deps.js +0 -8
  656. package/script/src/parser.d.ts +0 -11
  657. package/script/src/parser.js +0 -184
  658. package/script/src/settings.d.ts +0 -17
  659. package/script/src/settings.js +0 -51
  660. /package/esm/{test → keep-a-changelog/test}/changelog.custom.type.md +0 -0
  661. /package/esm/{test → keep-a-changelog/test}/changelog.expected.linted.md +0 -0
  662. /package/esm/{test → keep-a-changelog/test}/changelog.expected.md +0 -0
  663. /package/esm/{test → keep-a-changelog/test}/changelog.gitlab.md +0 -0
  664. /package/esm/{test → keep-a-changelog/test}/changelog.md +0 -0
  665. /package/esm/{test → keep-a-changelog/test}/empty.expected.md +0 -0
  666. /package/esm/{deps/deno.land/std@0.189.0/path/_constants.d.ts → std/path/_common/constants.d.ts} +0 -0
  667. /package/script/{test → keep-a-changelog/test}/changelog.custom.type.md +0 -0
  668. /package/script/{test → keep-a-changelog/test}/changelog.expected.linted.md +0 -0
  669. /package/script/{test → keep-a-changelog/test}/changelog.expected.md +0 -0
  670. /package/script/{test → keep-a-changelog/test}/changelog.gitlab.md +0 -0
  671. /package/script/{test → keep-a-changelog/test}/changelog.md +0 -0
  672. /package/script/{test → keep-a-changelog/test}/empty.expected.md +0 -0
  673. /package/script/{deps/deno.land/std@0.189.0/path/_constants.d.ts → std/path/_common/constants.d.ts} +0 -0
@@ -1,948 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.toFileUrl = exports.fromFileUrl = exports.parse = exports.format = exports.extname = exports.basename = exports.dirname = exports.toNamespacedPath = exports.relative = exports.join = exports.isAbsolute = exports.normalize = exports.resolve = exports.delimiter = exports.sep = void 0;
27
- // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
28
- // Copyright the Browserify authors. MIT License.
29
- // Ported from https://github.com/browserify/path-browserify/
30
- // This module is browser compatible.
31
- const dntShim = __importStar(require("../../../../_dnt.shims.js"));
32
- const _constants_js_1 = require("./_constants.js");
33
- const _util_js_1 = require("./_util.js");
34
- const asserts_js_1 = require("../_util/asserts.js");
35
- exports.sep = "\\";
36
- exports.delimiter = ";";
37
- /**
38
- * Resolves path segments into a `path`
39
- * @param pathSegments to process to path
40
- */
41
- function resolve(...pathSegments) {
42
- let resolvedDevice = "";
43
- let resolvedTail = "";
44
- let resolvedAbsolute = false;
45
- for (let i = pathSegments.length - 1; i >= -1; i--) {
46
- let path;
47
- // deno-lint-ignore no-explicit-any
48
- const { Deno } = dntShim.dntGlobalThis;
49
- if (i >= 0) {
50
- path = pathSegments[i];
51
- }
52
- else if (!resolvedDevice) {
53
- if (typeof Deno?.cwd !== "function") {
54
- throw new TypeError("Resolved a drive-letter-less path without a CWD.");
55
- }
56
- path = Deno.cwd();
57
- }
58
- else {
59
- if (typeof Deno?.env?.get !== "function" || typeof Deno?.cwd !== "function") {
60
- throw new TypeError("Resolved a relative path without a CWD.");
61
- }
62
- path = Deno.cwd();
63
- // Verify that a cwd was found and that it actually points
64
- // to our drive. If not, default to the drive's root.
65
- if (path === undefined ||
66
- path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) {
67
- path = `${resolvedDevice}\\`;
68
- }
69
- }
70
- (0, _util_js_1.assertPath)(path);
71
- const len = path.length;
72
- // Skip empty entries
73
- if (len === 0)
74
- continue;
75
- let rootEnd = 0;
76
- let device = "";
77
- let isAbsolute = false;
78
- const code = path.charCodeAt(0);
79
- // Try to match a root
80
- if (len > 1) {
81
- if ((0, _util_js_1.isPathSeparator)(code)) {
82
- // Possible UNC root
83
- // If we started with a separator, we know we at least have an
84
- // absolute path of some kind (UNC or otherwise)
85
- isAbsolute = true;
86
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(1))) {
87
- // Matched double path separator at beginning
88
- let j = 2;
89
- let last = j;
90
- // Match 1 or more non-path separators
91
- for (; j < len; ++j) {
92
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
93
- break;
94
- }
95
- if (j < len && j !== last) {
96
- const firstPart = path.slice(last, j);
97
- // Matched!
98
- last = j;
99
- // Match 1 or more path separators
100
- for (; j < len; ++j) {
101
- if (!(0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
102
- break;
103
- }
104
- if (j < len && j !== last) {
105
- // Matched!
106
- last = j;
107
- // Match 1 or more non-path separators
108
- for (; j < len; ++j) {
109
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
110
- break;
111
- }
112
- if (j === len) {
113
- // We matched a UNC root only
114
- device = `\\\\${firstPart}\\${path.slice(last)}`;
115
- rootEnd = j;
116
- }
117
- else if (j !== last) {
118
- // We matched a UNC root with leftovers
119
- device = `\\\\${firstPart}\\${path.slice(last, j)}`;
120
- rootEnd = j;
121
- }
122
- }
123
- }
124
- }
125
- else {
126
- rootEnd = 1;
127
- }
128
- }
129
- else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
130
- // Possible device root
131
- if (path.charCodeAt(1) === _constants_js_1.CHAR_COLON) {
132
- device = path.slice(0, 2);
133
- rootEnd = 2;
134
- if (len > 2) {
135
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2))) {
136
- // Treat separator following drive name as an absolute path
137
- // indicator
138
- isAbsolute = true;
139
- rootEnd = 3;
140
- }
141
- }
142
- }
143
- }
144
- }
145
- else if ((0, _util_js_1.isPathSeparator)(code)) {
146
- // `path` contains just a path separator
147
- rootEnd = 1;
148
- isAbsolute = true;
149
- }
150
- if (device.length > 0 &&
151
- resolvedDevice.length > 0 &&
152
- device.toLowerCase() !== resolvedDevice.toLowerCase()) {
153
- // This path points to another device so it is not applicable
154
- continue;
155
- }
156
- if (resolvedDevice.length === 0 && device.length > 0) {
157
- resolvedDevice = device;
158
- }
159
- if (!resolvedAbsolute) {
160
- resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`;
161
- resolvedAbsolute = isAbsolute;
162
- }
163
- if (resolvedAbsolute && resolvedDevice.length > 0)
164
- break;
165
- }
166
- // At this point the path should be resolved to a full absolute path,
167
- // but handle relative paths to be safe (might happen when process.cwd()
168
- // fails)
169
- // Normalize the tail path
170
- resolvedTail = (0, _util_js_1.normalizeString)(resolvedTail, !resolvedAbsolute, "\\", _util_js_1.isPathSeparator);
171
- return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
172
- }
173
- exports.resolve = resolve;
174
- /**
175
- * Normalizes a `path`
176
- * @param path to normalize
177
- */
178
- function normalize(path) {
179
- (0, _util_js_1.assertPath)(path);
180
- const len = path.length;
181
- if (len === 0)
182
- return ".";
183
- let rootEnd = 0;
184
- let device;
185
- let isAbsolute = false;
186
- const code = path.charCodeAt(0);
187
- // Try to match a root
188
- if (len > 1) {
189
- if ((0, _util_js_1.isPathSeparator)(code)) {
190
- // Possible UNC root
191
- // If we started with a separator, we know we at least have an absolute
192
- // path of some kind (UNC or otherwise)
193
- isAbsolute = true;
194
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(1))) {
195
- // Matched double path separator at beginning
196
- let j = 2;
197
- let last = j;
198
- // Match 1 or more non-path separators
199
- for (; j < len; ++j) {
200
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
201
- break;
202
- }
203
- if (j < len && j !== last) {
204
- const firstPart = path.slice(last, j);
205
- // Matched!
206
- last = j;
207
- // Match 1 or more path separators
208
- for (; j < len; ++j) {
209
- if (!(0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
210
- break;
211
- }
212
- if (j < len && j !== last) {
213
- // Matched!
214
- last = j;
215
- // Match 1 or more non-path separators
216
- for (; j < len; ++j) {
217
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
218
- break;
219
- }
220
- if (j === len) {
221
- // We matched a UNC root only
222
- // Return the normalized version of the UNC root since there
223
- // is nothing left to process
224
- return `\\\\${firstPart}\\${path.slice(last)}\\`;
225
- }
226
- else if (j !== last) {
227
- // We matched a UNC root with leftovers
228
- device = `\\\\${firstPart}\\${path.slice(last, j)}`;
229
- rootEnd = j;
230
- }
231
- }
232
- }
233
- }
234
- else {
235
- rootEnd = 1;
236
- }
237
- }
238
- else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
239
- // Possible device root
240
- if (path.charCodeAt(1) === _constants_js_1.CHAR_COLON) {
241
- device = path.slice(0, 2);
242
- rootEnd = 2;
243
- if (len > 2) {
244
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2))) {
245
- // Treat separator following drive name as an absolute path
246
- // indicator
247
- isAbsolute = true;
248
- rootEnd = 3;
249
- }
250
- }
251
- }
252
- }
253
- }
254
- else if ((0, _util_js_1.isPathSeparator)(code)) {
255
- // `path` contains just a path separator, exit early to avoid unnecessary
256
- // work
257
- return "\\";
258
- }
259
- let tail;
260
- if (rootEnd < len) {
261
- tail = (0, _util_js_1.normalizeString)(path.slice(rootEnd), !isAbsolute, "\\", _util_js_1.isPathSeparator);
262
- }
263
- else {
264
- tail = "";
265
- }
266
- if (tail.length === 0 && !isAbsolute)
267
- tail = ".";
268
- if (tail.length > 0 && (0, _util_js_1.isPathSeparator)(path.charCodeAt(len - 1))) {
269
- tail += "\\";
270
- }
271
- if (device === undefined) {
272
- if (isAbsolute) {
273
- if (tail.length > 0)
274
- return `\\${tail}`;
275
- else
276
- return "\\";
277
- }
278
- else if (tail.length > 0) {
279
- return tail;
280
- }
281
- else {
282
- return "";
283
- }
284
- }
285
- else if (isAbsolute) {
286
- if (tail.length > 0)
287
- return `${device}\\${tail}`;
288
- else
289
- return `${device}\\`;
290
- }
291
- else if (tail.length > 0) {
292
- return device + tail;
293
- }
294
- else {
295
- return device;
296
- }
297
- }
298
- exports.normalize = normalize;
299
- /**
300
- * Verifies whether path is absolute
301
- * @param path to verify
302
- */
303
- function isAbsolute(path) {
304
- (0, _util_js_1.assertPath)(path);
305
- const len = path.length;
306
- if (len === 0)
307
- return false;
308
- const code = path.charCodeAt(0);
309
- if ((0, _util_js_1.isPathSeparator)(code)) {
310
- return true;
311
- }
312
- else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
313
- // Possible device root
314
- if (len > 2 && path.charCodeAt(1) === _constants_js_1.CHAR_COLON) {
315
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2)))
316
- return true;
317
- }
318
- }
319
- return false;
320
- }
321
- exports.isAbsolute = isAbsolute;
322
- /**
323
- * Join all given a sequence of `paths`,then normalizes the resulting path.
324
- * @param paths to be joined and normalized
325
- */
326
- function join(...paths) {
327
- const pathsCount = paths.length;
328
- if (pathsCount === 0)
329
- return ".";
330
- let joined;
331
- let firstPart = null;
332
- for (let i = 0; i < pathsCount; ++i) {
333
- const path = paths[i];
334
- (0, _util_js_1.assertPath)(path);
335
- if (path.length > 0) {
336
- if (joined === undefined)
337
- joined = firstPart = path;
338
- else
339
- joined += `\\${path}`;
340
- }
341
- }
342
- if (joined === undefined)
343
- return ".";
344
- // Make sure that the joined path doesn't start with two slashes, because
345
- // normalize() will mistake it for an UNC path then.
346
- //
347
- // This step is skipped when it is very clear that the user actually
348
- // intended to point at an UNC path. This is assumed when the first
349
- // non-empty string arguments starts with exactly two slashes followed by
350
- // at least one more non-slash character.
351
- //
352
- // Note that for normalize() to treat a path as an UNC path it needs to
353
- // have at least 2 components, so we don't filter for that here.
354
- // This means that the user can use join to construct UNC paths from
355
- // a server name and a share name; for example:
356
- // path.join('//server', 'share') -> '\\\\server\\share\\')
357
- let needsReplace = true;
358
- let slashCount = 0;
359
- (0, asserts_js_1.assert)(firstPart != null);
360
- if ((0, _util_js_1.isPathSeparator)(firstPart.charCodeAt(0))) {
361
- ++slashCount;
362
- const firstLen = firstPart.length;
363
- if (firstLen > 1) {
364
- if ((0, _util_js_1.isPathSeparator)(firstPart.charCodeAt(1))) {
365
- ++slashCount;
366
- if (firstLen > 2) {
367
- if ((0, _util_js_1.isPathSeparator)(firstPart.charCodeAt(2)))
368
- ++slashCount;
369
- else {
370
- // We matched a UNC path in the first part
371
- needsReplace = false;
372
- }
373
- }
374
- }
375
- }
376
- }
377
- if (needsReplace) {
378
- // Find any more consecutive slashes we need to replace
379
- for (; slashCount < joined.length; ++slashCount) {
380
- if (!(0, _util_js_1.isPathSeparator)(joined.charCodeAt(slashCount)))
381
- break;
382
- }
383
- // Replace the slashes if needed
384
- if (slashCount >= 2)
385
- joined = `\\${joined.slice(slashCount)}`;
386
- }
387
- return normalize(joined);
388
- }
389
- exports.join = join;
390
- /**
391
- * It will solve the relative path from `from` to `to`, for instance:
392
- * from = 'C:\\orandea\\test\\aaa'
393
- * to = 'C:\\orandea\\impl\\bbb'
394
- * The output of the function should be: '..\\..\\impl\\bbb'
395
- * @param from relative path
396
- * @param to relative path
397
- */
398
- function relative(from, to) {
399
- (0, _util_js_1.assertPath)(from);
400
- (0, _util_js_1.assertPath)(to);
401
- if (from === to)
402
- return "";
403
- const fromOrig = resolve(from);
404
- const toOrig = resolve(to);
405
- if (fromOrig === toOrig)
406
- return "";
407
- from = fromOrig.toLowerCase();
408
- to = toOrig.toLowerCase();
409
- if (from === to)
410
- return "";
411
- // Trim any leading backslashes
412
- let fromStart = 0;
413
- let fromEnd = from.length;
414
- for (; fromStart < fromEnd; ++fromStart) {
415
- if (from.charCodeAt(fromStart) !== _constants_js_1.CHAR_BACKWARD_SLASH)
416
- break;
417
- }
418
- // Trim trailing backslashes (applicable to UNC paths only)
419
- for (; fromEnd - 1 > fromStart; --fromEnd) {
420
- if (from.charCodeAt(fromEnd - 1) !== _constants_js_1.CHAR_BACKWARD_SLASH)
421
- break;
422
- }
423
- const fromLen = fromEnd - fromStart;
424
- // Trim any leading backslashes
425
- let toStart = 0;
426
- let toEnd = to.length;
427
- for (; toStart < toEnd; ++toStart) {
428
- if (to.charCodeAt(toStart) !== _constants_js_1.CHAR_BACKWARD_SLASH)
429
- break;
430
- }
431
- // Trim trailing backslashes (applicable to UNC paths only)
432
- for (; toEnd - 1 > toStart; --toEnd) {
433
- if (to.charCodeAt(toEnd - 1) !== _constants_js_1.CHAR_BACKWARD_SLASH)
434
- break;
435
- }
436
- const toLen = toEnd - toStart;
437
- // Compare paths to find the longest common path from root
438
- const length = fromLen < toLen ? fromLen : toLen;
439
- let lastCommonSep = -1;
440
- let i = 0;
441
- for (; i <= length; ++i) {
442
- if (i === length) {
443
- if (toLen > length) {
444
- if (to.charCodeAt(toStart + i) === _constants_js_1.CHAR_BACKWARD_SLASH) {
445
- // We get here if `from` is the exact base path for `to`.
446
- // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz'
447
- return toOrig.slice(toStart + i + 1);
448
- }
449
- else if (i === 2) {
450
- // We get here if `from` is the device root.
451
- // For example: from='C:\\'; to='C:\\foo'
452
- return toOrig.slice(toStart + i);
453
- }
454
- }
455
- if (fromLen > length) {
456
- if (from.charCodeAt(fromStart + i) === _constants_js_1.CHAR_BACKWARD_SLASH) {
457
- // We get here if `to` is the exact base path for `from`.
458
- // For example: from='C:\\foo\\bar'; to='C:\\foo'
459
- lastCommonSep = i;
460
- }
461
- else if (i === 2) {
462
- // We get here if `to` is the device root.
463
- // For example: from='C:\\foo\\bar'; to='C:\\'
464
- lastCommonSep = 3;
465
- }
466
- }
467
- break;
468
- }
469
- const fromCode = from.charCodeAt(fromStart + i);
470
- const toCode = to.charCodeAt(toStart + i);
471
- if (fromCode !== toCode)
472
- break;
473
- else if (fromCode === _constants_js_1.CHAR_BACKWARD_SLASH)
474
- lastCommonSep = i;
475
- }
476
- // We found a mismatch before the first common path separator was seen, so
477
- // return the original `to`.
478
- if (i !== length && lastCommonSep === -1) {
479
- return toOrig;
480
- }
481
- let out = "";
482
- if (lastCommonSep === -1)
483
- lastCommonSep = 0;
484
- // Generate the relative path based on the path difference between `to` and
485
- // `from`
486
- for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
487
- if (i === fromEnd || from.charCodeAt(i) === _constants_js_1.CHAR_BACKWARD_SLASH) {
488
- if (out.length === 0)
489
- out += "..";
490
- else
491
- out += "\\..";
492
- }
493
- }
494
- // Lastly, append the rest of the destination (`to`) path that comes after
495
- // the common path parts
496
- if (out.length > 0) {
497
- return out + toOrig.slice(toStart + lastCommonSep, toEnd);
498
- }
499
- else {
500
- toStart += lastCommonSep;
501
- if (toOrig.charCodeAt(toStart) === _constants_js_1.CHAR_BACKWARD_SLASH)
502
- ++toStart;
503
- return toOrig.slice(toStart, toEnd);
504
- }
505
- }
506
- exports.relative = relative;
507
- /**
508
- * Resolves path to a namespace path
509
- * @param path to resolve to namespace
510
- */
511
- function toNamespacedPath(path) {
512
- // Note: this will *probably* throw somewhere.
513
- if (typeof path !== "string")
514
- return path;
515
- if (path.length === 0)
516
- return "";
517
- const resolvedPath = resolve(path);
518
- if (resolvedPath.length >= 3) {
519
- if (resolvedPath.charCodeAt(0) === _constants_js_1.CHAR_BACKWARD_SLASH) {
520
- // Possible UNC root
521
- if (resolvedPath.charCodeAt(1) === _constants_js_1.CHAR_BACKWARD_SLASH) {
522
- const code = resolvedPath.charCodeAt(2);
523
- if (code !== _constants_js_1.CHAR_QUESTION_MARK && code !== _constants_js_1.CHAR_DOT) {
524
- // Matched non-long UNC root, convert the path to a long UNC path
525
- return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
526
- }
527
- }
528
- }
529
- else if ((0, _util_js_1.isWindowsDeviceRoot)(resolvedPath.charCodeAt(0))) {
530
- // Possible device root
531
- if (resolvedPath.charCodeAt(1) === _constants_js_1.CHAR_COLON &&
532
- resolvedPath.charCodeAt(2) === _constants_js_1.CHAR_BACKWARD_SLASH) {
533
- // Matched device root, convert the path to a long UNC path
534
- return `\\\\?\\${resolvedPath}`;
535
- }
536
- }
537
- }
538
- return path;
539
- }
540
- exports.toNamespacedPath = toNamespacedPath;
541
- /**
542
- * Return the directory path of a `path`.
543
- * @param path - path to extract the directory from.
544
- */
545
- function dirname(path) {
546
- (0, _util_js_1.assertPath)(path);
547
- const len = path.length;
548
- if (len === 0)
549
- return ".";
550
- let rootEnd = -1;
551
- let end = -1;
552
- let matchedSlash = true;
553
- let offset = 0;
554
- const code = path.charCodeAt(0);
555
- // Try to match a root
556
- if (len > 1) {
557
- if ((0, _util_js_1.isPathSeparator)(code)) {
558
- // Possible UNC root
559
- rootEnd = offset = 1;
560
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(1))) {
561
- // Matched double path separator at beginning
562
- let j = 2;
563
- let last = j;
564
- // Match 1 or more non-path separators
565
- for (; j < len; ++j) {
566
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
567
- break;
568
- }
569
- if (j < len && j !== last) {
570
- // Matched!
571
- last = j;
572
- // Match 1 or more path separators
573
- for (; j < len; ++j) {
574
- if (!(0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
575
- break;
576
- }
577
- if (j < len && j !== last) {
578
- // Matched!
579
- last = j;
580
- // Match 1 or more non-path separators
581
- for (; j < len; ++j) {
582
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
583
- break;
584
- }
585
- if (j === len) {
586
- // We matched a UNC root only
587
- return path;
588
- }
589
- if (j !== last) {
590
- // We matched a UNC root with leftovers
591
- // Offset by 1 to include the separator after the UNC root to
592
- // treat it as a "normal root" on top of a (UNC) root
593
- rootEnd = offset = j + 1;
594
- }
595
- }
596
- }
597
- }
598
- }
599
- else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
600
- // Possible device root
601
- if (path.charCodeAt(1) === _constants_js_1.CHAR_COLON) {
602
- rootEnd = offset = 2;
603
- if (len > 2) {
604
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2)))
605
- rootEnd = offset = 3;
606
- }
607
- }
608
- }
609
- }
610
- else if ((0, _util_js_1.isPathSeparator)(code)) {
611
- // `path` contains just a path separator, exit early to avoid
612
- // unnecessary work
613
- return path;
614
- }
615
- for (let i = len - 1; i >= offset; --i) {
616
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(i))) {
617
- if (!matchedSlash) {
618
- end = i;
619
- break;
620
- }
621
- }
622
- else {
623
- // We saw the first non-path separator
624
- matchedSlash = false;
625
- }
626
- }
627
- if (end === -1) {
628
- if (rootEnd === -1)
629
- return ".";
630
- else
631
- end = rootEnd;
632
- }
633
- return (0, _util_js_1.stripTrailingSeparators)(path.slice(0, end), _util_js_1.isPosixPathSeparator);
634
- }
635
- exports.dirname = dirname;
636
- /**
637
- * Return the last portion of a `path`.
638
- * Trailing directory separators are ignored, and optional suffix is removed.
639
- *
640
- * @param path - path to extract name from.
641
- * @param [suffix] - suffix to remove from extracted name.
642
- */
643
- function basename(path, suffix = "") {
644
- (0, _util_js_1.assertPath)(path);
645
- if (path.length === 0)
646
- return path;
647
- if (typeof suffix !== "string") {
648
- throw new TypeError(`Suffix must be a string. Received ${JSON.stringify(suffix)}`);
649
- }
650
- // Check for a drive letter prefix so as not to mistake the following
651
- // path separator as an extra separator at the end of the path that can be
652
- // disregarded
653
- let start = 0;
654
- if (path.length >= 2) {
655
- const drive = path.charCodeAt(0);
656
- if ((0, _util_js_1.isWindowsDeviceRoot)(drive)) {
657
- if (path.charCodeAt(1) === _constants_js_1.CHAR_COLON)
658
- start = 2;
659
- }
660
- }
661
- const lastSegment = (0, _util_js_1.lastPathSegment)(path, _util_js_1.isPathSeparator, start);
662
- const strippedSegment = (0, _util_js_1.stripTrailingSeparators)(lastSegment, _util_js_1.isPathSeparator);
663
- return suffix ? (0, _util_js_1.stripSuffix)(strippedSegment, suffix) : strippedSegment;
664
- }
665
- exports.basename = basename;
666
- /**
667
- * Return the extension of the `path` with leading period.
668
- * @param path with extension
669
- * @returns extension (ex. for `file.ts` returns `.ts`)
670
- */
671
- function extname(path) {
672
- (0, _util_js_1.assertPath)(path);
673
- let start = 0;
674
- let startDot = -1;
675
- let startPart = 0;
676
- let end = -1;
677
- let matchedSlash = true;
678
- // Track the state of characters (if any) we see before our first dot and
679
- // after any path separator we find
680
- let preDotState = 0;
681
- // Check for a drive letter prefix so as not to mistake the following
682
- // path separator as an extra separator at the end of the path that can be
683
- // disregarded
684
- if (path.length >= 2 &&
685
- path.charCodeAt(1) === _constants_js_1.CHAR_COLON &&
686
- (0, _util_js_1.isWindowsDeviceRoot)(path.charCodeAt(0))) {
687
- start = startPart = 2;
688
- }
689
- for (let i = path.length - 1; i >= start; --i) {
690
- const code = path.charCodeAt(i);
691
- if ((0, _util_js_1.isPathSeparator)(code)) {
692
- // If we reached a path separator that was not part of a set of path
693
- // separators at the end of the string, stop now
694
- if (!matchedSlash) {
695
- startPart = i + 1;
696
- break;
697
- }
698
- continue;
699
- }
700
- if (end === -1) {
701
- // We saw the first non-path separator, mark this as the end of our
702
- // extension
703
- matchedSlash = false;
704
- end = i + 1;
705
- }
706
- if (code === _constants_js_1.CHAR_DOT) {
707
- // If this is our first dot, mark it as the start of our extension
708
- if (startDot === -1)
709
- startDot = i;
710
- else if (preDotState !== 1)
711
- preDotState = 1;
712
- }
713
- else if (startDot !== -1) {
714
- // We saw a non-dot and non-path separator before our dot, so we should
715
- // have a good chance at having a non-empty extension
716
- preDotState = -1;
717
- }
718
- }
719
- if (startDot === -1 ||
720
- end === -1 ||
721
- // We saw a non-dot character immediately before the dot
722
- preDotState === 0 ||
723
- // The (right-most) trimmed path component is exactly '..'
724
- (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
725
- return "";
726
- }
727
- return path.slice(startDot, end);
728
- }
729
- exports.extname = extname;
730
- /**
731
- * Generate a path from `FormatInputPathObject` object.
732
- * @param pathObject with path
733
- */
734
- function format(pathObject) {
735
- if (pathObject === null || typeof pathObject !== "object") {
736
- throw new TypeError(`The "pathObject" argument must be of type Object. Received type ${typeof pathObject}`);
737
- }
738
- return (0, _util_js_1._format)("\\", pathObject);
739
- }
740
- exports.format = format;
741
- /**
742
- * Return a `ParsedPath` object of the `path`.
743
- * @param path to process
744
- */
745
- function parse(path) {
746
- (0, _util_js_1.assertPath)(path);
747
- const ret = { root: "", dir: "", base: "", ext: "", name: "" };
748
- const len = path.length;
749
- if (len === 0)
750
- return ret;
751
- let rootEnd = 0;
752
- let code = path.charCodeAt(0);
753
- // Try to match a root
754
- if (len > 1) {
755
- if ((0, _util_js_1.isPathSeparator)(code)) {
756
- // Possible UNC root
757
- rootEnd = 1;
758
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(1))) {
759
- // Matched double path separator at beginning
760
- let j = 2;
761
- let last = j;
762
- // Match 1 or more non-path separators
763
- for (; j < len; ++j) {
764
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
765
- break;
766
- }
767
- if (j < len && j !== last) {
768
- // Matched!
769
- last = j;
770
- // Match 1 or more path separators
771
- for (; j < len; ++j) {
772
- if (!(0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
773
- break;
774
- }
775
- if (j < len && j !== last) {
776
- // Matched!
777
- last = j;
778
- // Match 1 or more non-path separators
779
- for (; j < len; ++j) {
780
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
781
- break;
782
- }
783
- if (j === len) {
784
- // We matched a UNC root only
785
- rootEnd = j;
786
- }
787
- else if (j !== last) {
788
- // We matched a UNC root with leftovers
789
- rootEnd = j + 1;
790
- }
791
- }
792
- }
793
- }
794
- }
795
- else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
796
- // Possible device root
797
- if (path.charCodeAt(1) === _constants_js_1.CHAR_COLON) {
798
- rootEnd = 2;
799
- if (len > 2) {
800
- if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2))) {
801
- if (len === 3) {
802
- // `path` contains just a drive root, exit early to avoid
803
- // unnecessary work
804
- ret.root = ret.dir = path;
805
- ret.base = "\\";
806
- return ret;
807
- }
808
- rootEnd = 3;
809
- }
810
- }
811
- else {
812
- // `path` contains just a relative drive root, exit early to avoid
813
- // unnecessary work
814
- ret.root = ret.dir = path;
815
- return ret;
816
- }
817
- }
818
- }
819
- }
820
- else if ((0, _util_js_1.isPathSeparator)(code)) {
821
- // `path` contains just a path separator, exit early to avoid
822
- // unnecessary work
823
- ret.root = ret.dir = path;
824
- ret.base = "\\";
825
- return ret;
826
- }
827
- if (rootEnd > 0)
828
- ret.root = path.slice(0, rootEnd);
829
- let startDot = -1;
830
- let startPart = rootEnd;
831
- let end = -1;
832
- let matchedSlash = true;
833
- let i = path.length - 1;
834
- // Track the state of characters (if any) we see before our first dot and
835
- // after any path separator we find
836
- let preDotState = 0;
837
- // Get non-dir info
838
- for (; i >= rootEnd; --i) {
839
- code = path.charCodeAt(i);
840
- if ((0, _util_js_1.isPathSeparator)(code)) {
841
- // If we reached a path separator that was not part of a set of path
842
- // separators at the end of the string, stop now
843
- if (!matchedSlash) {
844
- startPart = i + 1;
845
- break;
846
- }
847
- continue;
848
- }
849
- if (end === -1) {
850
- // We saw the first non-path separator, mark this as the end of our
851
- // extension
852
- matchedSlash = false;
853
- end = i + 1;
854
- }
855
- if (code === _constants_js_1.CHAR_DOT) {
856
- // If this is our first dot, mark it as the start of our extension
857
- if (startDot === -1)
858
- startDot = i;
859
- else if (preDotState !== 1)
860
- preDotState = 1;
861
- }
862
- else if (startDot !== -1) {
863
- // We saw a non-dot and non-path separator before our dot, so we should
864
- // have a good chance at having a non-empty extension
865
- preDotState = -1;
866
- }
867
- }
868
- if (startDot === -1 ||
869
- end === -1 ||
870
- // We saw a non-dot character immediately before the dot
871
- preDotState === 0 ||
872
- // The (right-most) trimmed path component is exactly '..'
873
- (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
874
- if (end !== -1) {
875
- ret.base = ret.name = path.slice(startPart, end);
876
- }
877
- }
878
- else {
879
- ret.name = path.slice(startPart, startDot);
880
- ret.base = path.slice(startPart, end);
881
- ret.ext = path.slice(startDot, end);
882
- }
883
- // Fallback to '\' in case there is no basename
884
- ret.base = ret.base || "\\";
885
- // If the directory is the root, use the entire root as the `dir` including
886
- // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the
887
- // trailing slash (`C:\abc\def` -> `C:\abc`).
888
- if (startPart > 0 && startPart !== rootEnd) {
889
- ret.dir = path.slice(0, startPart - 1);
890
- }
891
- else
892
- ret.dir = ret.root;
893
- return ret;
894
- }
895
- exports.parse = parse;
896
- /**
897
- * Converts a file URL to a path string.
898
- *
899
- * ```ts
900
- * import { fromFileUrl } from "https://deno.land/std@$STD_VERSION/path/win32.ts";
901
- * fromFileUrl("file:///home/foo"); // "\\home\\foo"
902
- * fromFileUrl("file:///C:/Users/foo"); // "C:\\Users\\foo"
903
- * fromFileUrl("file://localhost/home/foo"); // "\\\\localhost\\home\\foo"
904
- * ```
905
- * @param url of a file URL
906
- */
907
- function fromFileUrl(url) {
908
- url = url instanceof URL ? url : new URL(url);
909
- if (url.protocol != "file:") {
910
- throw new TypeError("Must be a file URL.");
911
- }
912
- let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
913
- if (url.hostname != "") {
914
- // Note: The `URL` implementation guarantees that the drive letter and
915
- // hostname are mutually exclusive. Otherwise it would not have been valid
916
- // to append the hostname and path like this.
917
- path = `\\\\${url.hostname}${path}`;
918
- }
919
- return path;
920
- }
921
- exports.fromFileUrl = fromFileUrl;
922
- /**
923
- * Converts a path string to a file URL.
924
- *
925
- * ```ts
926
- * import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/win32.ts";
927
- * toFileUrl("\\home\\foo"); // new URL("file:///home/foo")
928
- * toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo")
929
- * toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo")
930
- * ```
931
- * @param path to convert to file URL
932
- */
933
- function toFileUrl(path) {
934
- if (!isAbsolute(path)) {
935
- throw new TypeError("Must be an absolute path.");
936
- }
937
- const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
938
- const url = new URL("file:///");
939
- url.pathname = (0, _util_js_1.encodeWhitespace)(pathname.replace(/%/g, "%25"));
940
- if (hostname != null && hostname != "localhost") {
941
- url.hostname = hostname;
942
- if (!url.hostname) {
943
- throw new TypeError("Invalid hostname.");
944
- }
945
- }
946
- return url;
947
- }
948
- exports.toFileUrl = toFileUrl;