@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,505 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Safe copies of Error built-ins via factory functions.
5
+ *
6
+ * Since constructors cannot be safely captured via Object.assign, this module
7
+ * provides factory functions that use 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/error
13
+ */
14
+ // Capture references at module initialization time
15
+ const _Error = globalThis.Error;
16
+ const _Reflect = globalThis.Reflect;
17
+ /**
18
+ * (Safe copy) Creates a new Error using the captured Error constructor.
19
+ * Use this instead of `new Error()`.
20
+ *
21
+ * @param message - Optional error message.
22
+ * @param options - Optional error options.
23
+ * @returns A new Error instance.
24
+ */
25
+ const createError = (message, options) => _Reflect.construct(_Error, [message, options]);
26
+
27
+ const COMMIT_TYPES = {
28
+ feat: { description: 'A new feature', semverBump: 'minor' },
29
+ fix: { description: 'A bug fix', semverBump: 'patch' },
30
+ docs: { description: 'Documentation only changes', semverBump: 'none' },
31
+ style: { description: 'Code style changes (formatting, etc.)', semverBump: 'none' },
32
+ refactor: { description: 'Code refactoring without feature or fix', semverBump: 'none' },
33
+ perf: { description: 'Performance improvements', semverBump: 'patch' },
34
+ test: { description: 'Adding or updating tests', semverBump: 'none' },
35
+ build: { description: 'Build system or dependencies', semverBump: 'none' },
36
+ ci: { description: 'CI/CD configuration', semverBump: 'none' },
37
+ chore: { description: 'Other changes', semverBump: 'none' },
38
+ revert: { description: 'Revert a previous commit', semverBump: 'patch' },
39
+ };
40
+ /**
41
+ * Checks if a commit type is a standard type.
42
+ *
43
+ * @param type - The commit type to check
44
+ * @returns True if the type is a standard conventional commit type
45
+ */
46
+ function isStandardType(type) {
47
+ return type in COMMIT_TYPES;
48
+ }
49
+
50
+ /**
51
+ * Replaces all occurrences of a character in a string.
52
+ * Uses character-by-character iteration to avoid regex (ReDoS-safe).
53
+ *
54
+ * @param input - The input string
55
+ * @param target - The character to replace
56
+ * @param replacement - The replacement character
57
+ * @returns String with all occurrences replaced
58
+ */
59
+ function replaceChar(input, target, replacement) {
60
+ const result = [];
61
+ for (let i = 0; i < input.length; i++) {
62
+ result.push(input[i] === target ? replacement : input[i]);
63
+ }
64
+ return result.join('');
65
+ }
66
+ /**
67
+ * Replaces all hyphens with spaces.
68
+ * Convenience wrapper for normalizing footer keys.
69
+ *
70
+ * @param input - The input string
71
+ * @returns String with hyphens replaced by spaces
72
+ */
73
+ function hyphenToSpace(input) {
74
+ return replaceChar(input, '-', ' ');
75
+ }
76
+
77
+ /**
78
+ * Parses the body section of a commit message.
79
+ *
80
+ * The body starts after the first blank line and continues until
81
+ * we encounter a footer (key: value or key #value pattern) or end of message.
82
+ *
83
+ * @param lines - All lines of the commit message
84
+ * @param startIndex - Index to start looking for body (after header)
85
+ * @returns Parsed body or undefined if no body
86
+ */
87
+ function parseBody(lines, startIndex) {
88
+ // Skip blank lines to find body start
89
+ let pos = startIndex;
90
+ while (pos < lines.length && lines[pos].trim() === '') {
91
+ pos++;
92
+ }
93
+ if (pos >= lines.length) {
94
+ return undefined;
95
+ }
96
+ // If the first non-blank line is a footer, there's no body
97
+ if (isFooterLine(lines[pos])) {
98
+ return undefined;
99
+ }
100
+ const bodyLines = [];
101
+ // Collect body lines until we hit a footer or end
102
+ while (pos < lines.length) {
103
+ const line = lines[pos];
104
+ // Check if this line looks like a footer
105
+ if (isFooterLine(line)) {
106
+ break;
107
+ }
108
+ // Check for blank line followed by a footer
109
+ if (line.trim() === '' && pos + 1 < lines.length && isFooterLine(lines[pos + 1])) {
110
+ break;
111
+ }
112
+ bodyLines.push(line);
113
+ pos++;
114
+ }
115
+ // Trim trailing blank lines from body
116
+ while (bodyLines.length > 0 && bodyLines[bodyLines.length - 1].trim() === '') {
117
+ bodyLines.pop();
118
+ }
119
+ if (bodyLines.length === 0) {
120
+ return undefined;
121
+ }
122
+ return {
123
+ body: bodyLines.join('\n'),
124
+ endIndex: pos,
125
+ };
126
+ }
127
+ /**
128
+ * Checks if a line looks like a footer.
129
+ *
130
+ * Footer format:
131
+ * - key: value
132
+ * - key #value (for issue references)
133
+ * - BREAKING CHANGE: description
134
+ * - BREAKING-CHANGE: description
135
+ *
136
+ * @param line - The line to check
137
+ * @returns True if the line looks like a footer
138
+ */
139
+ function isFooterLine(line) {
140
+ if (!line)
141
+ return false;
142
+ const trimmed = line.trim();
143
+ if (trimmed === '')
144
+ return false;
145
+ // Check for BREAKING CHANGE or BREAKING-CHANGE
146
+ if (trimmed.startsWith('BREAKING CHANGE:') || trimmed.startsWith('BREAKING-CHANGE:')) {
147
+ return true;
148
+ }
149
+ // Check for token: value or token #value pattern
150
+ let pos = 0;
151
+ // Skip leading whitespace
152
+ while (pos < trimmed.length && trimmed[pos] === ' ') {
153
+ pos++;
154
+ }
155
+ // Read token (alphanumeric and hyphens)
156
+ const tokenStart = pos;
157
+ while (pos < trimmed.length) {
158
+ const char = trimmed[pos];
159
+ const code = char.charCodeAt(0);
160
+ if ((code >= 97 && code <= 122) || // a-z
161
+ (code >= 65 && code <= 90) || // A-Z
162
+ (code >= 48 && code <= 57) || // 0-9
163
+ code === 45 // -
164
+ ) {
165
+ pos++;
166
+ }
167
+ else {
168
+ break;
169
+ }
170
+ }
171
+ // Must have at least one character in token
172
+ if (pos === tokenStart)
173
+ return false;
174
+ // Must be followed by : or space-#
175
+ if (trimmed[pos] === ':') {
176
+ return true;
177
+ }
178
+ if (trimmed[pos] === ' ' && trimmed[pos + 1] === '#') {
179
+ return true;
180
+ }
181
+ return false;
182
+ }
183
+
184
+ /**
185
+ * Checks if a footer key indicates a breaking change.
186
+ *
187
+ * @param key - The footer key to check
188
+ * @returns True if the key indicates a breaking change
189
+ */
190
+ function isBreakingFooterKey(key) {
191
+ const normalized = hyphenToSpace(key.toUpperCase());
192
+ return normalized === 'BREAKING CHANGE';
193
+ }
194
+
195
+ /**
196
+ * Parses the footer section of a commit message.
197
+ *
198
+ * @param lines - All lines of the commit message
199
+ * @param startIndex - Index where footers start
200
+ * @returns Parsed footers
201
+ */
202
+ function parseFooters(lines, startIndex) {
203
+ const footers = [];
204
+ let breakingDescription;
205
+ let pos = startIndex;
206
+ // Skip blank lines
207
+ while (pos < lines.length && lines[pos].trim() === '') {
208
+ pos++;
209
+ }
210
+ while (pos < lines.length) {
211
+ const line = lines[pos];
212
+ const footer = parseFooterLine(line);
213
+ if (footer) {
214
+ footers.push(footer);
215
+ // Check for breaking change
216
+ if (isBreakingFooterKey(footer.key)) {
217
+ breakingDescription = footer.value;
218
+ // Breaking description may span multiple lines
219
+ pos++;
220
+ while (pos < lines.length && !isNewFooter(lines[pos])) {
221
+ const nextLine = lines[pos];
222
+ if (nextLine.trim() !== '') {
223
+ breakingDescription += '\n' + nextLine;
224
+ }
225
+ pos++;
226
+ }
227
+ continue;
228
+ }
229
+ }
230
+ pos++;
231
+ }
232
+ return { footers, breakingDescription };
233
+ }
234
+ /**
235
+ * Parses a single footer line.
236
+ *
237
+ * @param line - The line to parse
238
+ * @returns The parsed CommitFooter or null if not a valid footer
239
+ */
240
+ function parseFooterLine(line) {
241
+ if (!line)
242
+ return null;
243
+ const trimmed = line.trim();
244
+ if (trimmed === '')
245
+ return null;
246
+ // Check for BREAKING CHANGE or BREAKING-CHANGE
247
+ if (trimmed.startsWith('BREAKING CHANGE:')) {
248
+ return {
249
+ key: 'BREAKING CHANGE',
250
+ value: trimmed.slice(16).trim(),
251
+ separator: ':',
252
+ };
253
+ }
254
+ if (trimmed.startsWith('BREAKING-CHANGE:')) {
255
+ return {
256
+ key: 'BREAKING-CHANGE',
257
+ value: trimmed.slice(16).trim(),
258
+ separator: ':',
259
+ };
260
+ }
261
+ // Parse token: value or token #value
262
+ let pos = 0;
263
+ // Read token
264
+ const tokenStart = pos;
265
+ while (pos < trimmed.length) {
266
+ const char = trimmed[pos];
267
+ const code = char.charCodeAt(0);
268
+ if ((code >= 97 && code <= 122) || // a-z
269
+ (code >= 65 && code <= 90) || // A-Z
270
+ (code >= 48 && code <= 57) || // 0-9
271
+ code === 45 // -
272
+ ) {
273
+ pos++;
274
+ }
275
+ else {
276
+ break;
277
+ }
278
+ }
279
+ if (pos === tokenStart)
280
+ return null;
281
+ const key = trimmed.slice(tokenStart, pos);
282
+ // Check separator
283
+ let separator;
284
+ let valueStart;
285
+ if (trimmed[pos] === ':') {
286
+ separator = ':';
287
+ valueStart = pos + 1;
288
+ }
289
+ else if (trimmed[pos] === ' ' && trimmed[pos + 1] === '#') {
290
+ separator = ' #';
291
+ valueStart = pos + 2;
292
+ }
293
+ else {
294
+ return null;
295
+ }
296
+ // Skip whitespace after separator (for : case)
297
+ if (separator === ':') {
298
+ while (valueStart < trimmed.length && trimmed[valueStart] === ' ') {
299
+ valueStart++;
300
+ }
301
+ }
302
+ const value = trimmed.slice(valueStart);
303
+ return { key, value, separator };
304
+ }
305
+ /**
306
+ * Checks if a line starts a new footer.
307
+ *
308
+ * @param line - The line to check
309
+ * @returns True if the line starts a new footer
310
+ */
311
+ function isNewFooter(line) {
312
+ if (!line)
313
+ return false;
314
+ return parseFooterLine(line) !== null;
315
+ }
316
+
317
+ /**
318
+ * Parses a conventional commit header line.
319
+ *
320
+ * @param line - The first line of the commit message
321
+ * @returns Parsed header with type, scope, subject, and breaking flag
322
+ */
323
+ function parseHeader(line) {
324
+ let pos = 0;
325
+ const len = line.length;
326
+ // Extract type (alphanumeric characters until ( or : or !)
327
+ const typeStart = pos;
328
+ while (pos < len) {
329
+ const char = line[pos];
330
+ const code = char.charCodeAt(0);
331
+ // a-z, A-Z, 0-9
332
+ if ((code >= 97 && code <= 122) || (code >= 65 && code <= 90) || (code >= 48 && code <= 57)) {
333
+ pos++;
334
+ }
335
+ else {
336
+ break;
337
+ }
338
+ }
339
+ const type = line.slice(typeStart, pos).toLowerCase();
340
+ // Check for scope in parentheses
341
+ let scope;
342
+ if (line[pos] === '(') {
343
+ pos++; // skip (
344
+ const scopeStart = pos;
345
+ while (pos < len && line[pos] !== ')') {
346
+ pos++;
347
+ }
348
+ scope = line.slice(scopeStart, pos);
349
+ if (line[pos] === ')') {
350
+ pos++; // skip )
351
+ }
352
+ }
353
+ // Check for breaking change indicator (!)
354
+ const breaking = line[pos] === '!';
355
+ if (breaking) {
356
+ pos++;
357
+ }
358
+ // Expect colon
359
+ if (line[pos] === ':') {
360
+ pos++;
361
+ }
362
+ // Skip whitespace after colon
363
+ while (pos < len && line[pos] === ' ') {
364
+ pos++;
365
+ }
366
+ // Rest is subject
367
+ const subject = line.slice(pos).trim();
368
+ return {
369
+ type,
370
+ scope,
371
+ subject,
372
+ breaking,
373
+ };
374
+ }
375
+
376
+ /**
377
+ * Maximum commit message length (10KB)
378
+ */
379
+ const MAX_MESSAGE_LENGTH = 10 * 1024;
380
+ /**
381
+ * Parses a conventional commit message.
382
+ *
383
+ * @param message - The complete commit message
384
+ * @returns Parsed ConventionalCommit object
385
+ * @throws {Error} If message exceeds maximum length
386
+ */
387
+ function parseConventionalCommit(message) {
388
+ if (message.length > MAX_MESSAGE_LENGTH) {
389
+ throw createError(`Commit message exceeds maximum length of ${MAX_MESSAGE_LENGTH} characters`);
390
+ }
391
+ const lines = splitLines(message);
392
+ if (lines.length === 0) {
393
+ return {
394
+ type: '',
395
+ subject: '',
396
+ footers: [],
397
+ breaking: false,
398
+ raw: message,
399
+ };
400
+ }
401
+ // Parse header (first line)
402
+ const header = parseHeader(lines[0]);
403
+ // Parse body and footers
404
+ let body;
405
+ let footersStartIndex = 1;
406
+ if (lines.length > 1) {
407
+ const bodyResult = parseBody(lines, 1);
408
+ if (bodyResult) {
409
+ body = bodyResult.body;
410
+ footersStartIndex = bodyResult.endIndex;
411
+ }
412
+ }
413
+ // Parse footers
414
+ const footersResult = parseFooters(lines, footersStartIndex);
415
+ const breakingDescriptionFromFooter = footersResult.breakingDescription;
416
+ // Determine breaking status
417
+ const breaking = header.breaking || footersResult.footers.some((f) => hyphenToSpace(f.key.toUpperCase()) === 'BREAKING CHANGE');
418
+ // Determine breaking description
419
+ let breakingDescription;
420
+ if (header.breaking && header.subject) {
421
+ // If breaking via !, the subject may describe the breaking change
422
+ breakingDescription = header.subject;
423
+ }
424
+ if (breakingDescriptionFromFooter) {
425
+ breakingDescription = breakingDescriptionFromFooter;
426
+ }
427
+ return {
428
+ type: header.type,
429
+ scope: header.scope,
430
+ subject: header.subject,
431
+ body,
432
+ footers: footersResult.footers,
433
+ breaking,
434
+ breakingDescription,
435
+ raw: message,
436
+ };
437
+ }
438
+ /**
439
+ * Splits a message into lines, handling different line endings.
440
+ *
441
+ * @param message - The message to split into lines
442
+ * @returns An array of lines from the message
443
+ */
444
+ function splitLines(message) {
445
+ const lines = [];
446
+ let currentLine = '';
447
+ let i = 0;
448
+ while (i < message.length) {
449
+ const char = message[i];
450
+ if (char === '\r') {
451
+ lines.push(currentLine);
452
+ currentLine = '';
453
+ // Skip \n if this is \r\n
454
+ if (message[i + 1] === '\n') {
455
+ i++;
456
+ }
457
+ }
458
+ else if (char === '\n') {
459
+ lines.push(currentLine);
460
+ currentLine = '';
461
+ }
462
+ else {
463
+ currentLine += char;
464
+ }
465
+ i++;
466
+ }
467
+ // Add final line if not empty
468
+ if (currentLine || message.endsWith('\n') || message.endsWith('\r')) {
469
+ lines.push(currentLine);
470
+ }
471
+ return lines;
472
+ }
473
+ /**
474
+ * Checks if a commit message follows conventional commit format.
475
+ *
476
+ * @param message - The commit message to check
477
+ * @returns true if the message appears to be a conventional commit
478
+ */
479
+ function isConventionalCommit(message) {
480
+ if (!message || message.trim() === '') {
481
+ return false;
482
+ }
483
+ const firstLine = message.split('\n')[0] ?? '';
484
+ const header = parseHeader(firstLine);
485
+ // Must have a type and subject
486
+ if (!header.type || !header.subject) {
487
+ return false;
488
+ }
489
+ // Type should not be too long (indicates not a type)
490
+ if (header.type.length > 20) {
491
+ return false;
492
+ }
493
+ // Type should be a recognized conventional commit type
494
+ if (!isStandardType(header.type)) {
495
+ return false;
496
+ }
497
+ return true;
498
+ }
499
+
500
+ exports.isConventionalCommit = isConventionalCommit;
501
+ exports.parseBody = parseBody;
502
+ exports.parseConventionalCommit = parseConventionalCommit;
503
+ exports.parseFooters = parseFooters;
504
+ exports.parseHeader = parseHeader;
505
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/error/index.ts","../../../../../../../../../../libs/versioning/src/commits/models/commit-type.ts","../../../../../../../../../../libs/versioning/src/commits/utils/replace-char.ts","../../../../../../../../../../libs/versioning/src/commits/parse/body.ts","../../../../../../../../../../libs/versioning/src/commits/models/breaking.ts","../../../../../../../../../../libs/versioning/src/commits/parse/footer.ts","../../../../../../../../../../libs/versioning/src/commits/parse/header.ts","../../../../../../../../../../libs/versioning/src/commits/parse/message.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":[],"mappings":";;AAA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 @@
1
+ export { parseConventionalCommit, isConventionalCommit } from './message';
2
+ export { parseHeader, type ParsedHeader } from './header';
3
+ export { parseBody, type ParsedBody } from './body';
4
+ export { parseFooters, type ParsedFooters } from './footer';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/versioning/src/commits/parse/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAA"}