@hyperfrontend/versioning 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/ARCHITECTURE.md +593 -0
  2. package/CHANGELOG.md +35 -0
  3. package/FUNDING.md +141 -0
  4. package/LICENSE.md +21 -0
  5. package/README.md +195 -0
  6. package/SECURITY.md +82 -0
  7. package/changelog/compare/diff.d.ts +128 -0
  8. package/changelog/compare/diff.d.ts.map +1 -0
  9. package/changelog/compare/index.cjs.js +628 -0
  10. package/changelog/compare/index.cjs.js.map +1 -0
  11. package/changelog/compare/index.d.ts +4 -0
  12. package/changelog/compare/index.d.ts.map +1 -0
  13. package/changelog/compare/index.esm.js +612 -0
  14. package/changelog/compare/index.esm.js.map +1 -0
  15. package/changelog/compare/is-equal.d.ts +114 -0
  16. package/changelog/compare/is-equal.d.ts.map +1 -0
  17. package/changelog/index.cjs.js +6448 -0
  18. package/changelog/index.cjs.js.map +1 -0
  19. package/changelog/index.d.ts +6 -0
  20. package/changelog/index.d.ts.map +1 -0
  21. package/changelog/index.esm.js +6358 -0
  22. package/changelog/index.esm.js.map +1 -0
  23. package/changelog/models/changelog.d.ts +86 -0
  24. package/changelog/models/changelog.d.ts.map +1 -0
  25. package/changelog/models/commit-ref.d.ts +51 -0
  26. package/changelog/models/commit-ref.d.ts.map +1 -0
  27. package/changelog/models/entry.d.ts +84 -0
  28. package/changelog/models/entry.d.ts.map +1 -0
  29. package/changelog/models/index.cjs.js +2043 -0
  30. package/changelog/models/index.cjs.js.map +1 -0
  31. package/changelog/models/index.d.ts +11 -0
  32. package/changelog/models/index.d.ts.map +1 -0
  33. package/changelog/models/index.esm.js +2026 -0
  34. package/changelog/models/index.esm.js.map +1 -0
  35. package/changelog/models/schema.d.ts +68 -0
  36. package/changelog/models/schema.d.ts.map +1 -0
  37. package/changelog/models/section.d.ts +25 -0
  38. package/changelog/models/section.d.ts.map +1 -0
  39. package/changelog/operations/add-entry.d.ts +56 -0
  40. package/changelog/operations/add-entry.d.ts.map +1 -0
  41. package/changelog/operations/add-item.d.ts +18 -0
  42. package/changelog/operations/add-item.d.ts.map +1 -0
  43. package/changelog/operations/filter-by-predicate.d.ts +81 -0
  44. package/changelog/operations/filter-by-predicate.d.ts.map +1 -0
  45. package/changelog/operations/filter-by-range.d.ts +63 -0
  46. package/changelog/operations/filter-by-range.d.ts.map +1 -0
  47. package/changelog/operations/filter-entries.d.ts +9 -0
  48. package/changelog/operations/filter-entries.d.ts.map +1 -0
  49. package/changelog/operations/index.cjs.js +2455 -0
  50. package/changelog/operations/index.cjs.js.map +1 -0
  51. package/changelog/operations/index.d.ts +15 -0
  52. package/changelog/operations/index.d.ts.map +1 -0
  53. package/changelog/operations/index.esm.js +2411 -0
  54. package/changelog/operations/index.esm.js.map +1 -0
  55. package/changelog/operations/merge.d.ts +88 -0
  56. package/changelog/operations/merge.d.ts.map +1 -0
  57. package/changelog/operations/remove-entry.d.ts +45 -0
  58. package/changelog/operations/remove-entry.d.ts.map +1 -0
  59. package/changelog/operations/remove-section.d.ts +50 -0
  60. package/changelog/operations/remove-section.d.ts.map +1 -0
  61. package/changelog/operations/transform.d.ts +143 -0
  62. package/changelog/operations/transform.d.ts.map +1 -0
  63. package/changelog/parse/index.cjs.js +1282 -0
  64. package/changelog/parse/index.cjs.js.map +1 -0
  65. package/changelog/parse/index.d.ts +5 -0
  66. package/changelog/parse/index.d.ts.map +1 -0
  67. package/changelog/parse/index.esm.js +1275 -0
  68. package/changelog/parse/index.esm.js.map +1 -0
  69. package/changelog/parse/line.d.ts +48 -0
  70. package/changelog/parse/line.d.ts.map +1 -0
  71. package/changelog/parse/parser.d.ts +16 -0
  72. package/changelog/parse/parser.d.ts.map +1 -0
  73. package/changelog/parse/tokenizer.d.ts +49 -0
  74. package/changelog/parse/tokenizer.d.ts.map +1 -0
  75. package/changelog/serialize/index.cjs.js +574 -0
  76. package/changelog/serialize/index.cjs.js.map +1 -0
  77. package/changelog/serialize/index.d.ts +6 -0
  78. package/changelog/serialize/index.d.ts.map +1 -0
  79. package/changelog/serialize/index.esm.js +564 -0
  80. package/changelog/serialize/index.esm.js.map +1 -0
  81. package/changelog/serialize/templates.d.ts +81 -0
  82. package/changelog/serialize/templates.d.ts.map +1 -0
  83. package/changelog/serialize/to-json.d.ts +57 -0
  84. package/changelog/serialize/to-json.d.ts.map +1 -0
  85. package/changelog/serialize/to-string.d.ts +30 -0
  86. package/changelog/serialize/to-string.d.ts.map +1 -0
  87. package/commits/index.cjs.js +648 -0
  88. package/commits/index.cjs.js.map +1 -0
  89. package/commits/index.d.ts +3 -0
  90. package/commits/index.d.ts.map +1 -0
  91. package/commits/index.esm.js +629 -0
  92. package/commits/index.esm.js.map +1 -0
  93. package/commits/models/breaking.d.ts +39 -0
  94. package/commits/models/breaking.d.ts.map +1 -0
  95. package/commits/models/commit-type.d.ts +32 -0
  96. package/commits/models/commit-type.d.ts.map +1 -0
  97. package/commits/models/conventional.d.ts +49 -0
  98. package/commits/models/conventional.d.ts.map +1 -0
  99. package/commits/models/index.cjs.js +207 -0
  100. package/commits/models/index.cjs.js.map +1 -0
  101. package/commits/models/index.d.ts +7 -0
  102. package/commits/models/index.d.ts.map +1 -0
  103. package/commits/models/index.esm.js +193 -0
  104. package/commits/models/index.esm.js.map +1 -0
  105. package/commits/parse/body.d.ts +18 -0
  106. package/commits/parse/body.d.ts.map +1 -0
  107. package/commits/parse/footer.d.ts +16 -0
  108. package/commits/parse/footer.d.ts.map +1 -0
  109. package/commits/parse/header.d.ts +15 -0
  110. package/commits/parse/header.d.ts.map +1 -0
  111. package/commits/parse/index.cjs.js +505 -0
  112. package/commits/parse/index.cjs.js.map +1 -0
  113. package/commits/parse/index.d.ts +5 -0
  114. package/commits/parse/index.d.ts.map +1 -0
  115. package/commits/parse/index.esm.js +499 -0
  116. package/commits/parse/index.esm.js.map +1 -0
  117. package/commits/parse/message.d.ts +17 -0
  118. package/commits/parse/message.d.ts.map +1 -0
  119. package/commits/utils/replace-char.d.ts +19 -0
  120. package/commits/utils/replace-char.d.ts.map +1 -0
  121. package/flow/executor/execute.d.ts +72 -0
  122. package/flow/executor/execute.d.ts.map +1 -0
  123. package/flow/executor/index.cjs.js +4402 -0
  124. package/flow/executor/index.cjs.js.map +1 -0
  125. package/flow/executor/index.d.ts +3 -0
  126. package/flow/executor/index.d.ts.map +1 -0
  127. package/flow/executor/index.esm.js +4398 -0
  128. package/flow/executor/index.esm.js.map +1 -0
  129. package/flow/factory.d.ts +58 -0
  130. package/flow/factory.d.ts.map +1 -0
  131. package/flow/index.cjs.js +8506 -0
  132. package/flow/index.cjs.js.map +1 -0
  133. package/flow/index.d.ts +7 -0
  134. package/flow/index.d.ts.map +1 -0
  135. package/flow/index.esm.js +8451 -0
  136. package/flow/index.esm.js.map +1 -0
  137. package/flow/models/flow.d.ts +130 -0
  138. package/flow/models/flow.d.ts.map +1 -0
  139. package/flow/models/index.cjs.js +285 -0
  140. package/flow/models/index.cjs.js.map +1 -0
  141. package/flow/models/index.d.ts +7 -0
  142. package/flow/models/index.d.ts.map +1 -0
  143. package/flow/models/index.esm.js +268 -0
  144. package/flow/models/index.esm.js.map +1 -0
  145. package/flow/models/step.d.ts +108 -0
  146. package/flow/models/step.d.ts.map +1 -0
  147. package/flow/models/types.d.ts +150 -0
  148. package/flow/models/types.d.ts.map +1 -0
  149. package/flow/presets/conventional.d.ts +59 -0
  150. package/flow/presets/conventional.d.ts.map +1 -0
  151. package/flow/presets/independent.d.ts +61 -0
  152. package/flow/presets/independent.d.ts.map +1 -0
  153. package/flow/presets/index.cjs.js +3903 -0
  154. package/flow/presets/index.cjs.js.map +1 -0
  155. package/flow/presets/index.d.ts +4 -0
  156. package/flow/presets/index.d.ts.map +1 -0
  157. package/flow/presets/index.esm.js +3889 -0
  158. package/flow/presets/index.esm.js.map +1 -0
  159. package/flow/presets/synced.d.ts +65 -0
  160. package/flow/presets/synced.d.ts.map +1 -0
  161. package/flow/steps/analyze-commits.d.ts +19 -0
  162. package/flow/steps/analyze-commits.d.ts.map +1 -0
  163. package/flow/steps/calculate-bump.d.ts +27 -0
  164. package/flow/steps/calculate-bump.d.ts.map +1 -0
  165. package/flow/steps/create-commit.d.ts +16 -0
  166. package/flow/steps/create-commit.d.ts.map +1 -0
  167. package/flow/steps/create-tag.d.ts +22 -0
  168. package/flow/steps/create-tag.d.ts.map +1 -0
  169. package/flow/steps/fetch-registry.d.ts +19 -0
  170. package/flow/steps/fetch-registry.d.ts.map +1 -0
  171. package/flow/steps/generate-changelog.d.ts +25 -0
  172. package/flow/steps/generate-changelog.d.ts.map +1 -0
  173. package/flow/steps/index.cjs.js +3523 -0
  174. package/flow/steps/index.cjs.js.map +1 -0
  175. package/flow/steps/index.d.ts +8 -0
  176. package/flow/steps/index.d.ts.map +1 -0
  177. package/flow/steps/index.esm.js +3504 -0
  178. package/flow/steps/index.esm.js.map +1 -0
  179. package/flow/steps/update-packages.d.ts +25 -0
  180. package/flow/steps/update-packages.d.ts.map +1 -0
  181. package/flow/utils/interpolate.d.ts +11 -0
  182. package/flow/utils/interpolate.d.ts.map +1 -0
  183. package/git/factory.d.ts +233 -0
  184. package/git/factory.d.ts.map +1 -0
  185. package/git/index.cjs.js +2863 -0
  186. package/git/index.cjs.js.map +1 -0
  187. package/git/index.d.ts +5 -0
  188. package/git/index.d.ts.map +1 -0
  189. package/git/index.esm.js +2785 -0
  190. package/git/index.esm.js.map +1 -0
  191. package/git/models/commit.d.ts +129 -0
  192. package/git/models/commit.d.ts.map +1 -0
  193. package/git/models/index.cjs.js +755 -0
  194. package/git/models/index.cjs.js.map +1 -0
  195. package/git/models/index.d.ts +7 -0
  196. package/git/models/index.d.ts.map +1 -0
  197. package/git/models/index.esm.js +729 -0
  198. package/git/models/index.esm.js.map +1 -0
  199. package/git/models/ref.d.ts +120 -0
  200. package/git/models/ref.d.ts.map +1 -0
  201. package/git/models/tag.d.ts +141 -0
  202. package/git/models/tag.d.ts.map +1 -0
  203. package/git/operations/commit.d.ts +97 -0
  204. package/git/operations/commit.d.ts.map +1 -0
  205. package/git/operations/head-info.d.ts +29 -0
  206. package/git/operations/head-info.d.ts.map +1 -0
  207. package/git/operations/index.cjs.js +1954 -0
  208. package/git/operations/index.cjs.js.map +1 -0
  209. package/git/operations/index.d.ts +14 -0
  210. package/git/operations/index.d.ts.map +1 -0
  211. package/git/operations/index.esm.js +1903 -0
  212. package/git/operations/index.esm.js.map +1 -0
  213. package/git/operations/log.d.ts +104 -0
  214. package/git/operations/log.d.ts.map +1 -0
  215. package/git/operations/manage-tags.d.ts +60 -0
  216. package/git/operations/manage-tags.d.ts.map +1 -0
  217. package/git/operations/query-tags.d.ts +88 -0
  218. package/git/operations/query-tags.d.ts.map +1 -0
  219. package/git/operations/stage.d.ts +66 -0
  220. package/git/operations/stage.d.ts.map +1 -0
  221. package/git/operations/status.d.ts +173 -0
  222. package/git/operations/status.d.ts.map +1 -0
  223. package/index.cjs.js +16761 -0
  224. package/index.cjs.js.map +1 -0
  225. package/index.d.ts +102 -0
  226. package/index.d.ts.map +1 -0
  227. package/index.esm.js +16427 -0
  228. package/index.esm.js.map +1 -0
  229. package/package.json +200 -0
  230. package/registry/factory.d.ts +18 -0
  231. package/registry/factory.d.ts.map +1 -0
  232. package/registry/index.cjs.js +543 -0
  233. package/registry/index.cjs.js.map +1 -0
  234. package/registry/index.d.ts +5 -0
  235. package/registry/index.d.ts.map +1 -0
  236. package/registry/index.esm.js +535 -0
  237. package/registry/index.esm.js.map +1 -0
  238. package/registry/models/index.cjs.js +69 -0
  239. package/registry/models/index.cjs.js.map +1 -0
  240. package/registry/models/index.d.ts +6 -0
  241. package/registry/models/index.d.ts.map +1 -0
  242. package/registry/models/index.esm.js +66 -0
  243. package/registry/models/index.esm.js.map +1 -0
  244. package/registry/models/package-info.d.ts +55 -0
  245. package/registry/models/package-info.d.ts.map +1 -0
  246. package/registry/models/registry.d.ts +62 -0
  247. package/registry/models/registry.d.ts.map +1 -0
  248. package/registry/models/version-info.d.ts +67 -0
  249. package/registry/models/version-info.d.ts.map +1 -0
  250. package/registry/npm/cache.d.ts +50 -0
  251. package/registry/npm/cache.d.ts.map +1 -0
  252. package/registry/npm/client.d.ts +30 -0
  253. package/registry/npm/client.d.ts.map +1 -0
  254. package/registry/npm/index.cjs.js +456 -0
  255. package/registry/npm/index.cjs.js.map +1 -0
  256. package/registry/npm/index.d.ts +4 -0
  257. package/registry/npm/index.d.ts.map +1 -0
  258. package/registry/npm/index.esm.js +451 -0
  259. package/registry/npm/index.esm.js.map +1 -0
  260. package/semver/compare/compare.d.ts +100 -0
  261. package/semver/compare/compare.d.ts.map +1 -0
  262. package/semver/compare/index.cjs.js +386 -0
  263. package/semver/compare/index.cjs.js.map +1 -0
  264. package/semver/compare/index.d.ts +3 -0
  265. package/semver/compare/index.d.ts.map +1 -0
  266. package/semver/compare/index.esm.js +370 -0
  267. package/semver/compare/index.esm.js.map +1 -0
  268. package/semver/compare/sort.d.ts +36 -0
  269. package/semver/compare/sort.d.ts.map +1 -0
  270. package/semver/format/index.cjs.js +58 -0
  271. package/semver/format/index.cjs.js.map +1 -0
  272. package/semver/format/index.d.ts +2 -0
  273. package/semver/format/index.d.ts.map +1 -0
  274. package/semver/format/index.esm.js +53 -0
  275. package/semver/format/index.esm.js.map +1 -0
  276. package/semver/format/to-string.d.ts +31 -0
  277. package/semver/format/to-string.d.ts.map +1 -0
  278. package/semver/increment/bump.d.ts +37 -0
  279. package/semver/increment/bump.d.ts.map +1 -0
  280. package/semver/increment/index.cjs.js +223 -0
  281. package/semver/increment/index.cjs.js.map +1 -0
  282. package/semver/increment/index.d.ts +2 -0
  283. package/semver/increment/index.d.ts.map +1 -0
  284. package/semver/increment/index.esm.js +219 -0
  285. package/semver/increment/index.esm.js.map +1 -0
  286. package/semver/index.cjs.js +1499 -0
  287. package/semver/index.cjs.js.map +1 -0
  288. package/semver/index.d.ts +6 -0
  289. package/semver/index.d.ts.map +1 -0
  290. package/semver/index.esm.js +1458 -0
  291. package/semver/index.esm.js.map +1 -0
  292. package/semver/models/index.cjs.js +153 -0
  293. package/semver/models/index.cjs.js.map +1 -0
  294. package/semver/models/index.d.ts +5 -0
  295. package/semver/models/index.d.ts.map +1 -0
  296. package/semver/models/index.esm.js +139 -0
  297. package/semver/models/index.esm.js.map +1 -0
  298. package/semver/models/range.d.ts +83 -0
  299. package/semver/models/range.d.ts.map +1 -0
  300. package/semver/models/version.d.ts +78 -0
  301. package/semver/models/version.d.ts.map +1 -0
  302. package/semver/parse/index.cjs.js +799 -0
  303. package/semver/parse/index.cjs.js.map +1 -0
  304. package/semver/parse/index.d.ts +5 -0
  305. package/semver/parse/index.d.ts.map +1 -0
  306. package/semver/parse/index.esm.js +793 -0
  307. package/semver/parse/index.esm.js.map +1 -0
  308. package/semver/parse/range.d.ts +38 -0
  309. package/semver/parse/range.d.ts.map +1 -0
  310. package/semver/parse/version.d.ts +49 -0
  311. package/semver/parse/version.d.ts.map +1 -0
  312. package/workspace/discovery/changelog-path.d.ts +21 -0
  313. package/workspace/discovery/changelog-path.d.ts.map +1 -0
  314. package/workspace/discovery/dependencies.d.ts +145 -0
  315. package/workspace/discovery/dependencies.d.ts.map +1 -0
  316. package/workspace/discovery/discover-changelogs.d.ts +76 -0
  317. package/workspace/discovery/discover-changelogs.d.ts.map +1 -0
  318. package/workspace/discovery/index.cjs.js +2300 -0
  319. package/workspace/discovery/index.cjs.js.map +1 -0
  320. package/workspace/discovery/index.d.ts +13 -0
  321. package/workspace/discovery/index.d.ts.map +1 -0
  322. package/workspace/discovery/index.esm.js +2283 -0
  323. package/workspace/discovery/index.esm.js.map +1 -0
  324. package/workspace/discovery/packages.d.ts +83 -0
  325. package/workspace/discovery/packages.d.ts.map +1 -0
  326. package/workspace/index.cjs.js +4445 -0
  327. package/workspace/index.cjs.js.map +1 -0
  328. package/workspace/index.d.ts +52 -0
  329. package/workspace/index.d.ts.map +1 -0
  330. package/workspace/index.esm.js +4394 -0
  331. package/workspace/index.esm.js.map +1 -0
  332. package/workspace/models/index.cjs.js +284 -0
  333. package/workspace/models/index.cjs.js.map +1 -0
  334. package/workspace/models/index.d.ts +10 -0
  335. package/workspace/models/index.d.ts.map +1 -0
  336. package/workspace/models/index.esm.js +261 -0
  337. package/workspace/models/index.esm.js.map +1 -0
  338. package/workspace/models/project.d.ts +118 -0
  339. package/workspace/models/project.d.ts.map +1 -0
  340. package/workspace/models/workspace.d.ts +139 -0
  341. package/workspace/models/workspace.d.ts.map +1 -0
  342. package/workspace/operations/batch-update.d.ts +99 -0
  343. package/workspace/operations/batch-update.d.ts.map +1 -0
  344. package/workspace/operations/cascade-bump.d.ts +125 -0
  345. package/workspace/operations/cascade-bump.d.ts.map +1 -0
  346. package/workspace/operations/index.cjs.js +2675 -0
  347. package/workspace/operations/index.cjs.js.map +1 -0
  348. package/workspace/operations/index.d.ts +12 -0
  349. package/workspace/operations/index.d.ts.map +1 -0
  350. package/workspace/operations/index.esm.js +2663 -0
  351. package/workspace/operations/index.esm.js.map +1 -0
  352. package/workspace/operations/validate.d.ts +85 -0
  353. package/workspace/operations/validate.d.ts.map +1 -0
