keep-a-changelog 2.3.0 → 2.5.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 (213) hide show
  1. package/CHANGELOG.md +33 -4
  2. package/README.md +23 -8
  3. package/esm/_dnt.shims.js +0 -1
  4. package/esm/bin.js +19 -20
  5. package/esm/deps/deno.land/std@0.205.0/semver/_shared.d.ts +42 -0
  6. package/esm/deps/deno.land/std@0.205.0/semver/_shared.js +230 -0
  7. package/esm/deps/deno.land/std@0.205.0/semver/cmp.d.ts +9 -0
  8. package/esm/deps/deno.land/std@0.205.0/semver/cmp.js +35 -0
  9. package/esm/deps/deno.land/std@0.205.0/semver/comparator_format.d.ts +8 -0
  10. package/esm/deps/deno.land/std@0.205.0/semver/comparator_format.js +11 -0
  11. package/esm/deps/deno.land/std@0.205.0/semver/comparator_intersects.d.ts +8 -0
  12. package/esm/deps/deno.land/std@0.205.0/semver/comparator_intersects.js +45 -0
  13. package/esm/deps/deno.land/std@0.205.0/semver/comparator_max.d.ts +9 -0
  14. package/esm/deps/deno.land/std@0.205.0/semver/comparator_max.js +45 -0
  15. package/esm/deps/deno.land/std@0.205.0/semver/comparator_min.d.ts +8 -0
  16. package/esm/deps/deno.land/std@0.205.0/semver/comparator_min.js +32 -0
  17. package/esm/deps/deno.land/std@0.205.0/semver/compare.d.ts +10 -0
  18. package/esm/deps/deno.land/std@0.205.0/semver/compare.js +18 -0
  19. package/esm/deps/deno.land/std@0.205.0/semver/compare_build.d.ts +13 -0
  20. package/esm/deps/deno.land/std@0.205.0/semver/compare_build.js +23 -0
  21. package/esm/deps/deno.land/std@0.205.0/semver/constants.d.ts +42 -0
  22. package/esm/deps/deno.land/std@0.205.0/semver/constants.js +75 -0
  23. package/esm/deps/deno.land/std@0.205.0/semver/difference.d.ts +4 -0
  24. package/esm/deps/deno.land/std@0.205.0/semver/difference.js +26 -0
  25. package/esm/deps/deno.land/std@0.205.0/semver/eq.d.ts +4 -0
  26. package/esm/deps/deno.land/std@0.205.0/semver/eq.js +7 -0
  27. package/esm/deps/deno.land/std@0.205.0/semver/format.d.ts +12 -0
  28. package/esm/deps/deno.land/std@0.205.0/semver/format.js +54 -0
  29. package/esm/deps/deno.land/std@0.205.0/semver/gt.d.ts +3 -0
  30. package/esm/deps/deno.land/std@0.205.0/semver/gt.js +5 -0
  31. package/esm/deps/deno.land/std@0.205.0/semver/gte.d.ts +3 -0
  32. package/esm/deps/deno.land/std@0.205.0/semver/gte.js +5 -0
  33. package/esm/deps/deno.land/std@0.205.0/semver/gtr.d.ts +3 -0
  34. package/esm/deps/deno.land/std@0.205.0/semver/gtr.js +5 -0
  35. package/esm/deps/deno.land/std@0.205.0/semver/increment.d.ts +28 -0
  36. package/esm/deps/deno.land/std@0.205.0/semver/increment.js +207 -0
  37. package/esm/deps/deno.land/std@0.205.0/semver/is_semver.d.ts +17 -0
  38. package/esm/deps/deno.land/std@0.205.0/semver/is_semver.js +41 -0
  39. package/esm/deps/deno.land/std@0.205.0/semver/is_semver_comparator.d.ts +12 -0
  40. package/esm/deps/deno.land/std@0.205.0/semver/is_semver_comparator.js +31 -0
  41. package/esm/deps/deno.land/std@0.205.0/semver/is_semver_range.d.ts +12 -0
  42. package/esm/deps/deno.land/std@0.205.0/semver/is_semver_range.js +22 -0
  43. package/esm/deps/deno.land/std@0.205.0/semver/lt.d.ts +3 -0
  44. package/esm/deps/deno.land/std@0.205.0/semver/lt.js +5 -0
  45. package/esm/deps/deno.land/std@0.205.0/semver/lte.d.ts +3 -0
  46. package/esm/deps/deno.land/std@0.205.0/semver/lte.js +5 -0
  47. package/esm/deps/deno.land/std@0.205.0/semver/ltr.d.ts +3 -0
  48. package/esm/deps/deno.land/std@0.205.0/semver/ltr.js +5 -0
  49. package/esm/deps/deno.land/std@0.205.0/semver/max_satisfying.d.ts +9 -0
  50. package/esm/deps/deno.land/std@0.205.0/semver/max_satisfying.js +14 -0
  51. package/esm/deps/deno.land/std@0.205.0/semver/min_satisfying.d.ts +9 -0
  52. package/esm/deps/deno.land/std@0.205.0/semver/min_satisfying.js +14 -0
  53. package/esm/deps/deno.land/{std@0.173.0 → std@0.205.0}/semver/mod.d.ts +88 -176
  54. package/esm/deps/deno.land/std@0.205.0/semver/mod.js +313 -0
  55. package/esm/deps/deno.land/std@0.205.0/semver/neq.d.ts +3 -0
  56. package/esm/deps/deno.land/std@0.205.0/semver/neq.js +5 -0
  57. package/esm/deps/deno.land/std@0.205.0/semver/outside.d.ts +11 -0
  58. package/esm/deps/deno.land/std@0.205.0/semver/outside.js +67 -0
  59. package/esm/deps/deno.land/std@0.205.0/semver/parse.d.ts +8 -0
  60. package/esm/deps/deno.land/std@0.205.0/semver/parse.js +66 -0
  61. package/esm/deps/deno.land/std@0.205.0/semver/parse_comparator.d.ts +7 -0
  62. package/esm/deps/deno.land/std@0.205.0/semver/parse_comparator.js +28 -0
  63. package/esm/deps/deno.land/std@0.205.0/semver/parse_range.d.ts +7 -0
  64. package/esm/deps/deno.land/std@0.205.0/semver/parse_range.js +292 -0
  65. package/esm/deps/deno.land/std@0.205.0/semver/range_format.d.ts +8 -0
  66. package/esm/deps/deno.land/std@0.205.0/semver/range_format.js +11 -0
  67. package/esm/deps/deno.land/std@0.205.0/semver/range_intersects.d.ts +8 -0
  68. package/esm/deps/deno.land/std@0.205.0/semver/range_intersects.js +35 -0
  69. package/esm/deps/deno.land/std@0.205.0/semver/range_max.d.ts +7 -0
  70. package/esm/deps/deno.land/std@0.205.0/semver/range_max.js +15 -0
  71. package/esm/deps/deno.land/std@0.205.0/semver/range_min.d.ts +7 -0
  72. package/esm/deps/deno.land/std@0.205.0/semver/range_min.js +14 -0
  73. package/esm/deps/deno.land/std@0.205.0/semver/rcompare.d.ts +8 -0
  74. package/esm/deps/deno.land/std@0.205.0/semver/rcompare.js +10 -0
  75. package/esm/deps/deno.land/std@0.205.0/semver/rsort.d.ts +3 -0
  76. package/esm/deps/deno.land/std@0.205.0/semver/rsort.js +5 -0
  77. package/esm/deps/deno.land/std@0.205.0/semver/sort.d.ts +3 -0
  78. package/esm/deps/deno.land/std@0.205.0/semver/sort.js +5 -0
  79. package/esm/deps/deno.land/std@0.205.0/semver/test_comparator.d.ts +8 -0
  80. package/esm/deps/deno.land/std@0.205.0/semver/test_comparator.js +10 -0
  81. package/esm/deps/deno.land/std@0.205.0/semver/test_range.d.ts +8 -0
  82. package/esm/deps/deno.land/std@0.205.0/semver/test_range.js +16 -0
  83. package/esm/deps/deno.land/std@0.205.0/semver/types.d.ts +44 -0
  84. package/esm/deps/deno.land/std@0.205.0/semver/types.js +2 -0
  85. package/esm/src/Changelog.d.ts +6 -2
  86. package/esm/src/Changelog.js +42 -4
  87. package/esm/src/Release.d.ts +5 -4
  88. package/esm/src/Release.js +21 -22
  89. package/esm/src/deps.d.ts +2 -1
  90. package/esm/src/deps.js +1 -1
  91. package/esm/src/settings.d.ts +17 -0
  92. package/esm/src/settings.js +47 -0
  93. package/esm/test/changelog.custom.type.md +2 -3
  94. package/esm/test/changelog.expected.linted.md +3 -4
  95. package/esm/test/changelog.expected.md +3 -4
  96. package/esm/test/changelog.md +3 -4
  97. package/esm/test/empty.expected.md +2 -2
  98. package/package.json +2 -2
  99. package/script/_dnt.shims.js +0 -1
  100. package/script/bin.js +22 -20
  101. package/script/deps/deno.land/std@0.205.0/semver/_shared.d.ts +42 -0
  102. package/script/deps/deno.land/std@0.205.0/semver/_shared.js +248 -0
  103. package/script/deps/deno.land/std@0.205.0/semver/cmp.d.ts +9 -0
  104. package/script/deps/deno.land/std@0.205.0/semver/cmp.js +39 -0
  105. package/script/deps/deno.land/std@0.205.0/semver/comparator_format.d.ts +8 -0
  106. package/script/deps/deno.land/std@0.205.0/semver/comparator_format.js +15 -0
  107. package/script/deps/deno.land/std@0.205.0/semver/comparator_intersects.d.ts +8 -0
  108. package/script/deps/deno.land/std@0.205.0/semver/comparator_intersects.js +49 -0
  109. package/script/deps/deno.land/std@0.205.0/semver/comparator_max.d.ts +9 -0
  110. package/script/deps/deno.land/std@0.205.0/semver/comparator_max.js +49 -0
  111. package/script/deps/deno.land/std@0.205.0/semver/comparator_min.d.ts +8 -0
  112. package/script/deps/deno.land/std@0.205.0/semver/comparator_min.js +36 -0
  113. package/script/deps/deno.land/std@0.205.0/semver/compare.d.ts +10 -0
  114. package/script/deps/deno.land/std@0.205.0/semver/compare.js +22 -0
  115. package/script/deps/deno.land/std@0.205.0/semver/compare_build.d.ts +13 -0
  116. package/script/deps/deno.land/std@0.205.0/semver/compare_build.js +27 -0
  117. package/script/deps/deno.land/std@0.205.0/semver/constants.d.ts +42 -0
  118. package/script/deps/deno.land/std@0.205.0/semver/constants.js +78 -0
  119. package/script/deps/deno.land/std@0.205.0/semver/difference.d.ts +4 -0
  120. package/script/deps/deno.land/std@0.205.0/semver/difference.js +30 -0
  121. package/script/deps/deno.land/std@0.205.0/semver/eq.d.ts +4 -0
  122. package/script/deps/deno.land/std@0.205.0/semver/eq.js +11 -0
  123. package/script/deps/deno.land/std@0.205.0/semver/format.d.ts +12 -0
  124. package/script/deps/deno.land/std@0.205.0/semver/format.js +58 -0
  125. package/script/deps/deno.land/std@0.205.0/semver/gt.d.ts +3 -0
  126. package/script/deps/deno.land/std@0.205.0/semver/gt.js +9 -0
  127. package/script/deps/deno.land/std@0.205.0/semver/gte.d.ts +3 -0
  128. package/script/deps/deno.land/std@0.205.0/semver/gte.js +9 -0
  129. package/script/deps/deno.land/std@0.205.0/semver/gtr.d.ts +3 -0
  130. package/script/deps/deno.land/std@0.205.0/semver/gtr.js +9 -0
  131. package/script/deps/deno.land/std@0.205.0/semver/increment.d.ts +28 -0
  132. package/script/deps/deno.land/std@0.205.0/semver/increment.js +211 -0
  133. package/script/deps/deno.land/std@0.205.0/semver/is_semver.d.ts +17 -0
  134. package/script/deps/deno.land/std@0.205.0/semver/is_semver.js +45 -0
  135. package/script/deps/deno.land/std@0.205.0/semver/is_semver_comparator.d.ts +12 -0
  136. package/script/deps/deno.land/std@0.205.0/semver/is_semver_comparator.js +35 -0
  137. package/script/deps/deno.land/std@0.205.0/semver/is_semver_range.d.ts +12 -0
  138. package/script/deps/deno.land/std@0.205.0/semver/is_semver_range.js +26 -0
  139. package/script/deps/deno.land/std@0.205.0/semver/lt.d.ts +3 -0
  140. package/script/deps/deno.land/std@0.205.0/semver/lt.js +9 -0
  141. package/script/deps/deno.land/std@0.205.0/semver/lte.d.ts +3 -0
  142. package/script/deps/deno.land/std@0.205.0/semver/lte.js +9 -0
  143. package/script/deps/deno.land/std@0.205.0/semver/ltr.d.ts +3 -0
  144. package/script/deps/deno.land/std@0.205.0/semver/ltr.js +9 -0
  145. package/script/deps/deno.land/std@0.205.0/semver/max_satisfying.d.ts +9 -0
  146. package/script/deps/deno.land/std@0.205.0/semver/max_satisfying.js +18 -0
  147. package/script/deps/deno.land/std@0.205.0/semver/min_satisfying.d.ts +9 -0
  148. package/script/deps/deno.land/std@0.205.0/semver/min_satisfying.js +18 -0
  149. package/script/deps/deno.land/{std@0.173.0 → std@0.205.0}/semver/mod.d.ts +88 -176
  150. package/script/deps/deno.land/std@0.205.0/semver/mod.js +330 -0
  151. package/script/deps/deno.land/std@0.205.0/semver/neq.d.ts +3 -0
  152. package/script/deps/deno.land/std@0.205.0/semver/neq.js +9 -0
  153. package/script/deps/deno.land/std@0.205.0/semver/outside.d.ts +11 -0
  154. package/script/deps/deno.land/std@0.205.0/semver/outside.js +71 -0
  155. package/script/deps/deno.land/std@0.205.0/semver/parse.d.ts +8 -0
  156. package/script/deps/deno.land/std@0.205.0/semver/parse.js +70 -0
  157. package/script/deps/deno.land/std@0.205.0/semver/parse_comparator.d.ts +7 -0
  158. package/script/deps/deno.land/std@0.205.0/semver/parse_comparator.js +32 -0
  159. package/script/deps/deno.land/std@0.205.0/semver/parse_range.d.ts +7 -0
  160. package/script/deps/deno.land/std@0.205.0/semver/parse_range.js +296 -0
  161. package/script/deps/deno.land/std@0.205.0/semver/range_format.d.ts +8 -0
  162. package/script/deps/deno.land/std@0.205.0/semver/range_format.js +15 -0
  163. package/script/deps/deno.land/std@0.205.0/semver/range_intersects.d.ts +8 -0
  164. package/script/deps/deno.land/std@0.205.0/semver/range_intersects.js +39 -0
  165. package/script/deps/deno.land/std@0.205.0/semver/range_max.d.ts +7 -0
  166. package/script/deps/deno.land/std@0.205.0/semver/range_max.js +19 -0
  167. package/script/deps/deno.land/std@0.205.0/semver/range_min.d.ts +7 -0
  168. package/script/deps/deno.land/std@0.205.0/semver/range_min.js +18 -0
  169. package/script/deps/deno.land/std@0.205.0/semver/rcompare.d.ts +8 -0
  170. package/script/deps/deno.land/std@0.205.0/semver/rcompare.js +14 -0
  171. package/script/deps/deno.land/std@0.205.0/semver/rsort.d.ts +3 -0
  172. package/script/deps/deno.land/std@0.205.0/semver/rsort.js +9 -0
  173. package/script/deps/deno.land/std@0.205.0/semver/sort.d.ts +3 -0
  174. package/script/deps/deno.land/std@0.205.0/semver/sort.js +9 -0
  175. package/script/deps/deno.land/std@0.205.0/semver/test_comparator.d.ts +8 -0
  176. package/script/deps/deno.land/std@0.205.0/semver/test_comparator.js +14 -0
  177. package/script/deps/deno.land/std@0.205.0/semver/test_range.d.ts +8 -0
  178. package/script/deps/deno.land/std@0.205.0/semver/test_range.js +20 -0
  179. package/script/deps/deno.land/std@0.205.0/semver/types.d.ts +44 -0
  180. package/script/deps/deno.land/std@0.205.0/semver/types.js +3 -0
  181. package/script/src/Changelog.d.ts +6 -2
  182. package/script/src/Changelog.js +41 -3
  183. package/script/src/Release.d.ts +5 -4
  184. package/script/src/Release.js +20 -21
  185. package/script/src/deps.d.ts +2 -1
  186. package/script/src/deps.js +5 -6
  187. package/script/src/settings.d.ts +17 -0
  188. package/script/src/settings.js +51 -0
  189. package/script/test/changelog.custom.type.md +2 -3
  190. package/script/test/changelog.expected.linted.md +3 -4
  191. package/script/test/changelog.expected.md +3 -4
  192. package/script/test/changelog.md +3 -4
  193. package/script/test/empty.expected.md +2 -2
  194. package/esm/_dnt.test_shims.d.ts +0 -5
  195. package/esm/deps/deno.land/std@0.133.0/fmt/colors.d.ts +0 -270
  196. package/esm/deps/deno.land/std@0.133.0/testing/_diff.d.ts +0 -23
  197. package/esm/deps/deno.land/std@0.133.0/testing/asserts.d.ts +0 -167
  198. package/esm/deps/deno.land/std@0.173.0/semver/mod.js +0 -1420
  199. package/esm/test/Change.test.d.ts +0 -1
  200. package/esm/test/deps.d.ts +0 -1
  201. package/esm/test/fixture/CustomRelease.d.ts +0 -8
  202. package/esm/test/parser.test.d.ts +0 -1
  203. package/esm/test/test.d.ts +0 -1
  204. package/script/_dnt.test_shims.d.ts +0 -5
  205. package/script/deps/deno.land/std@0.133.0/fmt/colors.d.ts +0 -270
  206. package/script/deps/deno.land/std@0.133.0/testing/_diff.d.ts +0 -23
  207. package/script/deps/deno.land/std@0.133.0/testing/asserts.d.ts +0 -167
  208. package/script/deps/deno.land/std@0.173.0/semver/mod.js +0 -1458
  209. package/script/test/Change.test.d.ts +0 -1
  210. package/script/test/deps.d.ts +0 -1
  211. package/script/test/fixture/CustomRelease.d.ts +0 -8
  212. package/script/test/parser.test.d.ts +0 -1
  213. package/script/test/test.d.ts +0 -1
