keep-a-changelog 2.2.1 → 2.4.1

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 (258) hide show
  1. package/CHANGELOG.md +26 -2
  2. package/README.md +27 -8
  3. package/esm/_dnt.shims.js +0 -1
  4. package/esm/bin.js +8 -3
  5. package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/flags/mod.js +3 -2
  6. package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/path/_util.d.ts +3 -0
  7. package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/_util.js +46 -0
  8. package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/path/mod.d.ts +3 -1
  9. package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/mod.js +4 -1
  10. package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/path/posix.d.ts +7 -5
  11. package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/posix.js +50 -108
  12. package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/path/win32.d.ts +7 -5
  13. package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/win32.js +23 -82
  14. package/esm/deps/deno.land/std@0.203.0/semver/_shared.d.ts +42 -0
  15. package/esm/deps/deno.land/std@0.203.0/semver/_shared.js +230 -0
  16. package/esm/deps/deno.land/std@0.203.0/semver/cmp.d.ts +9 -0
  17. package/esm/deps/deno.land/std@0.203.0/semver/cmp.js +35 -0
  18. package/esm/deps/deno.land/std@0.203.0/semver/comparator_format.d.ts +8 -0
  19. package/esm/deps/deno.land/std@0.203.0/semver/comparator_format.js +11 -0
  20. package/esm/deps/deno.land/std@0.203.0/semver/comparator_intersects.d.ts +8 -0
  21. package/esm/deps/deno.land/std@0.203.0/semver/comparator_intersects.js +45 -0
  22. package/esm/deps/deno.land/std@0.203.0/semver/comparator_max.d.ts +9 -0
  23. package/esm/deps/deno.land/std@0.203.0/semver/comparator_max.js +45 -0
  24. package/esm/deps/deno.land/std@0.203.0/semver/comparator_min.d.ts +8 -0
  25. package/esm/deps/deno.land/std@0.203.0/semver/comparator_min.js +32 -0
  26. package/esm/deps/deno.land/std@0.203.0/semver/compare.d.ts +10 -0
  27. package/esm/deps/deno.land/std@0.203.0/semver/compare.js +18 -0
  28. package/esm/deps/deno.land/std@0.203.0/semver/compare_build.d.ts +13 -0
  29. package/esm/deps/deno.land/std@0.203.0/semver/compare_build.js +23 -0
  30. package/esm/deps/deno.land/std@0.203.0/semver/constants.d.ts +42 -0
  31. package/esm/deps/deno.land/std@0.203.0/semver/constants.js +75 -0
  32. package/esm/deps/deno.land/std@0.203.0/semver/difference.d.ts +4 -0
  33. package/esm/deps/deno.land/std@0.203.0/semver/difference.js +26 -0
  34. package/esm/deps/deno.land/std@0.203.0/semver/eq.d.ts +4 -0
  35. package/esm/deps/deno.land/std@0.203.0/semver/eq.js +7 -0
  36. package/esm/deps/deno.land/std@0.203.0/semver/format.d.ts +12 -0
  37. package/esm/deps/deno.land/std@0.203.0/semver/format.js +54 -0
  38. package/esm/deps/deno.land/std@0.203.0/semver/gt.d.ts +3 -0
  39. package/esm/deps/deno.land/std@0.203.0/semver/gt.js +5 -0
  40. package/esm/deps/deno.land/std@0.203.0/semver/gte.d.ts +3 -0
  41. package/esm/deps/deno.land/std@0.203.0/semver/gte.js +5 -0
  42. package/esm/deps/deno.land/std@0.203.0/semver/gtr.d.ts +3 -0
  43. package/esm/deps/deno.land/std@0.203.0/semver/gtr.js +5 -0
  44. package/esm/deps/deno.land/std@0.203.0/semver/increment.d.ts +28 -0
  45. package/esm/deps/deno.land/std@0.203.0/semver/increment.js +207 -0
  46. package/esm/deps/deno.land/std@0.203.0/semver/is_semver.d.ts +17 -0
  47. package/esm/deps/deno.land/std@0.203.0/semver/is_semver.js +41 -0
  48. package/esm/deps/deno.land/std@0.203.0/semver/is_semver_comparator.d.ts +12 -0
  49. package/esm/deps/deno.land/std@0.203.0/semver/is_semver_comparator.js +31 -0
  50. package/esm/deps/deno.land/std@0.203.0/semver/is_semver_range.d.ts +12 -0
  51. package/esm/deps/deno.land/std@0.203.0/semver/is_semver_range.js +22 -0
  52. package/esm/deps/deno.land/std@0.203.0/semver/lt.d.ts +3 -0
  53. package/esm/deps/deno.land/std@0.203.0/semver/lt.js +5 -0
  54. package/esm/deps/deno.land/std@0.203.0/semver/lte.d.ts +3 -0
  55. package/esm/deps/deno.land/std@0.203.0/semver/lte.js +5 -0
  56. package/esm/deps/deno.land/std@0.203.0/semver/ltr.d.ts +3 -0
  57. package/esm/deps/deno.land/std@0.203.0/semver/ltr.js +5 -0
  58. package/esm/deps/deno.land/std@0.203.0/semver/max_satisfying.d.ts +9 -0
  59. package/esm/deps/deno.land/std@0.203.0/semver/max_satisfying.js +14 -0
  60. package/esm/deps/deno.land/std@0.203.0/semver/min_satisfying.d.ts +9 -0
  61. package/esm/deps/deno.land/std@0.203.0/semver/min_satisfying.js +14 -0
  62. package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.203.0}/semver/mod.d.ts +88 -176
  63. package/esm/deps/deno.land/std@0.203.0/semver/mod.js +313 -0
  64. package/esm/deps/deno.land/std@0.203.0/semver/neq.d.ts +3 -0
  65. package/esm/deps/deno.land/std@0.203.0/semver/neq.js +5 -0
  66. package/esm/deps/deno.land/std@0.203.0/semver/outside.d.ts +11 -0
  67. package/esm/deps/deno.land/std@0.203.0/semver/outside.js +67 -0
  68. package/esm/deps/deno.land/std@0.203.0/semver/parse.d.ts +8 -0
  69. package/esm/deps/deno.land/std@0.203.0/semver/parse.js +66 -0
  70. package/esm/deps/deno.land/std@0.203.0/semver/parse_comparator.d.ts +7 -0
  71. package/esm/deps/deno.land/std@0.203.0/semver/parse_comparator.js +28 -0
  72. package/esm/deps/deno.land/std@0.203.0/semver/parse_range.d.ts +7 -0
  73. package/esm/deps/deno.land/std@0.203.0/semver/parse_range.js +292 -0
  74. package/esm/deps/deno.land/std@0.203.0/semver/range_format.d.ts +8 -0
  75. package/esm/deps/deno.land/std@0.203.0/semver/range_format.js +11 -0
  76. package/esm/deps/deno.land/std@0.203.0/semver/range_intersects.d.ts +8 -0
  77. package/esm/deps/deno.land/std@0.203.0/semver/range_intersects.js +35 -0
  78. package/esm/deps/deno.land/std@0.203.0/semver/range_max.d.ts +7 -0
  79. package/esm/deps/deno.land/std@0.203.0/semver/range_max.js +15 -0
  80. package/esm/deps/deno.land/std@0.203.0/semver/range_min.d.ts +7 -0
  81. package/esm/deps/deno.land/std@0.203.0/semver/range_min.js +14 -0
  82. package/esm/deps/deno.land/std@0.203.0/semver/rcompare.d.ts +8 -0
  83. package/esm/deps/deno.land/std@0.203.0/semver/rcompare.js +10 -0
  84. package/esm/deps/deno.land/std@0.203.0/semver/rsort.d.ts +3 -0
  85. package/esm/deps/deno.land/std@0.203.0/semver/rsort.js +5 -0
  86. package/esm/deps/deno.land/std@0.203.0/semver/sort.d.ts +3 -0
  87. package/esm/deps/deno.land/std@0.203.0/semver/sort.js +5 -0
  88. package/esm/deps/deno.land/std@0.203.0/semver/test_comparator.d.ts +8 -0
  89. package/esm/deps/deno.land/std@0.203.0/semver/test_comparator.js +10 -0
  90. package/esm/deps/deno.land/std@0.203.0/semver/test_range.d.ts +8 -0
  91. package/esm/deps/deno.land/std@0.203.0/semver/test_range.js +16 -0
  92. package/esm/deps/deno.land/std@0.203.0/semver/types.d.ts +44 -0
  93. package/esm/deps/deno.land/std@0.203.0/semver/types.js +2 -0
  94. package/{types → esm}/src/Changelog.d.ts +4 -2
  95. package/esm/src/Changelog.js +25 -4
  96. package/{types → esm}/src/Release.d.ts +5 -4
  97. package/esm/src/Release.js +21 -22
  98. package/esm/src/deps.d.ts +2 -0
  99. package/esm/src/deps.js +1 -1
  100. package/esm/test/changelog.custom.type.md +2 -3
  101. package/esm/test/changelog.expected.linted.md +3 -4
  102. package/esm/test/changelog.expected.md +3 -4
  103. package/esm/test/changelog.md +3 -4
  104. package/esm/test/empty.expected.md +2 -2
  105. package/package.json +6 -13
  106. package/script/_dnt.polyfills.d.ts +11 -0
  107. package/script/_dnt.shims.d.ts +5 -0
  108. package/script/_dnt.shims.js +0 -1
  109. package/script/bin.d.ts +2 -0
  110. package/script/bin.js +8 -3
  111. package/script/deps/deno.land/std@0.189.0/_util/asserts.d.ts +10 -0
  112. package/script/deps/deno.land/std@0.189.0/_util/os.d.ts +4 -0
  113. package/script/deps/deno.land/std@0.189.0/flags/mod.d.ts +166 -0
  114. package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/flags/mod.js +4 -3
  115. package/script/deps/deno.land/std@0.189.0/path/_constants.d.ts +39 -0
  116. package/script/deps/deno.land/std@0.189.0/path/_interface.d.ts +26 -0
  117. package/script/deps/deno.land/std@0.189.0/path/_util.d.ts +11 -0
  118. package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/_util.js +50 -1
  119. package/script/deps/deno.land/std@0.189.0/path/common.d.ts +13 -0
  120. package/script/deps/deno.land/std@0.189.0/path/glob.d.ts +83 -0
  121. package/script/deps/deno.land/std@0.189.0/path/mod.d.ts +11 -0
  122. package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/mod.js +5 -2
  123. package/script/deps/deno.land/std@0.189.0/path/posix.d.ts +86 -0
  124. package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/posix.js +48 -106
  125. package/script/deps/deno.land/std@0.189.0/path/separator.d.ts +2 -0
  126. package/script/deps/deno.land/std@0.189.0/path/win32.d.ts +91 -0
  127. package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/win32.js +22 -81
  128. package/script/deps/deno.land/std@0.203.0/semver/_shared.d.ts +42 -0
  129. package/script/deps/deno.land/std@0.203.0/semver/_shared.js +248 -0
  130. package/script/deps/deno.land/std@0.203.0/semver/cmp.d.ts +9 -0
  131. package/script/deps/deno.land/std@0.203.0/semver/cmp.js +39 -0
  132. package/script/deps/deno.land/std@0.203.0/semver/comparator_format.d.ts +8 -0
  133. package/script/deps/deno.land/std@0.203.0/semver/comparator_format.js +15 -0
  134. package/script/deps/deno.land/std@0.203.0/semver/comparator_intersects.d.ts +8 -0
  135. package/script/deps/deno.land/std@0.203.0/semver/comparator_intersects.js +49 -0
  136. package/script/deps/deno.land/std@0.203.0/semver/comparator_max.d.ts +9 -0
  137. package/script/deps/deno.land/std@0.203.0/semver/comparator_max.js +49 -0
  138. package/script/deps/deno.land/std@0.203.0/semver/comparator_min.d.ts +8 -0
  139. package/script/deps/deno.land/std@0.203.0/semver/comparator_min.js +36 -0
  140. package/script/deps/deno.land/std@0.203.0/semver/compare.d.ts +10 -0
  141. package/script/deps/deno.land/std@0.203.0/semver/compare.js +22 -0
  142. package/script/deps/deno.land/std@0.203.0/semver/compare_build.d.ts +13 -0
  143. package/script/deps/deno.land/std@0.203.0/semver/compare_build.js +27 -0
  144. package/script/deps/deno.land/std@0.203.0/semver/constants.d.ts +42 -0
  145. package/script/deps/deno.land/std@0.203.0/semver/constants.js +78 -0
  146. package/script/deps/deno.land/std@0.203.0/semver/difference.d.ts +4 -0
  147. package/script/deps/deno.land/std@0.203.0/semver/difference.js +30 -0
  148. package/script/deps/deno.land/std@0.203.0/semver/eq.d.ts +4 -0
  149. package/script/deps/deno.land/std@0.203.0/semver/eq.js +11 -0
  150. package/script/deps/deno.land/std@0.203.0/semver/format.d.ts +12 -0
  151. package/script/deps/deno.land/std@0.203.0/semver/format.js +58 -0
  152. package/script/deps/deno.land/std@0.203.0/semver/gt.d.ts +3 -0
  153. package/script/deps/deno.land/std@0.203.0/semver/gt.js +9 -0
  154. package/script/deps/deno.land/std@0.203.0/semver/gte.d.ts +3 -0
  155. package/script/deps/deno.land/std@0.203.0/semver/gte.js +9 -0
  156. package/script/deps/deno.land/std@0.203.0/semver/gtr.d.ts +3 -0
  157. package/script/deps/deno.land/std@0.203.0/semver/gtr.js +9 -0
  158. package/script/deps/deno.land/std@0.203.0/semver/increment.d.ts +28 -0
  159. package/script/deps/deno.land/std@0.203.0/semver/increment.js +211 -0
  160. package/script/deps/deno.land/std@0.203.0/semver/is_semver.d.ts +17 -0
  161. package/script/deps/deno.land/std@0.203.0/semver/is_semver.js +45 -0
  162. package/script/deps/deno.land/std@0.203.0/semver/is_semver_comparator.d.ts +12 -0
  163. package/script/deps/deno.land/std@0.203.0/semver/is_semver_comparator.js +35 -0
  164. package/script/deps/deno.land/std@0.203.0/semver/is_semver_range.d.ts +12 -0
  165. package/script/deps/deno.land/std@0.203.0/semver/is_semver_range.js +26 -0
  166. package/script/deps/deno.land/std@0.203.0/semver/lt.d.ts +3 -0
  167. package/script/deps/deno.land/std@0.203.0/semver/lt.js +9 -0
  168. package/script/deps/deno.land/std@0.203.0/semver/lte.d.ts +3 -0
  169. package/script/deps/deno.land/std@0.203.0/semver/lte.js +9 -0
  170. package/script/deps/deno.land/std@0.203.0/semver/ltr.d.ts +3 -0
  171. package/script/deps/deno.land/std@0.203.0/semver/ltr.js +9 -0
  172. package/script/deps/deno.land/std@0.203.0/semver/max_satisfying.d.ts +9 -0
  173. package/script/deps/deno.land/std@0.203.0/semver/max_satisfying.js +18 -0
  174. package/script/deps/deno.land/std@0.203.0/semver/min_satisfying.d.ts +9 -0
  175. package/script/deps/deno.land/std@0.203.0/semver/min_satisfying.js +18 -0
  176. package/script/deps/deno.land/std@0.203.0/semver/mod.d.ts +310 -0
  177. package/script/deps/deno.land/std@0.203.0/semver/mod.js +330 -0
  178. package/script/deps/deno.land/std@0.203.0/semver/neq.d.ts +3 -0
  179. package/script/deps/deno.land/std@0.203.0/semver/neq.js +9 -0
  180. package/script/deps/deno.land/std@0.203.0/semver/outside.d.ts +11 -0
  181. package/script/deps/deno.land/std@0.203.0/semver/outside.js +71 -0
  182. package/script/deps/deno.land/std@0.203.0/semver/parse.d.ts +8 -0
  183. package/script/deps/deno.land/std@0.203.0/semver/parse.js +70 -0
  184. package/script/deps/deno.land/std@0.203.0/semver/parse_comparator.d.ts +7 -0
  185. package/script/deps/deno.land/std@0.203.0/semver/parse_comparator.js +32 -0
  186. package/script/deps/deno.land/std@0.203.0/semver/parse_range.d.ts +7 -0
  187. package/script/deps/deno.land/std@0.203.0/semver/parse_range.js +296 -0
  188. package/script/deps/deno.land/std@0.203.0/semver/range_format.d.ts +8 -0
  189. package/script/deps/deno.land/std@0.203.0/semver/range_format.js +15 -0
  190. package/script/deps/deno.land/std@0.203.0/semver/range_intersects.d.ts +8 -0
  191. package/script/deps/deno.land/std@0.203.0/semver/range_intersects.js +39 -0
  192. package/script/deps/deno.land/std@0.203.0/semver/range_max.d.ts +7 -0
  193. package/script/deps/deno.land/std@0.203.0/semver/range_max.js +19 -0
  194. package/script/deps/deno.land/std@0.203.0/semver/range_min.d.ts +7 -0
  195. package/script/deps/deno.land/std@0.203.0/semver/range_min.js +18 -0
  196. package/script/deps/deno.land/std@0.203.0/semver/rcompare.d.ts +8 -0
  197. package/script/deps/deno.land/std@0.203.0/semver/rcompare.js +14 -0
  198. package/script/deps/deno.land/std@0.203.0/semver/rsort.d.ts +3 -0
  199. package/script/deps/deno.land/std@0.203.0/semver/rsort.js +9 -0
  200. package/script/deps/deno.land/std@0.203.0/semver/sort.d.ts +3 -0
  201. package/script/deps/deno.land/std@0.203.0/semver/sort.js +9 -0
  202. package/script/deps/deno.land/std@0.203.0/semver/test_comparator.d.ts +8 -0
  203. package/script/deps/deno.land/std@0.203.0/semver/test_comparator.js +14 -0
  204. package/script/deps/deno.land/std@0.203.0/semver/test_range.d.ts +8 -0
  205. package/script/deps/deno.land/std@0.203.0/semver/test_range.js +20 -0
  206. package/script/deps/deno.land/std@0.203.0/semver/types.d.ts +44 -0
  207. package/script/deps/deno.land/std@0.203.0/semver/types.js +3 -0
  208. package/script/deps/deno.land/std@0.51.0/fs/eol.d.ts +12 -0
  209. package/script/deps/deno.land/x/ini@v2.1.0/ini.d.ts +53 -0
  210. package/script/deps/deno.land/x/ini@v2.1.0/mod.d.ts +1 -0
  211. package/script/mod.d.ts +6 -0
  212. package/script/src/Change.d.ts +8 -0
  213. package/script/src/Changelog.d.ts +21 -0
  214. package/script/src/Changelog.js +24 -3
  215. package/script/src/Release.d.ts +28 -0
  216. package/script/src/Release.js +20 -21
  217. package/script/src/deps.d.ts +2 -0
  218. package/script/src/deps.js +5 -6
  219. package/script/src/parser.d.ts +11 -0
  220. package/script/test/changelog.custom.type.md +2 -3
  221. package/script/test/changelog.expected.linted.md +3 -4
  222. package/script/test/changelog.expected.md +3 -4
  223. package/script/test/changelog.md +3 -4
  224. package/script/test/empty.expected.md +2 -2
  225. package/esm/deps/deno.land/std@0.173.0/semver/mod.js +0 -1420
  226. package/script/deps/deno.land/std@0.173.0/semver/mod.js +0 -1458
  227. package/types/src/deps.d.ts +0 -1
  228. /package/{types → esm}/_dnt.polyfills.d.ts +0 -0
  229. /package/{types → esm}/_dnt.shims.d.ts +0 -0
  230. /package/{types → esm}/bin.d.ts +0 -0
  231. /package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/_util/asserts.d.ts +0 -0
  232. /package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/_util/asserts.js +0 -0
  233. /package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/_util/os.d.ts +0 -0
  234. /package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/_util/os.js +0 -0
  235. /package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/flags/mod.d.ts +0 -0
  236. /package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/path/_constants.d.ts +0 -0
  237. /package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/_constants.js +0 -0
  238. /package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/path/_interface.d.ts +0 -0
  239. /package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/_interface.js +0 -0
  240. /package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/path/common.d.ts +0 -0
  241. /package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/common.js +0 -0
  242. /package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/path/glob.d.ts +0 -0
  243. /package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/glob.js +0 -0
  244. /package/{types/deps/deno.land/std@0.173.0 → esm/deps/deno.land/std@0.189.0}/path/separator.d.ts +0 -0
  245. /package/esm/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/separator.js +0 -0
  246. /package/{types → esm}/deps/deno.land/std@0.51.0/fs/eol.d.ts +0 -0
  247. /package/{types → esm}/deps/deno.land/x/ini@v2.1.0/ini.d.ts +0 -0
  248. /package/{types → esm}/deps/deno.land/x/ini@v2.1.0/mod.d.ts +0 -0
  249. /package/{types → esm}/mod.d.ts +0 -0
  250. /package/{types → esm}/src/Change.d.ts +0 -0
  251. /package/{types → esm}/src/parser.d.ts +0 -0
  252. /package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/_util/asserts.js +0 -0
  253. /package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/_util/os.js +0 -0
  254. /package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/_constants.js +0 -0
  255. /package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/_interface.js +0 -0
  256. /package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/common.js +0 -0
  257. /package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/glob.js +0 -0
  258. /package/script/deps/deno.land/{std@0.173.0 → std@0.189.0}/path/separator.js +0 -0