@@ -0,0 +1,1499 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Creates a new SemVer object.
5
+ *
6
+ * @param options - Version components
7
+ * @returns A new SemVer object
8
+ */
9
+ function createSemVer(options) {
10
+ return {
11
+ major: options.major,
12
+ minor: options.minor,
13
+ patch: options.patch,
14
+ prerelease: options.prerelease ?? [],
15
+ build: options.build ?? [],
16
+ raw: options.raw,
17
+ };
18
+ }
19
+ /**
20
+ * Creates a SemVer representing version 0.0.0.
21
+ *
22
+ * @returns A SemVer at version 0.0.0
23
+ */
24
+ function createInitialVersion() {
25
+ return createSemVer({ major: 0, minor: 0, patch: 0 });
26
+ }
27
+ /**
28
+ * Creates a SemVer representing version 1.0.0.
29
+ *
30
+ * @returns A SemVer at version 1.0.0
31
+ */
32
+ function createFirstRelease() {
33
+ return createSemVer({ major: 1, minor: 0, patch: 0 });
34
+ }
35
+ /**
36
+ * Checks if the version has prerelease identifiers.
37
+ *
38
+ * @param version - The version to check
39
+ * @returns True if version has prerelease identifiers
40
+ */
41
+ function isPrerelease(version) {
42
+ return version.prerelease.length > 0;
43
+ }
44
+ /**
45
+ * Checks if the version is a stable release (>= 1.0.0 with no prerelease).
46
+ *
47
+ * @param version - The version to check
48
+ * @returns True if version is stable
49
+ */
50
+ function isStable(version) {
51
+ return version.major >= 1 && version.prerelease.length === 0;
52
+ }
53
+ /**
54
+ * Returns a new version with build metadata stripped.
55
+ *
56
+ * @param version - The version to strip
57
+ * @returns A new SemVer without build metadata
58
+ */
59
+ function stripBuild(version) {
60
+ return createSemVer({
61
+ major: version.major,
62
+ minor: version.minor,
63
+ patch: version.patch,
64
+ prerelease: version.prerelease,
65
+ build: [],
66
+ });
67
+ }
68
+ /**
69
+ * Returns a new version with prerelease identifiers stripped.
70
+ *
71
+ * @param version - The version to strip
72
+ * @returns A new SemVer without prerelease identifiers
73
+ */
74
+ function stripPrerelease(version) {
75
+ return createSemVer({
76
+ major: version.major,
77
+ minor: version.minor,
78
+ patch: version.patch,
79
+ prerelease: [],
80
+ build: version.build,
81
+ });
82
+ }
83
+
84
+ /**
85
+ * Creates a new Comparator.
86
+ *
87
+ * @param operator - The comparison operator
88
+ * @param version - The version to compare against
89
+ * @returns A new Comparator
90
+ */
91
+ function createComparator(operator, version) {
92
+ return { operator, version };
93
+ }
94
+ /**
95
+ * Creates a new ComparatorSet.
96
+ *
97
+ * @param comparators - Array of comparators (AND logic)
98
+ * @returns A new ComparatorSet
99
+ */
100
+ function createComparatorSet(comparators) {
101
+ return { comparators };
102
+ }
103
+ /**
104
+ * Creates a new Range.
105
+ *
106
+ * @param sets - Array of comparator sets (OR logic)
107
+ * @param raw - Original raw string
108
+ * @returns A new Range
109
+ */
110
+ function createRange(sets, raw) {
111
+ return { sets, raw };
112
+ }
113
+ /**
114
+ * Creates a range that matches any version.
115
+ *
116
+ * @returns A Range matching any version (*)
117
+ */
118
+ function createAnyRange() {
119
+ return createRange([], '*');
120
+ }
121
+ /**
122
+ * Creates a range that matches exactly one version.
123
+ *
124
+ * @param version - The exact version to match
125
+ * @returns A Range matching exactly the specified version
126
+ */
127
+ function createExactRange(version) {
128
+ return createRange([createComparatorSet([createComparator('=', version)])]);
129
+ }
130
+ /**
131
+ * Checks if a range represents a wildcard/any match.
132
+ *
133
+ * @param range - The range to check
134
+ * @returns True if the range matches any version
135
+ */
136
+ function isWildcard(range) {
137
+ return range.sets.length === 0 || range.raw === '*' || range.raw === '';
138
+ }
139
+
140
+ /**
141
+ * Safe copies of Error built-ins via factory functions.
142
+ *
143
+ * Since constructors cannot be safely captured via Object.assign, this module
144
+ * provides factory functions that use Reflect.construct internally.
145
+ *
146
+ * These references are captured at module initialization time to protect against
147
+ * prototype pollution attacks. Import only what you need for tree-shaking.
148
+ *
149
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/error
150
+ */
151
+ // Capture references at module initialization time
152
+ const _Error = globalThis.Error;
153
+ const _Reflect = globalThis.Reflect;
154
+ /**
155
+ * (Safe copy) Creates a new Error using the captured Error constructor.
156
+ * Use this instead of `new Error()`.
157
+ *
158
+ * @param message - Optional error message.
159
+ * @param options - Optional error options.
160
+ * @returns A new Error instance.
161
+ */
162
+ const createError = (message, options) => _Reflect.construct(_Error, [message, options]);
163
+
164
+ /**
165
+ * Maximum version string length to prevent memory exhaustion.
166
+ */
167
+ const MAX_VERSION_LENGTH = 256;
168
+ /**
169
+ * Parses a semantic version string.
170
+ *
171
+ * Accepts versions in the format: MAJOR.MINOR.PATCH[-prerelease][+build]
172
+ * Optional leading 'v' or '=' prefixes are stripped.
173
+ *
174
+ * @param input - The version string to parse
175
+ * @returns A ParseVersionResult with the parsed version or error
176
+ *
177
+ * @example
178
+ * parseVersion('1.2.3') // { success: true, version: { major: 1, minor: 2, patch: 3, ... } }
179
+ * parseVersion('v1.0.0-alpha.1+build.123') // { success: true, ... }
180
+ * parseVersion('invalid') // { success: false, error: '...' }
181
+ */
182
+ function parseVersion(input) {
183
+ // Input validation
184
+ if (!input || typeof input !== 'string') {
185
+ return { success: false, error: 'Version string is required' };
186
+ }
187
+ if (input.length > MAX_VERSION_LENGTH) {
188
+ return { success: false, error: `Version string exceeds maximum length of ${MAX_VERSION_LENGTH}` };
189
+ }
190
+ // Strip leading whitespace
191
+ let pos = 0;
192
+ while (pos < input.length && isWhitespace(input.charCodeAt(pos))) {
193
+ pos++;
194
+ }
195
+ // Strip trailing whitespace
196
+ let end = input.length;
197
+ while (end > pos && isWhitespace(input.charCodeAt(end - 1))) {
198
+ end--;
199
+ }
200
+ // Strip optional leading 'v' or '='
201
+ if (pos < end) {
202
+ const code = input.charCodeAt(pos);
203
+ if (code === 118 || code === 86) {
204
+ // 'v' or 'V'
205
+ pos++;
206
+ }
207
+ else if (code === 61) {
208
+ // '='
209
+ pos++;
210
+ }
211
+ }
212
+ // Parse major version
213
+ const majorResult = parseNumericIdentifier(input, pos, end);
214
+ if (!majorResult.success) {
215
+ return { success: false, error: majorResult.error ?? 'Invalid major version' };
216
+ }
217
+ pos = majorResult.endPos;
218
+ // Expect dot
219
+ if (pos >= end || input.charCodeAt(pos) !== 46) {
220
+ // '.'
221
+ return { success: false, error: 'Expected "." after major version' };
222
+ }
223
+ pos++;
224
+ // Parse minor version
225
+ const minorResult = parseNumericIdentifier(input, pos, end);
226
+ if (!minorResult.success) {
227
+ return { success: false, error: minorResult.error ?? 'Invalid minor version' };
228
+ }
229
+ pos = minorResult.endPos;
230
+ // Expect dot
231
+ if (pos >= end || input.charCodeAt(pos) !== 46) {
232
+ // '.'
233
+ return { success: false, error: 'Expected "." after minor version' };
234
+ }
235
+ pos++;
236
+ // Parse patch version
237
+ const patchResult = parseNumericIdentifier(input, pos, end);
238
+ if (!patchResult.success) {
239
+ return { success: false, error: patchResult.error ?? 'Invalid patch version' };
240
+ }
241
+ pos = patchResult.endPos;
242
+ // Parse optional prerelease
243
+ const prerelease = [];
244
+ if (pos < end && input.charCodeAt(pos) === 45) {
245
+ // '-'
246
+ pos++;
247
+ const prereleaseResult = parseIdentifiers(input, pos, end, [43]); // Stop at '+'
248
+ if (!prereleaseResult.success) {
249
+ return { success: false, error: prereleaseResult.error ?? 'Invalid prerelease' };
250
+ }
251
+ prerelease.push(...prereleaseResult.identifiers);
252
+ pos = prereleaseResult.endPos;
253
+ }
254
+ // Parse optional build metadata
255
+ const build = [];
256
+ if (pos < end && input.charCodeAt(pos) === 43) {
257
+ // '+'
258
+ pos++;
259
+ const buildResult = parseIdentifiers(input, pos, end, []);
260
+ if (!buildResult.success) {
261
+ return { success: false, error: buildResult.error ?? 'Invalid build metadata' };
262
+ }
263
+ build.push(...buildResult.identifiers);
264
+ pos = buildResult.endPos;
265
+ }
266
+ // Check for trailing characters
267
+ if (pos < end) {
268
+ return { success: false, error: `Unexpected character at position ${pos}: "${input[pos]}"` };
269
+ }
270
+ return {
271
+ success: true,
272
+ version: createSemVer({
273
+ major: majorResult.value,
274
+ minor: minorResult.value,
275
+ patch: patchResult.value,
276
+ prerelease,
277
+ build,
278
+ raw: input,
279
+ }),
280
+ };
281
+ }
282
+ /**
283
+ * Parses a version string, throwing on invalid input.
284
+ *
285
+ * @param input - The version string to parse
286
+ * @returns The parsed SemVer
287
+ * @throws {Error} If the input is not a valid version
288
+ */
289
+ function parseVersionStrict(input) {
290
+ const result = parseVersion(input);
291
+ if (!result.success || !result.version) {
292
+ throw createError(result.error ?? 'Invalid version');
293
+ }
294
+ return result.version;
295
+ }
296
+ /**
297
+ * Attempts to coerce a string into a valid semver.
298
+ * More lenient than parseVersion - accepts partial versions.
299
+ *
300
+ * @param input - The string to coerce
301
+ * @returns The parsed SemVer or null if coercion failed
302
+ *
303
+ * @example
304
+ * coerceVersion('1') // { major: 1, minor: 0, patch: 0, ... }
305
+ * coerceVersion('1.2') // { major: 1, minor: 2, patch: 0, ... }
306
+ * coerceVersion('v2.0') // { major: 2, minor: 0, patch: 0, ... }
307
+ */
308
+ function coerceVersion(input) {
309
+ if (!input || typeof input !== 'string') {
310
+ return null;
311
+ }
312
+ // Try strict parse first
313
+ const strict = parseVersion(input);
314
+ if (strict.success && strict.version) {
315
+ return strict.version;
316
+ }
317
+ // Strip leading/trailing whitespace
318
+ let pos = 0;
319
+ while (pos < input.length && isWhitespace(input.charCodeAt(pos))) {
320
+ pos++;
321
+ }
322
+ let end = input.length;
323
+ while (end > pos && isWhitespace(input.charCodeAt(end - 1))) {
324
+ end--;
325
+ }
326
+ // Strip optional 'v' prefix
327
+ if (pos < end) {
328
+ const code = input.charCodeAt(pos);
329
+ if (code === 118 || code === 86) {
330
+ // 'v' or 'V'
331
+ pos++;
332
+ }
333
+ }
334
+ // Parse major
335
+ const majorResult = parseNumericIdentifier(input, pos, end);
336
+ if (!majorResult.success) {
337
+ return null;
338
+ }
339
+ const major = majorResult.value;
340
+ pos = majorResult.endPos;
341
+ // Parse optional minor
342
+ let minor = 0;
343
+ if (pos < end && input.charCodeAt(pos) === 46) {
344
+ pos++;
345
+ const minorResult = parseNumericIdentifier(input, pos, end);
346
+ if (minorResult.success) {
347
+ minor = minorResult.value;
348
+ pos = minorResult.endPos;
349
+ }
350
+ }
351
+ // Parse optional patch
352
+ let patch = 0;
353
+ if (pos < end && input.charCodeAt(pos) === 46) {
354
+ pos++;
355
+ const patchResult = parseNumericIdentifier(input, pos, end);
356
+ if (patchResult.success) {
357
+ patch = patchResult.value;
358
+ // pos = patchResult.endPos // We ignore anything after patch in coerce
359
+ }
360
+ }
361
+ return createSemVer({
362
+ major,
363
+ minor,
364
+ patch,
365
+ prerelease: [],
366
+ build: [],
367
+ raw: input,
368
+ });
369
+ }
370
+ /**
371
+ * Parses a numeric identifier (non-negative integer, no leading zeros except for "0").
372
+ *
373
+ * @param input - Input string to parse
374
+ * @param start - Start position in the input
375
+ * @param end - End position in the input
376
+ * @returns Numeric parsing result
377
+ */
378
+ function parseNumericIdentifier(input, start, end) {
379
+ if (start >= end) {
380
+ return { success: false, value: 0, endPos: start, error: 'Expected numeric identifier' };
381
+ }
382
+ let pos = start;
383
+ const firstCode = input.charCodeAt(pos);
384
+ // Must start with a digit
385
+ if (!isDigit(firstCode)) {
386
+ return { success: false, value: 0, endPos: pos, error: 'Expected digit' };
387
+ }
388
+ // Check for leading zero (only "0" is valid, not "01", "007", etc.)
389
+ if (firstCode === 48 && pos + 1 < end && isDigit(input.charCodeAt(pos + 1))) {
390
+ return { success: false, value: 0, endPos: pos, error: 'Numeric identifier cannot have leading zeros' };
391
+ }
392
+ // Consume digits
393
+ let value = 0;
394
+ while (pos < end && isDigit(input.charCodeAt(pos))) {
395
+ value = value * 10 + (input.charCodeAt(pos) - 48);
396
+ pos++;
397
+ // Prevent overflow
398
+ if (value > Number.MAX_SAFE_INTEGER) {
399
+ return { success: false, value: 0, endPos: pos, error: 'Numeric identifier is too large' };
400
+ }
401
+ }
402
+ return { success: true, value, endPos: pos };
403
+ }
404
+ /**
405
+ * Parses dot-separated identifiers (for prerelease/build).
406
+ *
407
+ * @param input - Input string to parse
408
+ * @param start - Start position in the input
409
+ * @param end - End position in the input
410
+ * @param stopCodes - Character codes that signal end of identifiers
411
+ * @returns Identifiers parsing result
412
+ */
413
+ function parseIdentifiers(input, start, end, stopCodes) {
414
+ const identifiers = [];
415
+ let pos = start;
416
+ while (pos < end) {
417
+ // Check for stop characters
418
+ if (stopCodes.includes(input.charCodeAt(pos))) {
419
+ break;
420
+ }
421
+ // Parse one identifier
422
+ const identStart = pos;
423
+ while (pos < end) {
424
+ const code = input.charCodeAt(pos);
425
+ // Stop at dot or stop characters
426
+ if (code === 46 || stopCodes.includes(code)) {
427
+ break;
428
+ }
429
+ // Must be alphanumeric or hyphen
430
+ if (!isAlphanumeric(code) && code !== 45) {
431
+ return { success: false, identifiers: [], endPos: pos, error: `Invalid character in identifier: "${input[pos]}"` };
432
+ }
433
+ pos++;
434
+ }
435
+ // Empty identifier is not allowed
436
+ if (pos === identStart) {
437
+ return { success: false, identifiers: [], endPos: pos, error: 'Empty identifier' };
438
+ }
439
+ identifiers.push(input.slice(identStart, pos));
440
+ // Consume dot separator
441
+ if (pos < end && input.charCodeAt(pos) === 46) {
442
+ pos++;
443
+ // Dot at end is invalid
444
+ if (pos >= end || stopCodes.includes(input.charCodeAt(pos))) {
445
+ return { success: false, identifiers: [], endPos: pos, error: 'Identifier expected after dot' };
446
+ }
447
+ }
448
+ }
449
+ return { success: true, identifiers, endPos: pos };
450
+ }
451
+ /**
452
+ * Checks if a character code is a digit (0-9).
453
+ *
454
+ * @param code - Character code to check
455
+ * @returns True if the code represents a digit
456
+ */
457
+ function isDigit(code) {
458
+ return code >= 48 && code <= 57;
459
+ }
460
+ /**
461
+ * Checks if a character code is alphanumeric or hyphen.
462
+ *
463
+ * @param code - Character code to check
464
+ * @returns True if the code represents an alphanumeric character
465
+ */
466
+ function isAlphanumeric(code) {
467
+ return ((code >= 48 && code <= 57) || // 0-9
468
+ (code >= 65 && code <= 90) || // A-Z
469
+ (code >= 97 && code <= 122) // a-z
470
+ );
471
+ }
472
+ /**
473
+ * Checks if a character code is whitespace.
474
+ *
475
+ * @param code - Character code to check
476
+ * @returns True if the code represents whitespace
477
+ */
478
+ function isWhitespace(code) {
479
+ return code === 32 || code === 9 || code === 10 || code === 13;
480
+ }
481
+
482
+ /**
483
+ * Safe copies of Number built-in methods and constants.
484
+ *
485
+ * These references are captured at module initialization time to protect against
486
+ * prototype pollution attacks. Import only what you need for tree-shaking.
487
+ *
488
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/number
489
+ */
490
+ // Capture references at module initialization time
491
+ const _parseInt = globalThis.parseInt;
492
+ const _isNaN = globalThis.isNaN;
493
+ // ============================================================================
494
+ // Parsing
495
+ // ============================================================================
496
+ /**
497
+ * (Safe copy) Parses a string and returns an integer.
498
+ */
499
+ const parseInt = _parseInt;
500
+ // ============================================================================
501
+ // Global Type Checking (legacy, less strict)
502
+ // ============================================================================
503
+ /**
504
+ * (Safe copy) Global isNaN function (coerces to number first, less strict than Number.isNaN).
505
+ */
506
+ const globalIsNaN = _isNaN;
507
+
508
+ /**
509
+ * Maximum range string length.
510
+ */
511
+ const MAX_RANGE_LENGTH = 1024;
512
+ /**
513
+ * Parses a semver range string.
514
+ *
515
+ * Supports:
516
+ * - Exact: 1.2.3, =1.2.3
517
+ * - Comparators: >1.0.0, >=1.0.0, <2.0.0, <=2.0.0
518
+ * - Caret: ^1.2.3 (compatible with version)
519
+ * - Tilde: ~1.2.3 (approximately equivalent)
520
+ * - X-ranges: 1.x, 1.2.x, *
521
+ * - Hyphen ranges: 1.0.0 - 2.0.0
522
+ * - OR: 1.0.0 || 2.0.0
523
+ * - AND: >=1.0.0 <2.0.0
524
+ *
525
+ * @param input - The range string to parse
526
+ * @returns A ParseRangeResult with the parsed range or error
527
+ */
528
+ function parseRange(input) {
529
+ if (!input || typeof input !== 'string') {
530
+ return { success: false, error: 'Range string is required' };
531
+ }
532
+ if (input.length > MAX_RANGE_LENGTH) {
533
+ return { success: false, error: `Range string exceeds maximum length of ${MAX_RANGE_LENGTH}` };
534
+ }
535
+ // Trim whitespace
536
+ const trimmed = input.trim();
537
+ // Handle wildcard/any
538
+ if (trimmed === '' || trimmed === '*' || trimmed.toLowerCase() === 'x') {
539
+ return { success: true, range: createRange([], input) };
540
+ }
541
+ // Split by || for OR logic
542
+ const orParts = splitByOr(trimmed);
543
+ const sets = [];
544
+ for (const part of orParts) {
545
+ const setResult = parseComparatorSet(part.trim());
546
+ if (!setResult.success) {
547
+ return { success: false, error: setResult.error };
548
+ }
549
+ if (setResult.set) {
550
+ sets.push(setResult.set);
551
+ }
552
+ }
553
+ return { success: true, range: createRange(sets, input) };
554
+ }
555
+ /**
556
+ * Parses a range string, throwing on invalid input.
557
+ *
558
+ * @param input - The range string to parse
559
+ * @returns The parsed Range
560
+ * @throws {Error} If the input is not a valid range
561
+ */
562
+ function parseRangeStrict(input) {
563
+ const result = parseRange(input);
564
+ if (!result.success || !result.range) {
565
+ throw createError(result.error ?? 'Invalid range');
566
+ }
567
+ return result.range;
568
+ }
569
+ /**
570
+ * Splits a string by || delimiter, respecting nesting.
571
+ *
572
+ * @param input - Range string containing OR groups
573
+ * @returns Array of OR-separated parts
574
+ */
575
+ function splitByOr(input) {
576
+ const parts = [];
577
+ let current = '';
578
+ let pos = 0;
579
+ while (pos < input.length) {
580
+ if (input[pos] === '|' && pos + 1 < input.length && input[pos + 1] === '|') {
581
+ parts.push(current);
582
+ current = '';
583
+ pos += 2;
584
+ }
585
+ else {
586
+ current += input[pos];
587
+ pos++;
588
+ }
589
+ }
590
+ parts.push(current);
591
+ return parts;
592
+ }
593
+ /**
594
+ * Parses a single comparator set (space-separated comparators = AND logic).
595
+ *
596
+ * @param input - Comparator set string
597
+ * @returns Parsed set result
598
+ */
599
+ function parseComparatorSet(input) {
600
+ if (!input || input.trim() === '') {
601
+ return { success: true }; // Empty set matches any
602
+ }
603
+ const trimmed = input.trim();
604
+ // Check for hyphen range: "1.0.0 - 2.0.0"
605
+ const hyphenMatch = parseHyphenRange(trimmed);
606
+ if (hyphenMatch.isHyphenRange) {
607
+ if (!hyphenMatch.success) {
608
+ return { success: false, error: hyphenMatch.error };
609
+ }
610
+ return { success: true, set: hyphenMatch.set };
611
+ }
612
+ // Split by whitespace for AND logic
613
+ const tokens = splitByWhitespace(trimmed);
614
+ const comparators = [];
615
+ for (const token of tokens) {
616
+ const compResult = parseSingleComparator(token);
617
+ if (!compResult.success) {
618
+ return { success: false, error: compResult.error };
619
+ }
620
+ if (compResult.comparators) {
621
+ comparators.push(...compResult.comparators);
622
+ }
623
+ }
624
+ if (comparators.length === 0) {
625
+ return { success: true }; // Empty matches any
626
+ }
627
+ return { success: true, set: createComparatorSet(comparators) };
628
+ }
629
+ /**
630
+ * Checks for and parses hyphen ranges like "1.0.0 - 2.0.0".
631
+ *
632
+ * @param input - Potential hyphen range string
633
+ * @returns Hyphen range parsing result
634
+ */
635
+ function parseHyphenRange(input) {
636
+ // Look for " - " (space-hyphen-space)
637
+ let hyphenPos = -1;
638
+ for (let i = 0; i < input.length - 2; i++) {
639
+ if (input[i] === ' ' && input[i + 1] === '-' && input[i + 2] === ' ') {
640
+ hyphenPos = i;
641
+ break;
642
+ }
643
+ }
644
+ if (hyphenPos === -1) {
645
+ return { isHyphenRange: false, success: true };
646
+ }
647
+ const leftPart = input.slice(0, hyphenPos).trim();
648
+ const rightPart = input.slice(hyphenPos + 3).trim();
649
+ const leftVersion = parseSimpleVersion(leftPart);
650
+ if (!leftVersion) {
651
+ return { isHyphenRange: true, success: false, error: `Invalid left side of hyphen range: "${leftPart}"` };
652
+ }
653
+ const rightVersion = parseSimpleVersion(rightPart);
654
+ if (!rightVersion) {
655
+ return { isHyphenRange: true, success: false, error: `Invalid right side of hyphen range: "${rightPart}"` };
656
+ }
657
+ // Hyphen range: >=left <=right
658
+ const comparators = [createComparator('>=', leftVersion), createComparator('<=', rightVersion)];
659
+ return {
660
+ isHyphenRange: true,
661
+ success: true,
662
+ set: createComparatorSet(comparators),
663
+ };
664
+ }
665
+ /**
666
+ * Splits by whitespace.
667
+ *
668
+ * @param input - String to split
669
+ * @returns Array of whitespace-separated tokens
670
+ */
671
+ function splitByWhitespace(input) {
672
+ const tokens = [];
673
+ let current = '';
674
+ for (const char of input) {
675
+ if (char === ' ' || char === '\t') {
676
+ if (current) {
677
+ tokens.push(current);
678
+ current = '';
679
+ }
680
+ }
681
+ else {
682
+ current += char;
683
+ }
684
+ }
685
+ if (current) {
686
+ tokens.push(current);
687
+ }
688
+ return tokens;
689
+ }
690
+ /**
691
+ * Parses a single comparator token (e.g., ">=1.0.0", "^1.2.3", "~1.0").
692
+ *
693
+ * @param token - Comparator token to parse
694
+ * @returns Parsed comparator result
695
+ */
696
+ function parseSingleComparator(token) {
697
+ let pos = 0;
698
+ let operator = '=';
699
+ // Parse operator
700
+ if (token[pos] === '^') {
701
+ operator = '^';
702
+ pos++;
703
+ }
704
+ else if (token[pos] === '~') {
705
+ operator = '~';
706
+ pos++;
707
+ }
708
+ else if (token[pos] === '>') {
709
+ if (token[pos + 1] === '=') {
710
+ operator = '>=';
711
+ pos += 2;
712
+ }
713
+ else {
714
+ operator = '>';
715
+ pos++;
716
+ }
717
+ }
718
+ else if (token[pos] === '<') {
719
+ if (token[pos + 1] === '=') {
720
+ operator = '<=';
721
+ pos += 2;
722
+ }
723
+ else {
724
+ operator = '<';
725
+ pos++;
726
+ }
727
+ }
728
+ else if (token[pos] === '=') {
729
+ operator = '=';
730
+ pos++;
731
+ }
732
+ const versionPart = token.slice(pos);
733
+ // Handle wildcards: *, x, X
734
+ if (versionPart === '*' || versionPart.toLowerCase() === 'x') {
735
+ // Wildcard matches any - return empty (will be handled as match-all)
736
+ return { success: true, comparators: [] };
737
+ }
738
+ // Handle x-ranges: 1.x, 1.2.x
739
+ if (versionPart.includes('x') || versionPart.includes('X') || versionPart.includes('*')) {
740
+ return parseXRange(versionPart);
741
+ }
742
+ // Parse version
743
+ const version = parseSimpleVersion(versionPart);
744
+ if (!version) {
745
+ return { success: false, error: `Invalid version in comparator: "${versionPart}"` };
746
+ }
747
+ // For caret and tilde, expand to range
748
+ if (operator === '^') {
749
+ return expandCaretRange(version);
750
+ }
751
+ if (operator === '~') {
752
+ return expandTildeRange(version);
753
+ }
754
+ return { success: true, comparators: [createComparator(operator, version)] };
755
+ }
756
+ /**
757
+ * Parses x-ranges like 1.x, 1.2.x, etc.
758
+ *
759
+ * @param input - X-range string to parse
760
+ * @param _operator - Range operator (unused but kept for interface consistency)
761
+ * @returns Comparator result
762
+ */
763
+ function parseXRange(input, _operator) {
764
+ const parts = input.split('.');
765
+ const nums = [];
766
+ for (const part of parts) {
767
+ const lower = part.toLowerCase();
768
+ if (lower === 'x' || lower === '*' || lower === '') {
769
+ break;
770
+ }
771
+ const num = parseInt(part, 10);
772
+ if (globalIsNaN(num) || num < 0) {
773
+ return { success: false, error: `Invalid x-range: "${input}"` };
774
+ }
775
+ nums.push(num);
776
+ }
777
+ if (nums.length === 0) {
778
+ // * or X alone - match any
779
+ return { success: true, comparators: [] };
780
+ }
781
+ if (nums.length === 1) {
782
+ // 1.x or 1.* -> >=1.0.0 <2.0.0
783
+ const lower = createSemVer({ major: nums[0], minor: 0, patch: 0 });
784
+ const upper = createSemVer({ major: nums[0] + 1, minor: 0, patch: 0 });
785
+ return { success: true, comparators: [createComparator('>=', lower), createComparator('<', upper)] };
786
+ }
787
+ // 1.2.x -> >=1.2.0 <1.3.0
788
+ const lower = createSemVer({ major: nums[0], minor: nums[1], patch: 0 });
789
+ const upper = createSemVer({ major: nums[0], minor: nums[1] + 1, patch: 0 });
790
+ return { success: true, comparators: [createComparator('>=', lower), createComparator('<', upper)] };
791
+ }
792
+ /**
793
+ * Expands caret range: ^1.2.3 -> >=1.2.3 <2.0.0
794
+ *
795
+ * @param version - Base version for caret range
796
+ * @returns Expanded comparator result
797
+ */
798
+ function expandCaretRange(version) {
799
+ let upperMajor = version.major;
800
+ let upperMinor = 0;
801
+ let upperPatch = 0;
802
+ if (version.major === 0) {
803
+ if (version.minor === 0) {
804
+ // ^0.0.x -> >=0.0.x <0.0.(x+1)
805
+ upperPatch = version.patch + 1;
806
+ upperMinor = version.minor;
807
+ }
808
+ else {
809
+ // ^0.x.y -> >=0.x.y <0.(x+1).0
810
+ upperMinor = version.minor + 1;
811
+ }
812
+ }
813
+ else {
814
+ // ^x.y.z -> >=x.y.z <(x+1).0.0
815
+ upperMajor = version.major + 1;
816
+ }
817
+ const upper = createSemVer({ major: upperMajor, minor: upperMinor, patch: upperPatch });
818
+ return { success: true, comparators: [createComparator('>=', version), createComparator('<', upper)] };
819
+ }
820
+ /**
821
+ * Expands tilde range: ~1.2.3 -> >=1.2.3 <1.3.0
822
+ *
823
+ * @param version - Base version for tilde range
824
+ * @returns Expanded comparator result
825
+ */
826
+ function expandTildeRange(version) {
827
+ const upper = createSemVer({
828
+ major: version.major,
829
+ minor: version.minor + 1,
830
+ patch: 0,
831
+ });
832
+ return { success: true, comparators: [createComparator('>=', version), createComparator('<', upper)] };
833
+ }
834
+ /**
835
+ * Parses a simple version string (no range operators).
836
+ * More lenient - accepts partial versions.
837
+ *
838
+ * @param input - Version string to parse
839
+ * @returns Parsed SemVer or null if invalid
840
+ */
841
+ function parseSimpleVersion(input) {
842
+ if (!input)
843
+ return null;
844
+ let pos = 0;
845
+ // Skip leading v
846
+ if (input[pos] === 'v' || input[pos] === 'V') {
847
+ pos++;
848
+ }
849
+ const parts = input.slice(pos).split('.');
850
+ if (parts.length === 0)
851
+ return null;
852
+ const nums = [];
853
+ for (const part of parts) {
854
+ // Stop at prerelease or build
855
+ const dashIdx = part.indexOf('-');
856
+ const plusIdx = part.indexOf('+');
857
+ let numPart = part;
858
+ if (dashIdx !== -1) {
859
+ numPart = part.slice(0, dashIdx);
860
+ }
861
+ else if (plusIdx !== -1) {
862
+ numPart = part.slice(0, plusIdx);
863
+ }
864
+ if (numPart === '' || numPart.toLowerCase() === 'x' || numPart === '*') {
865
+ break;
866
+ }
867
+ const num = parseInt(numPart, 10);
868
+ if (globalIsNaN(num) || num < 0)
869
+ return null;
870
+ nums.push(num);
871
+ }
872
+ if (nums.length === 0)
873
+ return null;
874
+ return createSemVer({
875
+ major: nums[0],
876
+ minor: nums[1] ?? 0,
877
+ patch: nums[2] ?? 0,
878
+ prerelease: [],
879
+ build: [],
880
+ raw: input,
881
+ });
882
+ }
883
+
884
+ /**
885
+ * Safe copies of Math built-in methods.
886
+ *
887
+ * These references are captured at module initialization time to protect against
888
+ * prototype pollution attacks. Import only what you need for tree-shaking.
889
+ *
890
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/math
891
+ */
892
+ // Capture references at module initialization time
893
+ const _Math = globalThis.Math;
894
+ // ============================================================================
895
+ // Min/Max
896
+ // ============================================================================
897
+ /**
898
+ * (Safe copy) Returns the larger of zero or more numbers.
899
+ */
900
+ const max$1 = _Math.max;
901
+
902
+ /**
903
+ * Compares two semantic versions.
904
+ *
905
+ * @param a - First version
906
+ * @param b - Second version
907
+ * @returns -1 if a < b, 0 if a == b, 1 if a > b
908
+ *
909
+ * @example
910
+ * compare(parseVersion('1.0.0'), parseVersion('2.0.0')) // -1
911
+ * compare(parseVersion('1.0.0'), parseVersion('1.0.0')) // 0
912
+ * compare(parseVersion('2.0.0'), parseVersion('1.0.0')) // 1
913
+ */
914
+ function compare(a, b) {
915
+ // Compare major, minor, patch
916
+ if (a.major !== b.major) {
917
+ return a.major < b.major ? -1 : 1;
918
+ }
919
+ if (a.minor !== b.minor) {
920
+ return a.minor < b.minor ? -1 : 1;
921
+ }
922
+ if (a.patch !== b.patch) {
923
+ return a.patch < b.patch ? -1 : 1;
924
+ }
925
+ // Compare prerelease
926
+ // Version with prerelease has lower precedence than release
927
+ if (a.prerelease.length === 0 && b.prerelease.length > 0) {
928
+ return 1; // a is release, b is prerelease -> a > b
929
+ }
930
+ if (a.prerelease.length > 0 && b.prerelease.length === 0) {
931
+ return -1; // a is prerelease, b is release -> a < b
932
+ }
933
+ // Both have prerelease - compare identifiers
934
+ const maxLen = max$1(a.prerelease.length, b.prerelease.length);
935
+ for (let i = 0; i < maxLen; i++) {
936
+ const aId = a.prerelease[i];
937
+ const bId = b.prerelease[i];
938
+ // Shorter prerelease array has lower precedence
939
+ if (aId === undefined && bId !== undefined) {
940
+ return -1;
941
+ }
942
+ if (aId !== undefined && bId === undefined) {
943
+ return 1;
944
+ }
945
+ if (aId === undefined || bId === undefined) {
946
+ continue;
947
+ }
948
+ // Compare identifiers
949
+ const cmp = compareIdentifiers(aId, bId);
950
+ if (cmp !== 0) {
951
+ return cmp;
952
+ }
953
+ }
954
+ return 0;
955
+ }
956
+ /**
957
+ * Checks if two versions are equal (ignoring build metadata).
958
+ *
959
+ * @param a - First version
960
+ * @param b - Second version
961
+ * @returns True if versions are equal
962
+ */
963
+ function eq(a, b) {
964
+ return compare(a, b) === 0;
965
+ }
966
+ /**
967
+ * Checks if a < b.
968
+ *
969
+ * @param a - First version to compare
970
+ * @param b - Second version to compare
971
+ * @returns True if a is less than b
972
+ */
973
+ function lt(a, b) {
974
+ return compare(a, b) === -1;
975
+ }
976
+ /**
977
+ * Checks if a <= b.
978
+ *
979
+ * @param a - First version to compare
980
+ * @param b - Second version to compare
981
+ * @returns True if a is less than or equal to b
982
+ */
983
+ function lte(a, b) {
984
+ return compare(a, b) !== 1;
985
+ }
986
+ /**
987
+ * Checks if a > b.
988
+ *
989
+ * @param a - First version to compare
990
+ * @param b - Second version to compare
991
+ * @returns True if a is greater than b
992
+ */
993
+ function gt(a, b) {
994
+ return compare(a, b) === 1;
995
+ }
996
+ /**
997
+ * Checks if a >= b.
998
+ *
999
+ * @param a - First version to compare
1000
+ * @param b - Second version to compare
1001
+ * @returns True if a is greater than or equal to b
1002
+ */
1003
+ function gte(a, b) {
1004
+ return compare(a, b) !== -1;
1005
+ }
1006
+ /**
1007
+ * Checks if a != b.
1008
+ *
1009
+ * @param a - First version to compare
1010
+ * @param b - Second version to compare
1011
+ * @returns True if versions are not equal
1012
+ */
1013
+ function neq(a, b) {
1014
+ return compare(a, b) !== 0;
1015
+ }
1016
+ /**
1017
+ * Checks if a version satisfies a comparator.
1018
+ *
1019
+ * @param version - Version to check
1020
+ * @param comparator - Comparator to test against
1021
+ * @returns True if version satisfies the comparator
1022
+ */
1023
+ function satisfiesComparator(version, comparator) {
1024
+ const cmp = compare(version, comparator.version);
1025
+ switch (comparator.operator) {
1026
+ case '=':
1027
+ return cmp === 0;
1028
+ case '>':
1029
+ return cmp === 1;
1030
+ case '>=':
1031
+ return cmp >= 0;
1032
+ case '<':
1033
+ return cmp === -1;
1034
+ case '<=':
1035
+ return cmp <= 0;
1036
+ case '^':
1037
+ case '~':
1038
+ // These should have been expanded during parsing
1039
+ // If we encounter them here, treat as >=
1040
+ return cmp >= 0;
1041
+ default:
1042
+ return false;
1043
+ }
1044
+ }
1045
+ /**
1046
+ * Checks if a version satisfies a range.
1047
+ *
1048
+ * @param version - Version to check
1049
+ * @param range - Range to test against
1050
+ * @returns True if version satisfies the range
1051
+ *
1052
+ * @example
1053
+ * satisfies(parseVersion('1.2.3'), parseRange('^1.0.0')) // true
1054
+ * satisfies(parseVersion('2.0.0'), parseRange('^1.0.0')) // false
1055
+ */
1056
+ function satisfies(version, range) {
1057
+ // Empty range matches any
1058
+ if (range.sets.length === 0) {
1059
+ return true;
1060
+ }
1061
+ // OR logic: at least one set must be satisfied
1062
+ for (const set of range.sets) {
1063
+ // AND logic: all comparators in set must be satisfied
1064
+ let allSatisfied = true;
1065
+ // Empty comparator set matches any
1066
+ if (set.comparators.length === 0) {
1067
+ return true;
1068
+ }
1069
+ for (const comp of set.comparators) {
1070
+ if (!satisfiesComparator(version, comp)) {
1071
+ allSatisfied = false;
1072
+ break;
1073
+ }
1074
+ }
1075
+ if (allSatisfied) {
1076
+ return true;
1077
+ }
1078
+ }
1079
+ return false;
1080
+ }
1081
+ /**
1082
+ * Finds the maximum version that satisfies a range.
1083
+ *
1084
+ * @param versions - Array of versions to check
1085
+ * @param range - Range to test against
1086
+ * @returns The maximum satisfying version, or null if none satisfy
1087
+ */
1088
+ function maxSatisfying(versions, range) {
1089
+ let max = null;
1090
+ for (const version of versions) {
1091
+ if (satisfies(version, range)) {
1092
+ if (max === null || gt(version, max)) {
1093
+ max = version;
1094
+ }
1095
+ }
1096
+ }
1097
+ return max;
1098
+ }
1099
+ /**
1100
+ * Finds the minimum version that satisfies a range.
1101
+ *
1102
+ * @param versions - Array of versions to check
1103
+ * @param range - Range to test against
1104
+ * @returns The minimum satisfying version, or null if none satisfy
1105
+ */
1106
+ function minSatisfying(versions, range) {
1107
+ let min = null;
1108
+ for (const version of versions) {
1109
+ if (satisfies(version, range)) {
1110
+ if (min === null || lt(version, min)) {
1111
+ min = version;
1112
+ }
1113
+ }
1114
+ }
1115
+ return min;
1116
+ }
1117
+ // ============================================================================
1118
+ // Internal helpers
1119
+ // ============================================================================
1120
+ /**
1121
+ * Compares two prerelease identifiers.
1122
+ * Numeric identifiers have lower precedence than alphanumeric.
1123
+ * Numeric identifiers are compared numerically.
1124
+ * Alphanumeric identifiers are compared lexically.
1125
+ *
1126
+ * @param a - First prerelease identifier
1127
+ * @param b - Second prerelease identifier
1128
+ * @returns -1 if a < b, 0 if equal, 1 if a > b
1129
+ */
1130
+ function compareIdentifiers(a, b) {
1131
+ const aIsNumeric = isNumeric(a);
1132
+ const bIsNumeric = isNumeric(b);
1133
+ // Numeric identifiers have lower precedence
1134
+ if (aIsNumeric && !bIsNumeric) {
1135
+ return -1;
1136
+ }
1137
+ if (!aIsNumeric && bIsNumeric) {
1138
+ return 1;
1139
+ }
1140
+ // Both numeric - compare as numbers
1141
+ if (aIsNumeric && bIsNumeric) {
1142
+ const aNum = parseInt(a, 10);
1143
+ const bNum = parseInt(b, 10);
1144
+ if (aNum < bNum)
1145
+ return -1;
1146
+ if (aNum > bNum)
1147
+ return 1;
1148
+ return 0;
1149
+ }
1150
+ // Both alphanumeric - compare lexically
1151
+ if (a < b)
1152
+ return -1;
1153
+ if (a > b)
1154
+ return 1;
1155
+ return 0;
1156
+ }
1157
+ /**
1158
+ * Checks if a string consists only of digits.
1159
+ *
1160
+ * @param str - String to check for numeric content
1161
+ * @returns True if string contains only digits
1162
+ */
1163
+ function isNumeric(str) {
1164
+ if (str.length === 0)
1165
+ return false;
1166
+ for (let i = 0; i < str.length; i++) {
1167
+ const code = str.charCodeAt(i);
1168
+ if (code < 48 || code > 57) {
1169
+ return false;
1170
+ }
1171
+ }
1172
+ return true;
1173
+ }
1174
+
1175
+ /**
1176
+ * Sorts an array of versions in ascending order.
1177
+ *
1178
+ * @param versions - Array of versions to sort
1179
+ * @returns A new sorted array
1180
+ *
1181
+ * @example
1182
+ * sort([v2, v1, v3]) // [v1, v2, v3]
1183
+ */
1184
+ function sort(versions) {
1185
+ return [...versions].sort(compare);
1186
+ }
1187
+ /**
1188
+ * Sorts an array of versions in descending order.
1189
+ *
1190
+ * @param versions - Array of versions to sort
1191
+ * @returns A new sorted array
1192
+ *
1193
+ * @example
1194
+ * sortDescending([v1, v3, v2]) // [v3, v2, v1]
1195
+ */
1196
+ function sortDescending(versions) {
1197
+ return [...versions].sort((a, b) => compare(b, a));
1198
+ }
1199
+ /**
1200
+ * Returns the maximum version from an array.
1201
+ *
1202
+ * @param versions - Array of versions
1203
+ * @returns The maximum version, or null if array is empty
1204
+ */
1205
+ function max(versions) {
1206
+ if (versions.length === 0)
1207
+ return null;
1208
+ let maxVer = versions[0];
1209
+ for (let i = 1; i < versions.length; i++) {
1210
+ if (compare(versions[i], maxVer) === 1) {
1211
+ maxVer = versions[i];
1212
+ }
1213
+ }
1214
+ return maxVer;
1215
+ }
1216
+ /**
1217
+ * Returns the minimum version from an array.
1218
+ *
1219
+ * @param versions - Array of versions
1220
+ * @returns The minimum version, or null if array is empty
1221
+ */
1222
+ function min(versions) {
1223
+ if (versions.length === 0)
1224
+ return null;
1225
+ let minVer = versions[0];
1226
+ for (let i = 1; i < versions.length; i++) {
1227
+ if (compare(versions[i], minVer) === -1) {
1228
+ minVer = versions[i];
1229
+ }
1230
+ }
1231
+ return minVer;
1232
+ }
1233
+
1234
+ /**
1235
+ * Increments a version based on the bump type.
1236
+ *
1237
+ * @param version - The version to increment
1238
+ * @param type - The type of bump (major, minor, patch, etc.)
1239
+ * @param prereleaseId - Optional prerelease identifier for prerelease bumps
1240
+ * @returns A new incremented SemVer
1241
+ *
1242
+ * @example
1243
+ * increment(parseVersion('1.2.3'), 'minor') // 1.3.0
1244
+ * increment(parseVersion('1.2.3'), 'major') // 2.0.0
1245
+ * increment(parseVersion('1.2.3'), 'prerelease', 'alpha') // 1.2.4-alpha.0
1246
+ */
1247
+ function increment(version, type, prereleaseId) {
1248
+ switch (type) {
1249
+ case 'major':
1250
+ return createSemVer({
1251
+ major: version.major + 1,
1252
+ minor: 0,
1253
+ patch: 0,
1254
+ prerelease: [],
1255
+ build: [],
1256
+ });
1257
+ case 'minor':
1258
+ return createSemVer({
1259
+ major: version.major,
1260
+ minor: version.minor + 1,
1261
+ patch: 0,
1262
+ prerelease: [],
1263
+ build: [],
1264
+ });
1265
+ case 'patch':
1266
+ // If version has prerelease, just remove it (1.2.3-alpha -> 1.2.3)
1267
+ if (version.prerelease.length > 0) {
1268
+ return createSemVer({
1269
+ major: version.major,
1270
+ minor: version.minor,
1271
+ patch: version.patch,
1272
+ prerelease: [],
1273
+ build: [],
1274
+ });
1275
+ }
1276
+ return createSemVer({
1277
+ major: version.major,
1278
+ minor: version.minor,
1279
+ patch: version.patch + 1,
1280
+ prerelease: [],
1281
+ build: [],
1282
+ });
1283
+ case 'premajor':
1284
+ return createSemVer({
1285
+ major: version.major + 1,
1286
+ minor: 0,
1287
+ patch: 0,
1288
+ prerelease: [prereleaseId ?? 'alpha', '0'],
1289
+ build: [],
1290
+ });
1291
+ case 'preminor':
1292
+ return createSemVer({
1293
+ major: version.major,
1294
+ minor: version.minor + 1,
1295
+ patch: 0,
1296
+ prerelease: [prereleaseId ?? 'alpha', '0'],
1297
+ build: [],
1298
+ });
1299
+ case 'prepatch':
1300
+ return createSemVer({
1301
+ major: version.major,
1302
+ minor: version.minor,
1303
+ patch: version.patch + 1,
1304
+ prerelease: [prereleaseId ?? 'alpha', '0'],
1305
+ build: [],
1306
+ });
1307
+ case 'prerelease':
1308
+ return incrementPrerelease(version, prereleaseId);
1309
+ case 'none':
1310
+ default:
1311
+ return version;
1312
+ }
1313
+ }
1314
+ /**
1315
+ * Increments the prerelease portion of a version.
1316
+ *
1317
+ * @param version - The version to increment
1318
+ * @param id - Optional prerelease identifier
1319
+ * @returns A new version with incremented prerelease
1320
+ */
1321
+ function incrementPrerelease(version, id) {
1322
+ const prerelease = [...version.prerelease];
1323
+ if (prerelease.length === 0) {
1324
+ // No existing prerelease - start at patch+1 with id.0
1325
+ return createSemVer({
1326
+ major: version.major,
1327
+ minor: version.minor,
1328
+ patch: version.patch + 1,
1329
+ prerelease: [id ?? 'alpha', '0'],
1330
+ build: [],
1331
+ });
1332
+ }
1333
+ // Check if the last identifier is numeric
1334
+ const lastIdx = prerelease.length - 1;
1335
+ const last = prerelease[lastIdx];
1336
+ const lastNum = parseInt(last, 10);
1337
+ if (!globalIsNaN(lastNum)) {
1338
+ // Increment the numeric part
1339
+ prerelease[lastIdx] = String(lastNum + 1);
1340
+ }
1341
+ else {
1342
+ // Append .0
1343
+ prerelease.push('0');
1344
+ }
1345
+ // If a different id is specified, replace the base identifier
1346
+ if (id && prerelease.length > 0 && prerelease[0] !== id) {
1347
+ prerelease[0] = id;
1348
+ // Reset numeric part
1349
+ if (prerelease.length > 1) {
1350
+ prerelease[prerelease.length - 1] = '0';
1351
+ }
1352
+ }
1353
+ return createSemVer({
1354
+ major: version.major,
1355
+ minor: version.minor,
1356
+ patch: version.patch,
1357
+ prerelease,
1358
+ build: [],
1359
+ });
1360
+ }
1361
+ /**
1362
+ * Calculates the difference type between two versions.
1363
+ *
1364
+ * @param older - The older version
1365
+ * @param newer - The newer version
1366
+ * @returns The type of difference, or null if versions are equal
1367
+ *
1368
+ * @example
1369
+ * diff(parseVersion('1.0.0'), parseVersion('2.0.0')) // 'major'
1370
+ * diff(parseVersion('1.0.0'), parseVersion('1.1.0')) // 'minor'
1371
+ * diff(parseVersion('1.0.0'), parseVersion('1.0.1')) // 'patch'
1372
+ */
1373
+ function diff(older, newer) {
1374
+ // Check major
1375
+ if (older.major !== newer.major) {
1376
+ if (newer.prerelease.length > 0) {
1377
+ return 'premajor';
1378
+ }
1379
+ return 'major';
1380
+ }
1381
+ // Check minor
1382
+ if (older.minor !== newer.minor) {
1383
+ if (newer.prerelease.length > 0) {
1384
+ return 'preminor';
1385
+ }
1386
+ return 'minor';
1387
+ }
1388
+ // Check patch
1389
+ if (older.patch !== newer.patch) {
1390
+ if (newer.prerelease.length > 0) {
1391
+ return 'prepatch';
1392
+ }
1393
+ return 'patch';
1394
+ }
1395
+ // Check prerelease
1396
+ if (older.prerelease.length !== newer.prerelease.length) {
1397
+ return 'prerelease';
1398
+ }
1399
+ for (let i = 0; i < older.prerelease.length; i++) {
1400
+ if (older.prerelease[i] !== newer.prerelease[i]) {
1401
+ return 'prerelease';
1402
+ }
1403
+ }
1404
+ // Versions are equal (ignoring build)
1405
+ return null;
1406
+ }
1407
+
1408
+ /**
1409
+ * Converts a SemVer to its canonical string representation.
1410
+ *
1411
+ * @param version - The version to format
1412
+ * @returns The version string (e.g., "1.2.3-alpha.1+build.123")
1413
+ */
1414
+ function format(version) {
1415
+ let result = `${version.major}.${version.minor}.${version.patch}`;
1416
+ if (version.prerelease.length > 0) {
1417
+ result += '-' + version.prerelease.join('.');
1418
+ }
1419
+ if (version.build.length > 0) {
1420
+ result += '+' + version.build.join('.');
1421
+ }
1422
+ return result;
1423
+ }
1424
+ /**
1425
+ * Converts a SemVer to a string without prerelease/build.
1426
+ *
1427
+ * @param version - The version to format
1428
+ * @returns The version string (e.g., "1.2.3")
1429
+ */
1430
+ function formatSimple(version) {
1431
+ return `${version.major}.${version.minor}.${version.patch}`;
1432
+ }
1433
+ /**
1434
+ * Converts a Range to its string representation.
1435
+ *
1436
+ * @param range - The range to format
1437
+ * @returns The range string
1438
+ */
1439
+ function formatRange(range) {
1440
+ if (range.raw) {
1441
+ return range.raw;
1442
+ }
1443
+ if (range.sets.length === 0) {
1444
+ return '*';
1445
+ }
1446
+ return range.sets.map((set) => set.comparators.map((c) => formatComparator(c)).join(' ')).join(' || ');
1447
+ }
1448
+ /**
1449
+ * Converts a Comparator to its string representation.
1450
+ *
1451
+ * @param comparator - The comparator to format
1452
+ * @returns The comparator string (e.g., ">=1.0.0")
1453
+ */
1454
+ function formatComparator(comparator) {
1455
+ const op = comparator.operator === '=' ? '' : comparator.operator;
1456
+ return op + format(comparator.version);
1457
+ }
1458
+
1459
+ exports.coerceVersion = coerceVersion;
1460
+ exports.compare = compare;
1461
+ exports.createAnyRange = createAnyRange;
1462
+ exports.createComparator = createComparator;
1463
+ exports.createComparatorSet = createComparatorSet;
1464
+ exports.createExactRange = createExactRange;
1465
+ exports.createFirstRelease = createFirstRelease;
1466
+ exports.createInitialVersion = createInitialVersion;
1467
+ exports.createRange = createRange;
1468
+ exports.createSemVer = createSemVer;
1469
+ exports.diff = diff;
1470
+ exports.eq = eq;
1471
+ exports.format = format;
1472
+ exports.formatComparator = formatComparator;
1473
+ exports.formatRange = formatRange;
1474
+ exports.formatSimple = formatSimple;
1475
+ exports.gt = gt;
1476
+ exports.gte = gte;
1477
+ exports.increment = increment;
1478
+ exports.incrementPrerelease = incrementPrerelease;
1479
+ exports.isPrerelease = isPrerelease;
1480
+ exports.isStable = isStable;
1481
+ exports.isWildcard = isWildcard;
1482
+ exports.lt = lt;
1483
+ exports.lte = lte;
1484
+ exports.max = max;
1485
+ exports.maxSatisfying = maxSatisfying;
1486
+ exports.min = min;
1487
+ exports.minSatisfying = minSatisfying;
1488
+ exports.neq = neq;
1489
+ exports.parseRange = parseRange;
1490
+ exports.parseRangeStrict = parseRangeStrict;
1491
+ exports.parseVersion = parseVersion;
1492
+ exports.parseVersionStrict = parseVersionStrict;
1493
+ exports.satisfies = satisfies;
1494
+ exports.satisfiesComparator = satisfiesComparator;
1495
+ exports.sort = sort;
1496
+ exports.sortDescending = sortDescending;
1497
+ exports.stripBuild = stripBuild;
1498
+ exports.stripPrerelease = stripPrerelease;
1499
+ //# sourceMappingURL=index.cjs.js.map