@@ -10,6 +10,28 @@
10
10
  *
11
11
  * A leading `"="` or `"v"` character is stripped off and ignored.
12
12
  *
13
+ * ## Format
14
+ *
15
+ * Semantic versions can be formatted as strings, by default they
16
+ * are formatted as `full`. Below is a diagram showing the various
17
+ * formatting options.
18
+ *
19
+ * ```
20
+ * ┌───── full
21
+ * ┌───┴───┐
22
+ * ├───────── release
23
+ * ┌───┴───┐ │
24
+ * ├───────────── primary
25
+ * ┌─┴─┐ │ │
26
+ * 1.2.3-pre.1+b.1
27
+ * │ │ │ └─┬─┘ └┬┘
28
+ * │ │ │ │ └── build
29
+ * │ │ │ └─────── pre
30
+ * │ │ └─────────── patch
31
+ * │ └───────────── minor
32
+ * └─────────────── major
33
+ * ```
34
+ *
13
35
  * ## Ranges
14
36
  *
15
37
  * A `version range` is a set of `comparators` which specify versions that satisfy
@@ -76,10 +98,17 @@
76
98
  * will append the value of the string as a prerelease identifier:
77
99
  *
78
100
  * ```javascript
79
- * semver.increment("1.2.3", "prerelease", "beta");
101
+ * semver.increment(parse("1.2.3"), "prerelease", "beta");
80
102
  * // "1.2.4-beta.0"
81
103
  * ```