@@ -0,0 +1,296 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseRange = void 0;
4
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
5
+ const constants_js_1 = require("./constants.js");
6
+ const _shared_js_1 = require("./_shared.js");
7
+ const parse_comparator_js_1 = require("./parse_comparator.js");
8
+ // ~, ~> --> * (any, kinda silly)
9
+ // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
10
+ // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
11
+ // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
12
+ // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
13
+ // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
14
+ function replaceTildes(comp) {
15
+ return comp
16
+ .trim()
17
+ .split(/\s+/)
18
+ .map((comp) => replaceTilde(comp))
19
+ .join(" ");
20
+ }
21
+ function replaceTilde(comp) {
22
+ const r = _shared_js_1.re[_shared_js_1.TILDE];
23
+ return comp.replace(r, (_, M, m, p, pr) => {
24
+ let ret;
25
+ if (isX(M)) {
26
+ ret = "";
27
+ }
28
+ else if (isX(m)) {
29
+ ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
30
+ }
31
+ else if (isX(p)) {
32
+ // ~1.2 == >=1.2.0 <1.3.0
33
+ ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
34
+ }
35
+ else if (pr) {
36
+ ret = ">=" +
37
+ M +
38
+ "." +
39
+ m +
40
+ "." +
41
+ p +
42
+ "-" +
43
+ pr +
44
+ " <" +
45
+ M +
46
+ "." +
47
+ (+m + 1) +
48
+ ".0";
49
+ }
50
+ else {
51
+ // ~1.2.3 == >=1.2.3 <1.3.0
52
+ ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
53
+ }
54
+ return ret;
55
+ });
56
+ }
57
+ // ^ --> * (any, kinda silly)
58
+ // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
59
+ // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
60
+ // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
61
+ // ^1.2.3 --> >=1.2.3 <2.0.0
62
+ // ^1.2.0 --> >=1.2.0 <2.0.0
63
+ function replaceCarets(comp) {
64
+ return comp
65
+ .trim()
66
+ .split(/\s+/)
67
+ .map((comp) => replaceCaret(comp))
68
+ .join(" ");
69
+ }
70
+ function replaceCaret(comp) {
71
+ const r = _shared_js_1.re[_shared_js_1.CARET];
72
+ return comp.replace(r, (_, M, m, p, pr) => {
73
+ let ret;
74
+ if (isX(M)) {
75
+ ret = "";
76
+ }
77
+ else if (isX(m)) {
78
+ ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
79
+ }
80
+ else if (isX(p)) {
81
+ if (M === "0") {
82
+ ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
83
+ }
84
+ else {
85
+ ret = ">=" + M + "." + m + ".0 <" + (+M + 1) + ".0.0";
86
+ }
87
+ }
88
+ else if (pr) {
89
+ if (M === "0") {
90
+ if (m === "0") {
91
+ ret = ">=" +
92
+ M +
93
+ "." +
94
+ m +
95
+ "." +
96
+ p +
97
+ "-" +
98
+ pr +
99
+ " <" +
100
+ M +
101
+ "." +
102
+ m +
103
+ "." +
104
+ (+p + 1);
105
+ }
106
+ else {
107
+ ret = ">=" +
108
+ M +
109
+ "." +
110
+ m +
111
+ "." +
112
+ p +
113
+ "-" +
114
+ pr +
115
+ " <" +
116
+ M +
117
+ "." +
118
+ (+m + 1) +
119
+ ".0";
120
+ }
121
+ }
122
+ else {
123
+ ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) +
124
+ ".0.0";
125
+ }
126
+ }
127
+ else {
128
+ if (M === "0") {
129
+ if (m === "0") {
130
+ ret = ">=" + M + "." + m + "." + p + " <" + M + "." + m + "." +
131
+ (+p + 1);
132
+ }
133
+ else {
134
+ ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0";
135
+ }
136
+ }
137
+ else {
138
+ ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0";
139
+ }
140
+ }
141
+ return ret;
142
+ });
143
+ }
144
+ function replaceXRanges(comp) {
145
+ return comp
146
+ .split(/\s+/)
147
+ .map((comp) => replaceXRange(comp))
148
+ .join(" ");
149
+ }
150
+ function replaceXRange(comp) {
151
+ comp = comp.trim();
152
+ const r = _shared_js_1.re[_shared_js_1.XRANGE];
153
+ return comp.replace(r, (ret, gtlt, M, m, p, _pr) => {
154
+ const xM = isX(M);
155
+ const xm = xM || isX(m);
156
+ const xp = xm || isX(p);
157
+ const anyX = xp;
158
+ if (gtlt === "=" && anyX) {
159
+ gtlt = "";
160
+ }
161
+ if (xM) {
162
+ if (gtlt === ">" || gtlt === "<") {
163
+ // nothing is allowed
164
+ ret = "<0.0.0";
165
+ }
166
+ else {
167
+ // nothing is forbidden
168
+ ret = "*";
169
+ }
170
+ }
171
+ else if (gtlt && anyX) {
172
+ // we know patch is an x, because we have any x at all.
173
+ // replace X with 0
174
+ if (xm) {
175
+ m = 0;
176
+ }
177
+ p = 0;
178
+ if (gtlt === ">") {
179
+ // >1 => >=2.0.0
180
+ // >1.2 => >=1.3.0
181
+ // >1.2.3 => >= 1.2.4
182
+ gtlt = ">=";
183
+ if (xm) {
184
+ M = +M + 1;
185
+ m = 0;
186
+ p = 0;
187
+ }
188
+ else {
189
+ m = +m + 1;
190
+ p = 0;
191
+ }
192
+ }
193
+ else if (gtlt === "<=") {
194
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
195
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
196
+ gtlt = "<";
197
+ if (xm) {
198
+ M = +M + 1;
199
+ }
200
+ else {
201
+ m = +m + 1;
202
+ }
203
+ }
204
+ ret = gtlt + M + "." + m + "." + p;
205
+ }
206
+ else if (xm) {
207
+ ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0";
208
+ }
209
+ else if (xp) {
210
+ ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0";
211
+ }
212
+ return ret;
213
+ });
214
+ }
215
+ // Because * is AND-ed with everything else in the comparator,
216
+ // and '' means "any version", just remove the *s entirely.
217
+ function replaceStars(comp) {
218
+ return comp.trim().replace(_shared_js_1.re[_shared_js_1.STAR], "");
219
+ }
220
+ // This function is passed to string.replace(re[HYPHENRANGE])
221
+ // M, m, patch, prerelease, build
222
+ // 1.2 - 3.4.5 -> >=1.2.0 <=3.4.5
223
+ // 1.2.3 - 3.4 -> >=1.2.0 <3.5.0 Any 3.4.x will do
224
+ // 1.2 - 3.4 -> >=1.2.0 <3.5.0
225
+ function hyphenReplace(_$0, from, fM, fm, fp, _fpr, _fb, to, tM, tm, tp, tpr, _tb) {
226
+ if (isX(fM)) {
227
+ from = "";
228
+ }
229
+ else if (isX(fm)) {
230
+ from = ">=" + fM + ".0.0";
231
+ }
232
+ else if (isX(fp)) {
233
+ from = ">=" + fM + "." + fm + ".0";
234
+ }
235
+ else {
236
+ from = ">=" + from;
237
+ }
238
+ if (isX(tM)) {
239
+ to = "";
240
+ }
241
+ else if (isX(tm)) {
242
+ to = "<" + (+tM + 1) + ".0.0";
243
+ }
244
+ else if (isX(tp)) {
245
+ to = "<" + tM + "." + (+tm + 1) + ".0";
246
+ }
247
+ else if (tpr) {
248
+ to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
249
+ }
250
+ else {
251
+ to = "<=" + to;
252
+ }
253
+ return (from + " " + to).trim();
254
+ }
255
+ function isX(id) {
256
+ return !id || id.toLowerCase() === "x" || id === "*";
257
+ }
258
+ /**
259
+ * Parses a range string into a SemVerRange object or throws a TypeError.
260
+ * @param range The range string
261
+ * @returns A valid semantic version range
262
+ */
263
+ function parseRange(range) {
264
+ // handle spaces around and between comparator and version
265
+ range = range.trim().replaceAll(/(?<=<|>|=) /g, "");
266
+ if (range === "") {
267
+ return { ranges: [[constants_js_1.ALL]] };
268
+ }
269
+ // Split into groups of comparators, these are considered OR'd together.
270
+ const ranges = range
271
+ .trim()
272
+ .split(/\s*\|\|\s*/)
273
+ .map((range) => {
274
+ // convert `1.2.3 - 1.2.4` into `>=1.2.3 <=1.2.4`
275
+ const hr = _shared_js_1.re[_shared_js_1.HYPHENRANGE];
276
+ range = range.replace(hr, hyphenReplace);
277
+ range = replaceCarets(range);
278
+ range = replaceTildes(range);
279
+ range = replaceXRanges(range);
280
+ range = replaceStars(range);
281
+ // At this point, the range is completely trimmed and
282
+ // ready to be split into comparators.
283
+ // These are considered AND's
284
+ if (range === "") {
285
+ return [constants_js_1.ALL];
286
+ }
287
+ else {
288
+ return range
289
+ .split(" ")
290
+ .filter((r) => r)
291
+ .map((r) => (0, parse_comparator_js_1.parseComparator)(r));
292
+ }
293
+ });
294
+ return { ranges };
295
+ }
296
+ exports.parseRange = parseRange;
@@ -0,0 +1,8 @@
1
+ import type { SemVerRange } from "./types.js";
2
+ /**
3
+ * Formats the range into a string
4
+ * @example >=0.0.0 || <1.0.0
5
+ * @param range The range to format
6
+ * @returns A string representation of the range
7
+ */
8
+ export declare function rangeFormat(range: SemVerRange): string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rangeFormat = void 0;
4
+ const comparator_format_js_1 = require("./comparator_format.js");
5
+ /**
6
+ * Formats the range into a string
7
+ * @example >=0.0.0 || <1.0.0
8
+ * @param range The range to format
9
+ * @returns A string representation of the range
10
+ */
11
+ function rangeFormat(range) {
12
+ return range.ranges.map((c) => c.map((c) => (0, comparator_format_js_1.comparatorFormat)(c)).join(" "))
13
+ .join("||");
14
+ }
15
+ exports.rangeFormat = rangeFormat;
@@ -0,0 +1,8 @@
1
+ import type { SemVerRange } from "./types.js";
2
+ /**
3
+ * The ranges intersect every range of AND comparators intersects with a least one range of OR ranges.
4
+ * @param r0 range 0
5
+ * @param r1 range 1
6
+ * @returns returns true if any
7
+ */
8
+ export declare function rangeIntersects(r0: SemVerRange, r1: SemVerRange): boolean;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rangeIntersects = void 0;
4
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
5
+ const comparator_intersects_js_1 = require("./comparator_intersects.js");
6
+ function rangesSatisfiable(ranges) {
7
+ return ranges.every((r) => {
8
+ // For each OR at least one AND must be satisfiable
9
+ return r.ranges.some((comparators) => comparatorsSatisfiable(comparators));
10
+ });
11
+ }
12
+ function comparatorsSatisfiable(comparators) {
13
+ // Comparators are satisfiable if they all intersect with each other
14
+ for (let i = 0; i < comparators.length - 1; i++) {
15
+ const c0 = comparators[i];
16
+ for (const c1 of comparators.slice(i + 1)) {
17
+ if (!(0, comparator_intersects_js_1.comparatorIntersects)(c0, c1)) {
18
+ return false;
19
+ }
20
+ }
21
+ }
22
+ return true;
23
+ }
24
+ /**
25
+ * The ranges intersect every range of AND comparators intersects with a least one range of OR ranges.
26
+ * @param r0 range 0
27
+ * @param r1 range 1
28
+ * @returns returns true if any
29
+ */
30
+ function rangeIntersects(r0, r1) {
31
+ return rangesSatisfiable([r0, r1]) && r0.ranges.some((r00) => {
32
+ return r1.ranges.some((r11) => {
33
+ return r00.every((c0) => {
34
+ return r11.every((c1) => (0, comparator_intersects_js_1.comparatorIntersects)(c0, c1));
35
+ });
36
+ });
37
+ });
38
+ }
39
+ exports.rangeIntersects = rangeIntersects;
@@ -0,0 +1,7 @@
1
+ import type { SemVer, SemVerRange } from "./types.js";
2
+ /**
3
+ * The maximum valid SemVer for a given range or INVALID
4
+ * @param range The range to calculate the max for
5
+ * @returns A valid SemVer or INVALID
6
+ */
7
+ export declare function rangeMax(range: SemVerRange): SemVer | undefined;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rangeMax = void 0;
4
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
5
+ const constants_js_1 = require("./constants.js");
6
+ const sort_js_1 = require("./sort.js");
7
+ const test_range_js_1 = require("./test_range.js");
8
+ /**
9
+ * The maximum valid SemVer for a given range or INVALID
10
+ * @param range The range to calculate the max for
11
+ * @returns A valid SemVer or INVALID
12
+ */
13
+ function rangeMax(range) {
14
+ // For and's, you take the smallest max
15
+ // For or's, you take the biggest max
16
+ //[ [1 and 2] or [2 and 3] ] = [ 1 or 2 ] = 2
17
+ return (0, sort_js_1.sort)(range.ranges.map((r) => (0, sort_js_1.sort)(r.filter((c) => (0, test_range_js_1.testRange)(c.max, range)).map((c) => c.max)).shift())).filter((v) => v).pop() ?? constants_js_1.INVALID;
18
+ }
19
+ exports.rangeMax = rangeMax;
@@ -0,0 +1,7 @@
1
+ import type { SemVer, SemVerRange } from "./types.js";
2
+ /**
3
+ * The minimum valid SemVer for a given range or INVALID
4
+ * @param range The range to calculate the min for
5
+ * @returns A valid SemVer or INVALID
6
+ */
7
+ export declare function rangeMin(range: SemVerRange): SemVer;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rangeMin = void 0;
4
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
5
+ const constants_js_1 = require("./constants.js");
6
+ const sort_js_1 = require("./sort.js");
7
+ const test_range_js_1 = require("./test_range.js");
8
+ /**
9
+ * The minimum valid SemVer for a given range or INVALID
10
+ * @param range The range to calculate the min for
11
+ * @returns A valid SemVer or INVALID
12
+ */
13
+ function rangeMin(range) {
14
+ // For or's, you take the smallest min
15
+ //[ [1 and 2] or [2 and 3] ] = [ 2 or 3 ] = 2
16
+ return (0, sort_js_1.sort)(range.ranges.map((r) => (0, sort_js_1.sort)(r.filter((c) => (0, test_range_js_1.testRange)(c.min, range)).map((c) => c.min)).pop()).filter((v) => v)).shift() ?? constants_js_1.INVALID;
17
+ }
18
+ exports.rangeMin = rangeMin;
@@ -0,0 +1,8 @@
1
+ import type { SemVer } from "./types.js";
2
+ /**
3
+ * A reverse comparison of two versions. Same as compare but
4
+ * `1` and `-1` are inverted.
5
+ *
6
+ * Sorts in descending order if passed to `Array.sort()`,
7
+ */
8
+ export declare function rcompare(s0: SemVer, s1: SemVer): 1 | 0 | -1;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rcompare = void 0;
4
+ const compare_js_1 = require("./compare.js");
5
+ /**
6
+ * A reverse comparison of two versions. Same as compare but
7
+ * `1` and `-1` are inverted.
8
+ *
9
+ * Sorts in descending order if passed to `Array.sort()`,
10
+ */
11
+ function rcompare(s0, s1) {
12
+ return (0, compare_js_1.compare)(s1, s0);
13
+ }
14
+ exports.rcompare = rcompare;
@@ -0,0 +1,3 @@
1
+ import type { SemVer } from "./types.js";
2
+ /** Sorts a list of semantic versions in descending order. */
3
+ export declare function rsort(list: SemVer[]): SemVer[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rsort = void 0;
4
+ const compare_js_1 = require("./compare.js");
5
+ /** Sorts a list of semantic versions in descending order. */
6
+ function rsort(list) {
7
+ return list.sort((a, b) => (0, compare_js_1.compare)(b, a));
8
+ }
9
+ exports.rsort = rsort;
@@ -0,0 +1,3 @@
1
+ import type { SemVer } from "./types.js";
2
+ /** Sorts a list of semantic versions in ascending order. */
3
+ export declare function sort(list: SemVer[]): SemVer[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sort = void 0;
4
+ const compare_js_1 = require("./compare.js");
5
+ /** Sorts a list of semantic versions in ascending order. */
6
+ function sort(list) {
7
+ return list.sort((a, b) => (0, compare_js_1.compare)(a, b));
8
+ }
9
+ exports.sort = sort;
@@ -0,0 +1,8 @@
1
+ import type { SemVer, SemVerComparator } from "./types.js";
2
+ /**
3
+ * Test to see if a semantic version falls within the range of the comparator.
4
+ * @param version The version to compare
5
+ * @param comparator The comparator
6
+ * @returns True if the version is within the comparators set otherwise false
7
+ */
8
+ export declare function testComparator(version: SemVer, comparator: SemVerComparator): boolean;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.testComparator = void 0;
4
+ const cmp_js_1 = require("./cmp.js");
5
+ /**
6
+ * Test to see if a semantic version falls within the range of the comparator.
7
+ * @param version The version to compare
8
+ * @param comparator The comparator
9
+ * @returns True if the version is within the comparators set otherwise false
10
+ */
11
+ function testComparator(version, comparator) {
12
+ return (0, cmp_js_1.cmp)(version, comparator.operator, comparator.semver);
13
+ }
14
+ exports.testComparator = testComparator;
@@ -0,0 +1,8 @@
1
+ import type { SemVer, SemVerRange } from "./types.js";
2
+ /**
3
+ * Test to see if the version satisfies the range.
4
+ * @param version The version to test
5
+ * @param range The range to check
6
+ * @returns true if the version is in the range
7
+ */
8
+ export declare function testRange(version: SemVer, range: SemVerRange): boolean;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.testRange = void 0;
4
+ const gte_js_1 = require("./gte.js");
5
+ const lte_js_1 = require("./lte.js");
6
+ /**
7
+ * Test to see if the version satisfies the range.
8
+ * @param version The version to test
9
+ * @param range The range to check
10
+ * @returns true if the version is in the range
11
+ */
12
+ function testRange(version, range) {
13
+ for (const r of range.ranges) {
14
+ if (r.every((c) => (0, gte_js_1.gte)(version, c.min) && (0, lte_js_1.lte)(version, c.max))) {
15
+ return true;
16
+ }
17
+ }
18
+ return false;
19
+ }
20
+ exports.testRange = testRange;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The possible release types are used as an operator for the
3
+ * increment function and as a result of the difference function.
4
+ */
5
+ export type ReleaseType = "pre" | "major" | "premajor" | "minor" | "preminor" | "patch" | "prepatch" | "prerelease";
6
+ /**
7
+ * SemVer comparison operators.
8
+ */
9
+ export type Operator = "" | "=" | "==" | "===" | "!==" | "!=" | ">" | ">=" | "<" | "<=";
10
+ /**
11
+ * The style to use when formatting a SemVer object into a string
12
+ */
13
+ export type FormatStyle = "full" | "release" | "primary" | "build" | "pre" | "patch" | "minor" | "major";
14
+ /**
15
+ * The shape of a valid semantic version comparator
16
+ * @example >=0.0.0
17
+ */
18
+ export interface SemVerComparator {
19
+ operator: Operator;
20
+ semver: SemVer;
21
+ min: SemVer;
22
+ max: SemVer;
23
+ }
24
+ /**
25
+ * A SemVer object parsed into its constituent parts.
26
+ */
27
+ export interface SemVer {
28
+ major: number;
29
+ minor: number;
30
+ patch: number;
31
+ prerelease: (string | number)[];
32
+ build: string[];
33
+ }
34
+ type SemVerRangeAnd = SemVerComparator[];
35
+ type SemVerRangeOr = SemVerRangeAnd[];
36
+ /**
37
+ * A type representing a semantic version range. The ranges consist of
38
+ * a nested array, which represents a set of OR comparisons while the
39
+ * inner array represents AND comparisons.
40
+ */
41
+ export interface SemVerRange {
42
+ ranges: SemVerRangeOr;
43
+ }
44
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /** EndOfLine character enum */
2
+ export declare enum EOL {
3
+ LF = "\n",
4
+ CRLF = "\r\n"
5
+ }
6
+ /**
7
+ * Detect the EOL character for string input.
8
+ * returns null if no newline
9
+ */
10
+ export declare function detect(content: string): EOL | null;
11
+ /** Format the file to the targeted EOL */
12
+ export declare function format(content: string, eol: EOL): string;
@@ -0,0 +1,53 @@
1
+ export declare const parse: typeof decode;
2
+ export declare const stringify: typeof encode;
3
+ export interface EncodeOptions {
4
+ section?: string;
5
+ whitespace?: boolean;
6
+ }
7
+ /**
8
+ * Encode the object `object` into an ini-style formatted string. If the
9
+ * optional parameter `section` is given, then all top-level properties
10
+ * of the object are put into this section and the `section`-string is
11
+ * prepended to all sub-sections, see the usage example above.
12
+ *
13
+ * The `options` object may contain the following:
14
+ * - `section` A string which will be the first `section` in the encoded
15
+ * ini data. Defaults to none.
16
+ * - `whitespace` Boolean to specify whether to put whitespace around the
17
+ * `=` character. By default, whitespace is omitted, to be friendly to
18
+ * some persnickety old parsers that don't tolerate it well. But some
19
+ * find that it's more human-readable and pretty with the whitespace.
20
+ *
21
+ * For backwards compatibility reasons, if a `string` options is passed,
22
+ * then it is assumed to be the `section` value.
23
+ *
24
+ * @param obj Object to encode
25
+ * @param opt Encoding options
26
+ */
27
+ export declare function encode(obj: any, opt?: string | EncodeOptions): string;
28
+ /**
29
+ * Decode the given ini-style formatted document into a nested object.
30
+ * @param str ini-style document
31
+ */
32
+ export declare function decode(str: string): any;
33
+ /**
34
+ * Escapes the string `val` such that it is safe to be used as a key or
35
+ * value in an ini-file. Basically escapes quotes. For example:
36
+ *
37
+ * ```javascript
38
+ * ini.safe('"unsafe string"')
39
+ * ```
40
+ *
41
+ * would result in
42
+ *
43
+ * ```javascript
44
+ * "\"unsafe string\""
45
+ * ```
46
+ * @param val String to escape
47
+ */
48
+ export declare function safe(val: string | any): string;
49
+ /**
50
+ * Unescapes the given string value.
51
+ * @param val String to unescape
52
+ */
53
+ export declare function unsafe(val?: string): string;
@@ -0,0 +1 @@
1
+ export * from './ini.js';
@@ -0,0 +1,6 @@
1
+ import "./_dnt.polyfills.js";
2
+ import parser from "./src/parser.js";
3
+ import Change from "./src/Change.js";
4
+ import Changelog from "./src/Changelog.js";
5
+ import Release from "./src/Release.js";
6
+ export { Change, Changelog, parser, Release };