@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,574 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Safe copies of Map built-in via factory function.
5
+ *
6
+ * Since constructors cannot be safely captured via Object.assign, this module
7
+ * provides a factory function that uses Reflect.construct internally.
8
+ *
9
+ * These references are captured at module initialization time to protect against
10
+ * prototype pollution attacks. Import only what you need for tree-shaking.
11
+ *
12
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/map
13
+ */
14
+ // Capture references at module initialization time
15
+ const _Map = globalThis.Map;
16
+ const _Reflect = globalThis.Reflect;
17
+ /**
18
+ * (Safe copy) Creates a new Map using the captured Map constructor.
19
+ * Use this instead of `new Map()`.
20
+ *
21
+ * @param iterable - Optional iterable of key-value pairs.
22
+ * @returns A new Map instance.
23
+ */
24
+ const createMap = (iterable) => _Reflect.construct(_Map, iterable ? [iterable] : []);
25
+
26
+ /**
27
+ * Maps section headings to their canonical types.
28
+ * Used during parsing to normalize different heading styles.
29
+ */
30
+ /**
31
+ * Standard section headings for serialization.
32
+ * Maps section types to their preferred heading text.
33
+ */
34
+ const SECTION_HEADINGS = {
35
+ breaking: 'Breaking Changes',
36
+ features: 'Features',
37
+ fixes: 'Bug Fixes',
38
+ performance: 'Performance',
39
+ documentation: 'Documentation',
40
+ deprecations: 'Deprecations',
41
+ refactoring: 'Refactoring',
42
+ tests: 'Tests',
43
+ build: 'Build',
44
+ ci: 'CI',
45
+ chores: 'Chores',
46
+ other: 'Other',
47
+ };
48
+
49
+ /**
50
+ * Changelog Serialization Templates
51
+ *
52
+ * Output templates and formatting helpers for changelog serialization.
53
+ * Provides configurable options for different changelog styles.
54
+ */
55
+ /**
56
+ * Default serialization options.
57
+ */
58
+ const DEFAULT_SERIALIZE_OPTIONS = {
59
+ includeDescription: true,
60
+ includeLinks: true,
61
+ includeCompareUrls: true,
62
+ includeCommits: true,
63
+ includeReferences: true,
64
+ includeScope: true,
65
+ includeRawContent: false,
66
+ sectionOrder: [
67
+ 'breaking',
68
+ 'features',
69
+ 'fixes',
70
+ 'performance',
71
+ 'documentation',
72
+ 'deprecations',
73
+ 'refactoring',
74
+ 'tests',
75
+ 'build',
76
+ 'ci',
77
+ 'chores',
78
+ 'other',
79
+ ],
80
+ sectionHeadings: {},
81
+ lineEnding: '\n',
82
+ entrySpacing: 1,
83
+ sectionSpacing: 1,
84
+ useAsterisks: false,
85
+ };
86
+ /**
87
+ * Merges user options with defaults.
88
+ *
89
+ * @param options - User-provided options
90
+ * @returns Complete options with defaults applied
91
+ */
92
+ function resolveOptions(options) {
93
+ if (!options) {
94
+ return DEFAULT_SERIALIZE_OPTIONS;
95
+ }
96
+ return {
97
+ includeDescription: options.includeDescription ?? DEFAULT_SERIALIZE_OPTIONS.includeDescription,
98
+ includeLinks: options.includeLinks ?? DEFAULT_SERIALIZE_OPTIONS.includeLinks,
99
+ includeCompareUrls: options.includeCompareUrls ?? DEFAULT_SERIALIZE_OPTIONS.includeCompareUrls,
100
+ includeCommits: options.includeCommits ?? DEFAULT_SERIALIZE_OPTIONS.includeCommits,
101
+ includeReferences: options.includeReferences ?? DEFAULT_SERIALIZE_OPTIONS.includeReferences,
102
+ includeScope: options.includeScope ?? DEFAULT_SERIALIZE_OPTIONS.includeScope,
103
+ includeRawContent: options.includeRawContent ?? DEFAULT_SERIALIZE_OPTIONS.includeRawContent,
104
+ sectionOrder: options.sectionOrder ?? DEFAULT_SERIALIZE_OPTIONS.sectionOrder,
105
+ sectionHeadings: options.sectionHeadings ?? DEFAULT_SERIALIZE_OPTIONS.sectionHeadings,
106
+ lineEnding: options.lineEnding ?? DEFAULT_SERIALIZE_OPTIONS.lineEnding,
107
+ entrySpacing: options.entrySpacing ?? DEFAULT_SERIALIZE_OPTIONS.entrySpacing,
108
+ sectionSpacing: options.sectionSpacing ?? DEFAULT_SERIALIZE_OPTIONS.sectionSpacing,
109
+ useAsterisks: options.useAsterisks ?? DEFAULT_SERIALIZE_OPTIONS.useAsterisks,
110
+ };
111
+ }
112
+ /**
113
+ * Gets the heading for a section type, respecting custom headings.
114
+ *
115
+ * @param type - The changelog section type to get the heading for
116
+ * @param customHeadings - Optional map of custom section type to heading overrides
117
+ * @returns The heading string to use
118
+ */
119
+ function getSectionHeading(type, customHeadings) {
120
+ return customHeadings?.[type] ?? SECTION_HEADINGS[type];
121
+ }
122
+ /**
123
+ * Creates a markdown link.
124
+ *
125
+ * @param text - The display text for the link
126
+ * @param url - The destination URL for the link
127
+ * @returns Formatted markdown link
128
+ */
129
+ function formatLink(text, url) {
130
+ return `[${text}](${url})`;
131
+ }
132
+ /**
133
+ * Creates a list item marker.
134
+ *
135
+ * @param useAsterisks - Whether to use * instead of -
136
+ * @returns The list item marker ('- ' or '* ')
137
+ */
138
+ function getListMarker(useAsterisks) {
139
+ return useAsterisks ? '* ' : '- ';
140
+ }
141
+ /**
142
+ * Creates blank lines for spacing.
143
+ *
144
+ * @param count - Number of blank lines
145
+ * @param lineEnding - Line ending style
146
+ * @returns String with specified number of blank lines
147
+ */
148
+ function createSpacing(count, lineEnding) {
149
+ if (count <= 0)
150
+ return '';
151
+ return lineEnding.repeat(count);
152
+ }
153
+
154
+ /**
155
+ * Changelog Serialization to String
156
+ *
157
+ * Converts a Changelog object back to markdown format.
158
+ * Supports configurable output formatting for different changelog styles.
159
+ */
160
+ /**
161
+ * Serializes a Changelog object to markdown string.
162
+ *
163
+ * @param changelog - The changelog to serialize
164
+ * @param options - Optional serialization options
165
+ * @returns The markdown string representation
166
+ *
167
+ * @example
168
+ * ```ts
169
+ * const markdown = serializeChangelog(changelog)
170
+ * ```
171
+ *
172
+ * @example
173
+ * ```ts
174
+ * const markdown = serializeChangelog(changelog, {
175
+ * includeCommits: false,
176
+ * useAsterisks: true,
177
+ * })
178
+ * ```
179
+ */
180
+ function serializeChangelog(changelog, options) {
181
+ const opts = resolveOptions(options);
182
+ const parts = [];
183
+ // Serialize header
184
+ parts.push(serializeHeader(changelog.header, opts));
185
+ // Serialize entries
186
+ for (let i = 0; i < changelog.entries.length; i++) {
187
+ const entry = changelog.entries[i];
188
+ parts.push(serializeEntry(entry, opts));
189
+ // Add spacing between entries (except after the last one)
190
+ if (i < changelog.entries.length - 1) {
191
+ parts.push(createSpacing(opts.entrySpacing, opts.lineEnding));
192
+ }
193
+ }
194
+ return parts.join('');
195
+ }
196
+ /**
197
+ * Serializes the changelog header.
198
+ *
199
+ * @param header - The header to serialize
200
+ * @param opts - Resolved options
201
+ * @returns The serialized header string
202
+ */
203
+ function serializeHeader(header, opts) {
204
+ const parts = [];
205
+ const nl = opts.lineEnding;
206
+ // Title
207
+ parts.push(header.title + nl);
208
+ parts.push(nl);
209
+ // Description
210
+ if (opts.includeDescription && header.description.length > 0) {
211
+ for (const line of header.description) {
212
+ parts.push(line + nl);
213
+ }
214
+ parts.push(nl);
215
+ }
216
+ // Links section
217
+ if (opts.includeLinks && header.links.length > 0) {
218
+ for (const link of header.links) {
219
+ parts.push(serializeLink(link) + nl);
220
+ }
221
+ parts.push(nl);
222
+ }
223
+ return parts.join('');
224
+ }
225
+ /**
226
+ * Serializes a changelog link.
227
+ *
228
+ * @param link - The link to serialize
229
+ * @returns The serialized link
230
+ */
231
+ function serializeLink(link) {
232
+ return `[${link.label}]: ${link.url}`;
233
+ }
234
+ /**
235
+ * Serializes a changelog entry.
236
+ *
237
+ * @param entry - The entry to serialize
238
+ * @param opts - Resolved options
239
+ * @returns The serialized entry string
240
+ */
241
+ function serializeEntry(entry, opts) {
242
+ const parts = [];
243
+ const nl = opts.lineEnding;
244
+ // Entry heading
245
+ parts.push(serializeEntryHeading(entry, opts) + nl);
246
+ parts.push(nl);
247
+ // Raw content fallback
248
+ if (opts.includeRawContent && entry.rawContent) {
249
+ parts.push(entry.rawContent + nl);
250
+ return parts.join('');
251
+ }
252
+ // Sort sections by specified order
253
+ const sortedSections = sortSections(entry.sections, opts.sectionOrder);
254
+ // Serialize sections
255
+ for (let i = 0; i < sortedSections.length; i++) {
256
+ const section = sortedSections[i];
257
+ parts.push(serializeSection(section, opts));
258
+ // Add spacing between sections (except after the last one)
259
+ if (i < sortedSections.length - 1) {
260
+ parts.push(createSpacing(opts.sectionSpacing, nl));
261
+ }
262
+ }
263
+ return parts.join('');
264
+ }
265
+ /**
266
+ * Serializes an entry heading.
267
+ *
268
+ * @param entry - The changelog entry to serialize the heading for
269
+ * @param opts - Resolved serialization options
270
+ * @returns The heading line
271
+ */
272
+ function serializeEntryHeading(entry, opts) {
273
+ const parts = ['## '];
274
+ // Version with optional compare URL
275
+ if (opts.includeCompareUrls && entry.compareUrl) {
276
+ parts.push(formatLink(entry.version, entry.compareUrl));
277
+ }
278
+ else {
279
+ parts.push(entry.version);
280
+ }
281
+ // Date
282
+ if (entry.date) {
283
+ parts.push(` - ${entry.date}`);
284
+ }
285
+ return parts.join('');
286
+ }
287
+ /**
288
+ * Sorts sections by the specified order.
289
+ *
290
+ * @param sections - The sections to sort
291
+ * @param order - The desired section order
292
+ * @returns Sorted sections
293
+ */
294
+ function sortSections(sections, order) {
295
+ const orderMap = createMap();
296
+ order.forEach((type, index) => orderMap.set(type, index));
297
+ return [...sections].sort((a, b) => {
298
+ const orderA = orderMap.get(a.type) ?? Number.MAX_SAFE_INTEGER;
299
+ const orderB = orderMap.get(b.type) ?? Number.MAX_SAFE_INTEGER;
300
+ return orderA - orderB;
301
+ });
302
+ }
303
+ /**
304
+ * Serializes a changelog section.
305
+ *
306
+ * @param section - The section to serialize
307
+ * @param opts - Resolved options
308
+ * @returns The serialized section string
309
+ */
310
+ function serializeSection(section, opts) {
311
+ const parts = [];
312
+ const nl = opts.lineEnding;
313
+ // Section heading - use original heading if available, otherwise generate
314
+ const heading = section.heading || getSectionHeading(section.type, opts.sectionHeadings);
315
+ parts.push(`### ${heading}${nl}`);
316
+ parts.push(nl);
317
+ // Items
318
+ for (const item of section.items) {
319
+ parts.push(serializeItem(item, opts) + nl);
320
+ }
321
+ return parts.join('');
322
+ }
323
+ /**
324
+ * Serializes a changelog item.
325
+ *
326
+ * @param item - The item to serialize
327
+ * @param opts - Resolved options
328
+ * @returns The serialized item string
329
+ */
330
+ function serializeItem(item, opts) {
331
+ const parts = [];
332
+ const marker = getListMarker(opts.useAsterisks);
333
+ parts.push(marker);
334
+ // Breaking change indicator
335
+ if (item.breaking) {
336
+ parts.push('**BREAKING** ');
337
+ }
338
+ // Scope
339
+ if (opts.includeScope && item.scope) {
340
+ parts.push(`**${item.scope}:** `);
341
+ }
342
+ // Description
343
+ parts.push(item.description);
344
+ // Commit references
345
+ if (opts.includeCommits && item.commits.length > 0) {
346
+ parts.push(' (');
347
+ parts.push(item.commits.map(serializeCommitRef).join(', '));
348
+ parts.push(')');
349
+ }
350
+ // Issue/PR references
351
+ if (opts.includeReferences && item.references.length > 0) {
352
+ const refs = item.references.map(serializeIssueRef).join(', ');
353
+ parts.push(` ${refs}`);
354
+ }
355
+ return parts.join('');
356
+ }
357
+ /**
358
+ * Serializes a commit reference.
359
+ *
360
+ * @param ref - The commit reference
361
+ * @returns The serialized reference
362
+ */
363
+ function serializeCommitRef(ref) {
364
+ if (ref.url) {
365
+ return formatLink(ref.shortHash, ref.url);
366
+ }
367
+ return ref.shortHash;
368
+ }
369
+ /**
370
+ * Serializes an issue/PR reference.
371
+ *
372
+ * @param ref - The issue reference
373
+ * @returns The serialized reference
374
+ */
375
+ function serializeIssueRef(ref) {
376
+ const text = `#${ref.number}`;
377
+ if (ref.url) {
378
+ return formatLink(text, ref.url);
379
+ }
380
+ return text;
381
+ }
382
+
383
+ /**
384
+ * Safe copies of JSON built-in methods.
385
+ *
386
+ * These references are captured at module initialization time to protect against
387
+ * prototype pollution attacks. Import only what you need for tree-shaking.
388
+ *
389
+ * @module @hyperfrontend/immutable-api-utils/built-in-copy/json
390
+ */
391
+ // Capture references at module initialization time
392
+ const _JSON = globalThis.JSON;
393
+ /**
394
+ * (Safe copy) Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
395
+ */
396
+ const stringify = _JSON.stringify;
397
+
398
+ /**
399
+ * Changelog Serialization to JSON
400
+ *
401
+ * Converts a Changelog object to JSON format.
402
+ * Useful for storing changelogs in databases or APIs.
403
+ */
404
+ /**
405
+ * Default JSON serialization options.
406
+ */
407
+ const DEFAULT_JSON_OPTIONS = {
408
+ pretty: false,
409
+ indent: 2,
410
+ includeSource: false,
411
+ includeMetadata: true,
412
+ includeEmptyArrays: true,
413
+ };
414
+ /**
415
+ * Resolves JSON serialization options with defaults.
416
+ *
417
+ * @param options - User-provided options
418
+ * @returns Complete options with defaults applied
419
+ */
420
+ function resolveJsonOptions(options) {
421
+ if (!options) {
422
+ return DEFAULT_JSON_OPTIONS;
423
+ }
424
+ return {
425
+ pretty: options.pretty ?? DEFAULT_JSON_OPTIONS.pretty,
426
+ indent: options.indent ?? DEFAULT_JSON_OPTIONS.indent,
427
+ includeSource: options.includeSource ?? DEFAULT_JSON_OPTIONS.includeSource,
428
+ includeMetadata: options.includeMetadata ?? DEFAULT_JSON_OPTIONS.includeMetadata,
429
+ includeEmptyArrays: options.includeEmptyArrays ?? DEFAULT_JSON_OPTIONS.includeEmptyArrays,
430
+ };
431
+ }
432
+ /**
433
+ * Serializes a Changelog object to JSON string.
434
+ *
435
+ * @param changelog - The changelog object to convert to JSON
436
+ * @param options - Optional JSON serialization options
437
+ * @returns The JSON string representation
438
+ *
439
+ * @example
440
+ * ```ts
441
+ * const json = serializeChangelogToJson(changelog)
442
+ * ```
443
+ *
444
+ * @example
445
+ * ```ts
446
+ * const json = serializeChangelogToJson(changelog, {
447
+ * pretty: true,
448
+ * indent: 4,
449
+ * })
450
+ * ```
451
+ */
452
+ function serializeChangelogToJson(changelog, options) {
453
+ const opts = resolveJsonOptions(options);
454
+ const data = toJsonObject(changelog, opts);
455
+ if (opts.pretty) {
456
+ return stringify(data, null, opts.indent);
457
+ }
458
+ return stringify(data);
459
+ }
460
+ /**
461
+ * Converts a Changelog to a plain JSON-serializable object.
462
+ * Useful when you need the object itself rather than a string.
463
+ *
464
+ * @param changelog - The changelog to convert
465
+ * @param options - Optional JSON serialization options
466
+ * @returns A plain object suitable for JSON serialization
467
+ */
468
+ function toJsonObject(changelog, options) {
469
+ const opts = resolveJsonOptions(options);
470
+ const result = {};
471
+ // Source
472
+ if (opts.includeSource && changelog.source) {
473
+ result['source'] = changelog.source;
474
+ }
475
+ // Header
476
+ result['header'] = {
477
+ title: changelog.header.title,
478
+ description: filterEmpty(changelog.header.description, opts.includeEmptyArrays),
479
+ links: filterEmpty(changelog.header.links.map((link) => ({
480
+ label: link.label,
481
+ url: link.url,
482
+ })), opts.includeEmptyArrays),
483
+ };
484
+ // Entries
485
+ result['entries'] = changelog.entries.map((entry) => {
486
+ const entryObj = {
487
+ version: entry.version,
488
+ date: entry.date,
489
+ unreleased: entry.unreleased,
490
+ };
491
+ if (entry.compareUrl) {
492
+ entryObj['compareUrl'] = entry.compareUrl;
493
+ }
494
+ entryObj['sections'] = entry.sections.map((section) => ({
495
+ type: section.type,
496
+ heading: section.heading,
497
+ items: section.items.map((item) => {
498
+ const itemObj = {
499
+ description: item.description,
500
+ breaking: item.breaking,
501
+ };
502
+ if (item.scope) {
503
+ itemObj['scope'] = item.scope;
504
+ }
505
+ itemObj['commits'] = filterEmpty(item.commits.map((commit) => {
506
+ const commitObj = {
507
+ hash: commit.hash,
508
+ shortHash: commit.shortHash,
509
+ };
510
+ if (commit.url) {
511
+ commitObj['url'] = commit.url;
512
+ }
513
+ return commitObj;
514
+ }), opts.includeEmptyArrays);
515
+ itemObj['references'] = filterEmpty(item.references.map((ref) => {
516
+ const refObj = {
517
+ number: ref.number,
518
+ type: ref.type,
519
+ };
520
+ if (ref.url) {
521
+ refObj['url'] = ref.url;
522
+ }
523
+ return refObj;
524
+ }), opts.includeEmptyArrays);
525
+ return itemObj;
526
+ }),
527
+ }));
528
+ if (entry.rawContent) {
529
+ entryObj['rawContent'] = entry.rawContent;
530
+ }
531
+ return entryObj;
532
+ });
533
+ // Metadata
534
+ if (opts.includeMetadata) {
535
+ const metadataObj = {
536
+ format: changelog.metadata.format,
537
+ isConventional: changelog.metadata.isConventional,
538
+ };
539
+ if (changelog.metadata.repositoryUrl) {
540
+ metadataObj['repositoryUrl'] = changelog.metadata.repositoryUrl;
541
+ }
542
+ if (changelog.metadata.packageName) {
543
+ metadataObj['packageName'] = changelog.metadata.packageName;
544
+ }
545
+ metadataObj['warnings'] = filterEmpty(changelog.metadata.warnings, opts.includeEmptyArrays);
546
+ result['metadata'] = metadataObj;
547
+ }
548
+ return result;
549
+ }
550
+ /**
551
+ * Filters out empty arrays if includeEmptyArrays is false.
552
+ *
553
+ * @param arr - The array to filter
554
+ * @param includeEmpty - Whether to include empty arrays
555
+ * @returns The array or undefined if empty and not including empty arrays
556
+ */
557
+ function filterEmpty(arr, includeEmpty) {
558
+ if (!arr)
559
+ return includeEmpty ? [] : undefined;
560
+ if (arr.length === 0 && !includeEmpty)
561
+ return undefined;
562
+ return arr;
563
+ }
564
+
565
+ exports.DEFAULT_SERIALIZE_OPTIONS = DEFAULT_SERIALIZE_OPTIONS;
566
+ exports.createSpacing = createSpacing;
567
+ exports.formatLink = formatLink;
568
+ exports.getListMarker = getListMarker;
569
+ exports.getSectionHeading = getSectionHeading;
570
+ exports.resolveOptions = resolveOptions;
571
+ exports.serializeChangelog = serializeChangelog;
572
+ exports.serializeChangelogToJson = serializeChangelogToJson;
573
+ exports.toJsonObject = toJsonObject;
574
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/map/index.ts","../../../../../../../../../../libs/versioning/src/changelog/models/section.ts","../../../../../../../../../../libs/versioning/src/changelog/serialize/templates.ts","../../../../../../../../../../libs/versioning/src/changelog/serialize/to-string.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/json/index.ts","../../../../../../../../../../libs/versioning/src/changelog/serialize/to-json.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;AAAA;;;;;;;;;;AAUG;AAEH;AACA,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG;AAC3B,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO;AAGnC;;;;;;AAMG;AACI,MAAM,SAAS,GAAG,CAAO,QAA2C,KAC9D,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;;ACNjE;;;AAGG;AAmEH;;;AAGG;AACI,MAAM,gBAAgB,GAAyC;AACpE,IAAA,QAAQ,EAAE,kBAAkB;AAC5B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,aAAa,EAAE,eAAe;AAC9B,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,KAAK,EAAE,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B,YAAA,QAAQ,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,UAAU;QAC3C;AAEA,QAAA,OAAO,QAAQ;AACjB,IAAA,CAAC,CAAC;;AAGF,IAAA,IAAI,IAAI,CAAC,eAAe,EAAE;AACxB,QAAA,MAAM,WAAW,GAA4B;AAC3C,YAAA,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,MAAM;AACjC,YAAA,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAC,cAAc;SAClD;AAED,QAAA,IAAI,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE;YACpC,WAAW,CAAC,eAAe,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,aAAa;QACjE;AAEA,QAAA,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE;YAClC,WAAW,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW;QAC7D;AAEA,QAAA,WAAW,CAAC,UAAU,CAAC,GAAG,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC;AAE3F,QAAA,MAAM,CAAC,UAAU,CAAC,GAAG,WAAW;IAClC;AAEA,IAAA,OAAO,MAAM;AACf;AAEA;;;;;;AAMG;AACH,SAAS,WAAW,CAAI,GAA6B,EAAE,YAAqB,EAAA;AAC1E,IAAA,IAAI,CAAC,GAAG;QAAE,OAAO,YAAY,GAAG,EAAE,GAAG,SAAS;AAC9C,IAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY;AAAE,QAAA,OAAO,SAAS;AACvD,IAAA,OAAO,GAAG;AACZ;;;;;;;;;;;;"}
@@ -0,0 +1,6 @@
1
+ export type { JsonSerializeOptions } from './to-json';
2
+ export type { SerializeOptions } from './templates';
3
+ export { serializeChangelog } from './to-string';
4
+ export { serializeChangelogToJson, toJsonObject } from './to-json';
5
+ export { DEFAULT_SERIALIZE_OPTIONS, resolveOptions, getSectionHeading, formatLink, getListMarker, createSpacing } from './templates';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/versioning/src/changelog/serialize/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACrD,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAClE,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA"}