82
104
  *
105
+ * ### Build Metadata
106
+ *
107
+ * Build metadata is `.` delimited alpha-numeric string.
108
+ * When parsing a version it is retained on the `build: string[]` field
109
+ * of the semver instance. When incrementing there is an additional parameter that
110
+ * can set the build metadata on the semver instance.
111
+ *
83
112
  * ### Advanced Range Syntax
84
113
  *
85
114
  * Advanced range syntax desugars to primitive comparators in deterministic ways.
@@ -216,183 +245,66 @@
216
245
  *
217
246
  * @example
218
247
  * ```ts
219
- * import * as semver from "https://deno.land/std@$STD_VERSION/semver/mod.ts";
220
- *
221
- * semver.valid("1.2.3"); // "1.2.3"
222
- * semver.valid("a.b.c"); // null
223
- * semver.satisfies("1.2.3", "1.x || >=2.5.0 || 5.0.0 - 7.2.3"); // true
224
- * semver.gt("1.2.3", "9.8.7"); // false
225
- * semver.lt("1.2.3", "9.8.7"); // true
226
- * semver.minVersion(">=1.0.0"); // "1.0.0"
248
+ * import {
249
+ * parse,
250
+ * parseComparator,
251
+ * parseRange,
252
+ * gt,
253
+ * lt,
254
+ * format
255
+ * } from "https://deno.land/std@$STD_VERSION/semver/mod.ts";
256
+ *
257
+ * const semver = parse("1.2.3");
258
+ * const range = parseRange("1.x || >=2.5.0 || 5.0.0 - 7.2.3");
259
+ *
260
+ * const s0 = parse("1.2.3");
261
+ * const s1 = parse("9.8.7");
262
+ * gt(s0, s1); // false
263
+ * lt(s0, s1); // true
264
+ *
265
+ * format(semver) // "1.2.3"
227
266
  * ```
228
267
  *
229
268
  * @module
230
269
  */
231
- export type ReleaseType = "pre" | "major" | "premajor" | "minor" | "preminor" | "patch" | "prepatch" | "prerelease";
232
- export type Operator = "===" | "!==" | "" | "=" | "==" | "!=" | ">" | ">=" | "<" | "<=";
233
- export interface Options {
234
- /**
235
- * Set to suppress the default behavior of excluding prerelease tagged
236
- * versions from ranges unless they are explicitly opted into.
237
- */
238
- includePrerelease?: boolean;
239
- }
270
+ export * from "./cmp.js";
271
+ export * from "./comparator_format.js";
272
+ export * from "./comparator_intersects.js";
273
+ export * from "./comparator_max.js";
274
+ export * from "./comparator_min.js";
275
+ export * from "./compare_build.js";
276
+ export * from "./compare.js";
277
+ export * from "./constants.js";
278
+ export * from "./difference.js";
279
+ export * from "./eq.js";
280
+ export * from "./format.js";
281
+ export * from "./gt.js";
282
+ export * from "./gte.js";
283
+ export * from "./gtr.js";
284
+ export * from "./test_comparator.js";
285
+ export * from "./test_range.js";
286
+ export * from "./increment.js";
287
+ export * from "./is_semver_comparator.js";
288
+ export * from "./is_semver_range.js";
289
+ export * from "./is_semver.js";
290
+ export * from "./lt.js";
291
+ export * from "./lte.js";
292
+ export * from "./ltr.js";
293
+ export * from "./max_satisfying.js";
294
+ export * from "./min_satisfying.js";
295
+ export * from "./neq.js";
296
+ export * from "./outside.js";
297
+ export * from "./parse_comparator.js";
298
+ export * from "./parse_range.js";
299
+ export * from "./parse.js";
300
+ export * from "./range_format.js";
301
+ export * from "./range_intersects.js";
302
+ export * from "./range_max.js";
303
+ export * from "./range_min.js";
304
+ export * from "./rcompare.js";
305
+ export * from "./rsort.js";
306
+ export * from "./sort.js";
307
+ export * from "./types.js";
308
+ export * from "./lte.js";
309
+ export * from "./lte.js";
240
310
  export declare const SEMVER_SPEC_VERSION = "2.0.0";
241
- /**
242
- * Attempt to parse a string as a semantic version, returning either a `SemVer`
243
- * object or `null`.
244
- */
245
- export declare function parse(version: string | SemVer | null, options?: Options): SemVer | null;
246
- /** Returns the parsed version, or null if it's not valid. */
247
- export declare function valid(version: string | SemVer | null, options?: Options): string | null;
248
- export declare class SemVer {
249
- raw: string;
250
- options: Options;
251
- major: number;
252
- minor: number;
253
- patch: number;
254
- version: string;
255
- build: ReadonlyArray<string>;
256
- prerelease: Array<string | number>;
257
- constructor(version: string | SemVer, options?: Options);
258
- format(): string;
259
- compare(other: string | SemVer): 1 | 0 | -1;
260
- compareMain(other: string | SemVer): 1 | 0 | -1;
261
- comparePre(other: string | SemVer): 1 | 0 | -1;
262
- compareBuild(other: string | SemVer): 1 | 0 | -1;
263
- increment(release: ReleaseType, identifier?: string): SemVer;
264
- toString(): string;
265
- }
266
- /**
267
- * Returns the version incremented by the release type
268
- * (major, minor, patch, or prerelease), or null if it's not valid.
269
- *
270
- * `premajor` in one call will bump the version up to the next major version and
271
- * down to a prerelease of that major version. `preminor`, and `prepatch` work
272
- * the same way.
273
- *
274
- * If called from a non-prerelease version, the `prerelease` will work the same
275
- * as `prepatch`. It increments the patch version, then makes a prerelease. If
276
- * the input version is already a prerelease it simply increments it.
277
- */
278
- export declare function increment(version: string | SemVer, release: ReleaseType, options?: Options, identifier?: string): string | null;
279
- /**
280
- * Returns difference between two versions by the release type (`major`,
281
- * `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), or
282
- * null if the versions are the same.
283
- */
284
- export declare function difference(version1: string | SemVer, version2: string | SemVer, options?: Options): ReleaseType | null;
285
- export declare function compareIdentifiers(a: string | number | null, b: string | number | null): 1 | 0 | -1;
286
- export declare function rcompareIdentifiers(a: string | null, b: string | null): 1 | 0 | -1;
287
- /** Returns the major version number. */
288
- export declare function major(v: string | SemVer, options?: Options): number;
289
- /** Returns the minor version number. */
290
- export declare function minor(v: string | SemVer, options?: Options): number;
291
- /** Returns the patch version number. */
292
- export declare function patch(v: string | SemVer, options?: Options): number;
293
- /**
294
- * Returns `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if `v2` is
295
- * greater. Sorts in ascending order if passed to `Array.sort()`,
296
- */
297
- export declare function compare(v1: string | SemVer, v2: string | SemVer, options?: Options): 1 | 0 | -1;
298
- /**
299
- * The same as {@linkcode compare} but considers `build` when two versions are
300
- * equal. Sorts in ascending order if passed to `Array.sort()`.
301
- */
302
- export declare function compareBuild(a: string | SemVer, b: string | SemVer, options?: Options): 1 | 0 | -1;
303
- /**
304
- * Returns `0` if `v1 == v2`, or `-1` if `v1` is greater, or `1` if `v2` is
305
- * greater. Sorts in descending order if passed to `Array.sort()`,
306
- */
307
- export declare function rcompare(v1: string | SemVer, v2: string | SemVer, options?: Options): 1 | 0 | -1;
308
- export declare function sort<T extends string | SemVer>(list: T[], options?: Options): T[];
309
- export declare function rsort<T extends string | SemVer>(list: T[], options?: Options): T[];
310
- /** Greater than comparison */
311
- export declare function gt(v1: string | SemVer, v2: string | SemVer, options?: Options): boolean;
312
- /** Less than comparison */
313
- export declare function lt(v1: string | SemVer, v2: string | SemVer, options?: Options): boolean;
314
- /**
315
- * This is true if they're logically equivalent, even if they're not the exact
316
- * same string.
317
- */
318
- export declare function eq(v1: string | SemVer, v2: string | SemVer, options?: Options): boolean;
319
- /**
320
- * This is true if they're not logically equivalent, even if they're the exact
321
- * same string.
322
- */
323
- export declare function neq(v1: string | SemVer, v2: string | SemVer, options?: Options): boolean;
324
- /** Greater than or equal comparison */
325
- export declare function gte(v1: string | SemVer, v2: string | SemVer, options?: Options): boolean;
326
- /** Less than or equal comparison */
327
- export declare function lte(v1: string | SemVer, v2: string | SemVer, options?: Options): boolean;
328
- /**
329
- * Pass in a comparison string, and it'll call the corresponding comparison
330
- * function. `"==="` and `"!=="` do simple string comparison, but are included
331
- * for completeness. Throws if an invalid comparison string is provided.
332
- */
333
- export declare function cmp(v1: string | SemVer, operator: Operator, v2: string | SemVer, options?: Options): boolean;
334
- export declare class Comparator {
335
- semver: SemVer;
336
- operator: "" | "=" | "<" | ">" | "<=" | ">=";
337
- value: string;
338
- options: Options;
339
- constructor(comp: string | Comparator, options?: Options);
340
- parse(comp: string): void;
341
- test(version: string | SemVer): boolean;
342
- intersects(comp: Comparator, options?: Options): boolean;
343
- toString(): string;
344
- }
345
- export declare class Range {
346
- range: string;
347
- raw: string;
348
- options: Options;
349
- includePrerelease: boolean;
350
- set: ReadonlyArray<ReadonlyArray<Comparator>>;
351
- constructor(range: string | Range | Comparator, options?: Options);
352
- format(): string;
353
- parseRange(range: string): ReadonlyArray<Comparator>;
354
- test(version: string | SemVer): boolean;
355
- intersects(range?: Range, options?: Options): boolean;
356
- toString(): string;
357
- }
358
- export declare function toComparators(range: string | Range, options?: Options): string[][];
359
- /** Returns true if the version satisfies the range. */
360
- export declare function satisfies(version: string | SemVer, range: string | Range, options?: Options): boolean;
361
- /**
362
- * Returns the highest version in the list that satisfies the range, or `null`
363
- * if none of them do.
364
- */
365
- export declare function maxSatisfying<T extends string | SemVer>(versions: ReadonlyArray<T>, range: string | Range, options?: Options): T | null;
366
- /**
367
- * Returns the lowest version in the list that satisfies the range, or `null` if
368
- * none of them do.
369
- */
370
- export declare function minSatisfying<T extends string | SemVer>(versions: ReadonlyArray<T>, range: string | Range, options?: Options): T | null;
371
- /** Returns the lowest version that can possibly match the given range. */
372
- export declare function minVersion(range: string | Range, options?: Options): SemVer | null;
373
- /** Returns the valid range or null if it's not valid. */
374
- export declare function validRange(range: string | Range | null, options?: Options): string | null;
375
- /**
376
- * Returns true if version is less than all the versions possible in the range.
377
- */
378
- export declare function ltr(version: string | SemVer, range: string | Range, options?: Options): boolean;
379
- /**
380
- * Returns true if version is greater than all the versions possible in the range.
381
- */
382
- export declare function gtr(version: string | SemVer, range: string | Range, options?: Options): boolean;
383
- /**
384
- * Returns true if the version is outside the bounds of the range in either the
385
- * high or low direction. The hilo argument must be either the string '>' or
386
- * '<'. (This is the function called by {@linkcode gtr} and {@linkcode ltr}.)
387
- */
388
- export declare function outside(version: string | SemVer, range: string | Range, hilo: ">" | "<", options?: Options): boolean;
389
- /**
390
- * Returns an array of prerelease components, or null if none exist.
391
- *
392
- * @example
393
- * `prerelease("1.2.3-alpha.1") -> ["alpha", 1]`
394
- */
395
- export declare function prerelease(version: string | SemVer, options?: Options): ReadonlyArray<string | number> | null;
396
- /** Returns true if the two supplied ranges or comparators intersect. */
397
- export declare function intersects(range1: string | Range | Comparator, range2: string | Range | Comparator, options?: Options): boolean;
398
- export default SemVer;
@@ -0,0 +1,330 @@
1
+ "use strict";
2
+ // Copyright Isaac Z. Schlueter and Contributors. All rights reserved. ISC license.
3
+ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
4
+ // This module is browser compatible.
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.SEMVER_SPEC_VERSION = void 0;
21
+ /**
22
+ * The semantic version parser.
23
+ *
24
+ * Adapted directly from [semver](https://github.com/npm/node-semver).
25
+ *
26
+ * ## Versions
27
+ *
28
+ * A "version" is described by the `v2.0.0` specification found at
29
+ * <https://semver.org>.
30
+ *
31
+ * A leading `"="` or `"v"` character is stripped off and ignored.
32
+ *
33
+ * ## Format
34
+ *
35
+ * Semantic versions can be formatted as strings, by default they
36
+ * are formatted as `full`. Below is a diagram showing the various
37
+ * formatting options.
38
+ *
39
+ * ```
40
+ * ┌───── full
41
+ * ┌───┴───┐
42
+ * ├───────── release
43
+ * ┌───┴───┐ │
44
+ * ├───────────── primary
45
+ * ┌─┴─┐ │ │
46
+ * 1.2.3-pre.1+b.1
47
+ * │ │ │ └─┬─┘ └┬┘
48
+ * │ │ │ │ └── build
49
+ * │ │ │ └─────── pre
50
+ * │ │ └─────────── patch
51
+ * │ └───────────── minor
52
+ * └─────────────── major
53
+ * ```
54
+ *
55
+ * ## Ranges
56
+ *
57
+ * A `version range` is a set of `comparators` which specify versions that satisfy
58
+ * the range.
59
+ *
60
+ * A `comparator` is composed of an `operator` and a `version`. The set of
61
+ * primitive `operators` is:
62
+ *
63
+ * - `<` Less than
64
+ * - `<=` Less than or equal to
65
+ * - `>` Greater than
66
+ * - `>=` Greater than or equal to
67
+ * - `=` Equal. If no operator is specified, then equality is assumed, so this
68
+ * operator is optional, but MAY be included.
69
+ *
70
+ * For example, the comparator `>=1.2.7` would match the versions `1.2.7`, `1.2.8`,
71
+ * `2.5.3`, and `1.3.9`, but not the versions `1.2.6` or `1.1.0`.
72
+ *
73
+ * Comparators can be joined by whitespace to form a `comparator set`, which is
74
+ * satisfied by the **intersection** of all of the comparators it includes.
75
+ *
76
+ * A range is composed of one or more comparator sets, joined by `||`. A version
77
+ * matches a range if and only if every comparator in at least one of the
78
+ * `||`-separated comparator sets is satisfied by the version.
79
+ *
80
+ * For example, the range `>=1.2.7 <1.3.0` would match the versions `1.2.7`,
81
+ * `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, or `1.1.0`.
82
+ *
83
+ * The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, `1.2.9`,
84
+ * and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
85
+ *
86
+ * ### Prerelease Tags
87
+ *
88
+ * If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then it will
89
+ * only be allowed to satisfy comparator sets if at least one comparator with the
90
+ * same `[major, minor, patch]` tuple also has a prerelease tag.
91
+ *
92
+ * For example, the range `>1.2.3-alpha.3` would be allowed to match the version
93
+ * `1.2.3-alpha.7`, but it would _not_ be satisfied by `3.4.5-alpha.9`, even though
94
+ * `3.4.5-alpha.9` is technically "greater than" `1.2.3-alpha.3` according to the
95
+ * SemVer sort rules. The version range only accepts prerelease tags on the `1.2.3`
96
+ * version. The version `3.4.5` _would_ satisfy the range, because it does not have
97
+ * a prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
98
+ *
99
+ * The purpose for this behavior is twofold. First, prerelease versions frequently
100
+ * are updated very quickly, and contain many breaking changes that are (by the
101
+ * author"s design) not yet fit for public consumption. Therefore, by default, they
102
+ * are excluded from range matching semantics.
103
+ *
104
+ * Second, a user who has opted into using a prerelease version has clearly
105
+ * indicated the intent to use _that specific_ set of alpha/beta/rc versions. By
106
+ * including a prerelease tag in the range, the user is indicating that they are
107
+ * aware of the risk. However, it is still not appropriate to assume that they have
108
+ * opted into taking a similar risk on the _next_ set of prerelease versions.
109
+ *
110
+ * Note that this behavior can be suppressed (treating all prerelease versions as
111
+ * if they were normal versions, for the purpose of range matching) by setting the
112
+ * `includePrerelease` flag on the options object to any [functions](#functions)
113
+ * that do range matching.
114
+ *
115
+ * #### Prerelease Identifiers
116
+ *
117
+ * The method `.increment` takes an additional `identifier` string argument that
118
+ * will append the value of the string as a prerelease identifier:
119
+ *
120
+ * ```javascript
121
+ * semver.increment(parse("1.2.3"), "prerelease", "beta");
122
+ * // "1.2.4-beta.0"
123
+ * ```
124
+ *
125
+ * ### Build Metadata
126
+ *
127
+ * Build metadata is `.` delimited alpha-numeric string.
128
+ * When parsing a version it is retained on the `build: string[]` field
129
+ * of the semver instance. When incrementing there is an additional parameter that
130
+ * can set the build metadata on the semver instance.
131
+ *
132
+ * ### Advanced Range Syntax
133
+ *
134
+ * Advanced range syntax desugars to primitive comparators in deterministic ways.
135
+ *
136
+ * Advanced ranges may be combined in the same way as primitive comparators using
137
+ * white space or `||`.
138
+ *
139
+ * #### Hyphen Ranges `X.Y.Z - A.B.C`
140
+ *
141
+ * Specifies an inclusive set.
142
+ *
143
+ * - `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
144
+ *
145
+ * If a partial version is provided as the first version in the inclusive range,
146
+ * then the missing pieces are replaced with zeroes.
147
+ *
148
+ * - `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
149
+ *
150
+ * If a partial version is provided as the second version in the inclusive range,
151
+ * then all versions that start with the supplied parts of the tuple are accepted,
152
+ * but nothing that would be greater than the provided tuple parts.
153
+ *
154
+ * - `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
155
+ * - `1.2.3 - 2` := `>=1.2.3 <3.0.0`
156
+ *
157
+ * #### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
158
+ *
159
+ * Any of `X`, `x`, or `*` may be used to "stand in" for one of the numeric values
160
+ * in the `[major, minor, patch]` tuple.
161
+ *
162
+ * - `*` := `>=0.0.0` (Any version satisfies)
163
+ * - `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
164
+ * - `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
165
+ *
166
+ * A partial version range is treated as an X-Range, so the special character is in
167
+ * fact optional.
168
+ *
169
+ * - `""` (empty string) := `*` := `>=0.0.0`
170
+ * - `1` := `1.x.x` := `>=1.0.0 <2.0.0`
171
+ * - `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
172
+ *
173
+ * #### Tilde Ranges `~1.2.3` `~1.2` `~1`
174
+ *
175
+ * Allows patch-level changes if a minor version is specified on the comparator.
176
+ * Allows minor-level changes if not.
177
+ *
178
+ * - `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
179
+ * - `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
180
+ * - `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
181
+ * - `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
182
+ * - `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
183
+ * - `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
184
+ * - `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in the
185
+ * `1.2.3` version will be allowed, if they are greater than or equal to
186
+ * `beta.2`. So, `1.2.3-beta.4` would be allowed, but `1.2.4-beta.2` would not,
187
+ * because it is a prerelease of a different `[major, minor, patch]` tuple.
188
+ *
189
+ * #### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
190
+ *
191
+ * Allows changes that do not modify the left-most non-zero element in the
192
+ * `[major, minor, patch]` tuple. In other words, this allows patch and minor
193
+ * updates for versions `1.0.0` and above, patch updates for versions
194
+ * `0.X >=0.1.0`, and _no_ updates for versions `0.0.X`.
195
+ *
196
+ * Many authors treat a `0.x` version as if the `x` were the major
197
+ * "breaking-change" indicator.
198
+ *
199
+ * Caret ranges are ideal when an author may make breaking changes between `0.2.4`
200
+ * and `0.3.0` releases, which is a common practice. However, it presumes that
201
+ * there will _not_ be breaking changes between `0.2.4` and `0.2.5`. It allows for
202
+ * changes that are presumed to be additive (but non-breaking), according to
203
+ * commonly observed practices.
204
+ *
205
+ * - `^1.2.3` := `>=1.2.3 <2.0.0`
206
+ * - `^0.2.3` := `>=0.2.3 <0.3.0`
207
+ * - `^0.0.3` := `>=0.0.3 <0.0.4`
208
+ * - `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in the
209
+ * `1.2.3` version will be allowed, if they are greater than or equal to
210
+ * `beta.2`. So, `1.2.3-beta.4` would be allowed, but `1.2.4-beta.2` would not,
211
+ * because it is a prerelease of a different `[major, minor, patch]` tuple.
212
+ * - `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the `0.0.3`
213
+ * version _only_ will be allowed, if they are greater than or equal to `beta`.
214
+ * So, `0.0.3-pr.2` would be allowed.
215
+ *
216
+ * When parsing caret ranges, a missing `patch` value desugars to the number `0`,
217
+ * but will allow flexibility within that value, even if the major and minor
218
+ * versions are both `0`.
219
+ *
220
+ * - `^1.2.x` := `>=1.2.0 <2.0.0`
221
+ * - `^0.0.x` := `>=0.0.0 <0.1.0`
222
+ * - `^0.0` := `>=0.0.0 <0.1.0`
223
+ *
224
+ * A missing `minor` and `patch` values will desugar to zero, but also allow
225
+ * flexibility within those values, even if the major version is zero.
226
+ *
227
+ * - `^1.x` := `>=1.0.0 <2.0.0`
228
+ * - `^0.x` := `>=0.0.0 <1.0.0`
229
+ *
230
+ * ### Range Grammar
231
+ *
232
+ * Putting all this together, here is a Backus-Naur grammar for ranges, for the
233
+ * benefit of parser authors:
234
+ *
235
+ * ```bnf
236
+ * range-set ::= range ( logical-or range ) *
237
+ * logical-or ::= ( " " ) * "||" ( " " ) *
238
+ * range ::= hyphen | simple ( " " simple ) * | ""
239
+ * hyphen ::= partial " - " partial
240
+ * simple ::= primitive | partial | tilde | caret
241
+ * primitive ::= ( "<" | ">" | ">=" | "<=" | "=" ) partial
242
+ * partial ::= xr ( "." xr ( "." xr qualifier ? )? )?
243
+ * xr ::= "x" | "X" | "*" | nr
244
+ * nr ::= "0" | ["1"-"9"] ( ["0"-"9"] ) *
245
+ * tilde ::= "~" partial
246
+ * caret ::= "^" partial
247
+ * qualifier ::= ( "-" pre )? ( "+" build )?
248
+ * pre ::= parts
249
+ * build ::= parts
250
+ * parts ::= part ( "." part ) *
251
+ * part ::= nr | [-0-9A-Za-z]+
252
+ * ```
253
+ *
254
+ * Note that, since ranges may be non-contiguous, a version might not be greater
255
+ * than a range, less than a range, _or_ satisfy a range! For example, the range
256
+ * `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` until `2.0.0`, so the
257
+ * version `1.2.10` would not be greater than the range (because `2.0.1` satisfies,
258
+ * which is higher), nor less than the range (since `1.2.8` satisfies, which is
259
+ * lower), and it also does not satisfy the range.
260
+ *
261
+ * If you want to know if a version satisfies or does not satisfy a range, use the
262
+ * {@linkcode satisfies} function.
263
+ *
264
+ * This module is browser compatible.
265
+ *
266
+ * @example
267
+ * ```ts
268
+ * import {
269
+ * parse,
270
+ * parseComparator,
271
+ * parseRange,
272
+ * gt,
273
+ * lt,
274
+ * format
275
+ * } from "https://deno.land/std@$STD_VERSION/semver/mod.ts";
276
+ *
277
+ * const semver = parse("1.2.3");
278
+ * const range = parseRange("1.x || >=2.5.0 || 5.0.0 - 7.2.3");
279
+ *
280
+ * const s0 = parse("1.2.3");
281
+ * const s1 = parse("9.8.7");
282
+ * gt(s0, s1); // false
283
+ * lt(s0, s1); // true
284
+ *
285
+ * format(semver) // "1.2.3"
286
+ * ```
287
+ *
288
+ * @module
289
+ */
290
+ __exportStar(require("./cmp.js"), exports);
291
+ __exportStar(require("./comparator_format.js"), exports);
292
+ __exportStar(require("./comparator_intersects.js"), exports);
293
+ __exportStar(require("./comparator_max.js"), exports);
294
+ __exportStar(require("./comparator_min.js"), exports);
295
+ __exportStar(require("./compare_build.js"), exports);
296
+ __exportStar(require("./compare.js"), exports);
297
+ __exportStar(require("./constants.js"), exports);
298
+ __exportStar(require("./difference.js"), exports);
299
+ __exportStar(require("./eq.js"), exports);
300
+ __exportStar(require("./format.js"), exports);
301
+ __exportStar(require("./gt.js"), exports);
302
+ __exportStar(require("./gte.js"), exports);
303
+ __exportStar(require("./gtr.js"), exports);
304
+ __exportStar(require("./test_comparator.js"), exports);
305
+ __exportStar(require("./test_range.js"), exports);
306
+ __exportStar(require("./increment.js"), exports);
307
+ __exportStar(require("./is_semver_comparator.js"), exports);
308
+ __exportStar(require("./is_semver_range.js"), exports);
309
+ __exportStar(require("./is_semver.js"), exports);
310
+ __exportStar(require("./lt.js"), exports);
311
+ __exportStar(require("./lte.js"), exports);
312
+ __exportStar(require("./ltr.js"), exports);
313
+ __exportStar(require("./max_satisfying.js"), exports);
314
+ __exportStar(require("./min_satisfying.js"), exports);
315
+ __exportStar(require("./neq.js"), exports);
316
+ __exportStar(require("./outside.js"), exports);
317
+ __exportStar(require("./parse_comparator.js"), exports);
318
+ __exportStar(require("./parse_range.js"), exports);
319
+ __exportStar(require("./parse.js"), exports);
320
+ __exportStar(require("./range_format.js"), exports);
321
+ __exportStar(require("./range_intersects.js"), exports);
322
+ __exportStar(require("./range_max.js"), exports);
323
+ __exportStar(require("./range_min.js"), exports);
324
+ __exportStar(require("./rcompare.js"), exports);
325
+ __exportStar(require("./rsort.js"), exports);
326
+ __exportStar(require("./sort.js"), exports);
327
+ __exportStar(require("./types.js"), exports);
328
+ __exportStar(require("./lte.js"), exports);
329
+ __exportStar(require("./lte.js"), exports);
330
+ exports.SEMVER_SPEC_VERSION = "2.0.0";
@@ -0,0 +1,3 @@
1
+ import type { SemVer } from "./types.js";
2
+ /** Not equal comparison */
3
+ export declare function neq(s0: SemVer, s1: SemVer): boolean;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.neq = void 0;
4
+ const compare_js_1 = require("./compare.js");
5
+ /** Not equal comparison */
6
+ function neq(s0, s1) {
7
+ return (0, compare_js_1.compare)(s0, s1) !== 0;
8
+ }
9
+ exports.neq = neq;
@@ -0,0 +1,11 @@
1
+ import type { SemVer, SemVerRange } from "./types.js";
2
+ /**
3
+ * Returns true if the version is outside the bounds of the range in either the
4
+ * high or low direction. The hilo argument must be either the string '>' or
5
+ * '<'. (This is the function called by {@linkcode gtr} and {@linkcode ltr}.)
6
+ * @param version The version to compare to the range
7
+ * @param range The range of possible versions
8
+ * @param hilo The operator for the comparison or both if undefined.
9
+ * @returns True if the version is outside of the range based on the operator
10
+ */
11
+ export declare function outside(version: SemVer, range: SemVerRange, hilo?: ">" | "<"): boolean;