@hyperfrontend/versioning 0.1.0 → 0.2.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 (158) hide show
  1. package/ARCHITECTURE.md +50 -1
  2. package/CHANGELOG.md +23 -23
  3. package/README.md +12 -9
  4. package/changelog/index.cjs.js +23 -2
  5. package/changelog/index.cjs.js.map +1 -1
  6. package/changelog/index.esm.js +23 -2
  7. package/changelog/index.esm.js.map +1 -1
  8. package/changelog/models/entry.d.ts +5 -0
  9. package/changelog/models/entry.d.ts.map +1 -1
  10. package/changelog/models/index.cjs.js +2 -0
  11. package/changelog/models/index.cjs.js.map +1 -1
  12. package/changelog/models/index.esm.js +2 -0
  13. package/changelog/models/index.esm.js.map +1 -1
  14. package/changelog/operations/index.cjs.js.map +1 -1
  15. package/changelog/operations/index.esm.js.map +1 -1
  16. package/changelog/parse/index.cjs.js +23 -2
  17. package/changelog/parse/index.cjs.js.map +1 -1
  18. package/changelog/parse/index.esm.js +23 -2
  19. package/changelog/parse/index.esm.js.map +1 -1
  20. package/changelog/parse/line.d.ts.map +1 -1
  21. package/commits/classify/classifier.d.ts +73 -0
  22. package/commits/classify/classifier.d.ts.map +1 -0
  23. package/commits/classify/index.cjs.js +705 -0
  24. package/commits/classify/index.cjs.js.map +1 -0
  25. package/commits/classify/index.d.ts +8 -0
  26. package/commits/classify/index.d.ts.map +1 -0
  27. package/commits/classify/index.esm.js +678 -0
  28. package/commits/classify/index.esm.js.map +1 -0
  29. package/commits/classify/infrastructure.d.ts +205 -0
  30. package/commits/classify/infrastructure.d.ts.map +1 -0
  31. package/commits/classify/models.d.ts +108 -0
  32. package/commits/classify/models.d.ts.map +1 -0
  33. package/commits/classify/project-scopes.d.ts +59 -0
  34. package/commits/classify/project-scopes.d.ts.map +1 -0
  35. package/commits/index.cjs.js +702 -0
  36. package/commits/index.cjs.js.map +1 -1
  37. package/commits/index.d.ts +1 -0
  38. package/commits/index.d.ts.map +1 -1
  39. package/commits/index.esm.js +677 -1
  40. package/commits/index.esm.js.map +1 -1
  41. package/flow/executor/execute.d.ts +6 -0
  42. package/flow/executor/execute.d.ts.map +1 -1
  43. package/flow/executor/index.cjs.js +1604 -42
  44. package/flow/executor/index.cjs.js.map +1 -1
  45. package/flow/executor/index.esm.js +1610 -48
  46. package/flow/executor/index.esm.js.map +1 -1
  47. package/flow/index.cjs.js +6651 -2893
  48. package/flow/index.cjs.js.map +1 -1
  49. package/flow/index.esm.js +6655 -2899
  50. package/flow/index.esm.js.map +1 -1
  51. package/flow/models/index.cjs.js +125 -0
  52. package/flow/models/index.cjs.js.map +1 -1
  53. package/flow/models/index.esm.js +125 -0
  54. package/flow/models/index.esm.js.map +1 -1
  55. package/flow/models/types.d.ts +148 -3
  56. package/flow/models/types.d.ts.map +1 -1
  57. package/flow/presets/conventional.d.ts +9 -8
  58. package/flow/presets/conventional.d.ts.map +1 -1
  59. package/flow/presets/independent.d.ts.map +1 -1
  60. package/flow/presets/index.cjs.js +3588 -298
  61. package/flow/presets/index.cjs.js.map +1 -1
  62. package/flow/presets/index.esm.js +3588 -298
  63. package/flow/presets/index.esm.js.map +1 -1
  64. package/flow/presets/synced.d.ts.map +1 -1
  65. package/flow/steps/analyze-commits.d.ts +9 -6
  66. package/flow/steps/analyze-commits.d.ts.map +1 -1
  67. package/flow/steps/calculate-bump.d.ts.map +1 -1
  68. package/flow/steps/fetch-registry.d.ts.map +1 -1
  69. package/flow/steps/generate-changelog.d.ts.map +1 -1
  70. package/flow/steps/index.cjs.js +3604 -318
  71. package/flow/steps/index.cjs.js.map +1 -1
  72. package/flow/steps/index.d.ts +1 -0
  73. package/flow/steps/index.d.ts.map +1 -1
  74. package/flow/steps/index.esm.js +3603 -319
  75. package/flow/steps/index.esm.js.map +1 -1
  76. package/flow/steps/resolve-repository.d.ts +36 -0
  77. package/flow/steps/resolve-repository.d.ts.map +1 -0
  78. package/flow/steps/update-packages.d.ts.map +1 -1
  79. package/git/factory.d.ts +14 -0
  80. package/git/factory.d.ts.map +1 -1
  81. package/git/index.cjs.js +65 -0
  82. package/git/index.cjs.js.map +1 -1
  83. package/git/index.esm.js +66 -2
  84. package/git/index.esm.js.map +1 -1
  85. package/git/operations/index.cjs.js +40 -0
  86. package/git/operations/index.cjs.js.map +1 -1
  87. package/git/operations/index.d.ts +1 -1
  88. package/git/operations/index.d.ts.map +1 -1
  89. package/git/operations/index.esm.js +41 -2
  90. package/git/operations/index.esm.js.map +1 -1
  91. package/git/operations/log.d.ts +23 -0
  92. package/git/operations/log.d.ts.map +1 -1
  93. package/index.cjs.js +6962 -4413
  94. package/index.cjs.js.map +1 -1
  95. package/index.esm.js +6964 -4415
  96. package/index.esm.js.map +1 -1
  97. package/package.json +26 -1
  98. package/registry/index.cjs.js +3 -3
  99. package/registry/index.cjs.js.map +1 -1
  100. package/registry/index.esm.js +3 -3
  101. package/registry/index.esm.js.map +1 -1
  102. package/registry/models/index.cjs.js +2 -0
  103. package/registry/models/index.cjs.js.map +1 -1
  104. package/registry/models/index.esm.js +2 -0
  105. package/registry/models/index.esm.js.map +1 -1
  106. package/registry/models/version-info.d.ts +10 -0
  107. package/registry/models/version-info.d.ts.map +1 -1
  108. package/registry/npm/client.d.ts.map +1 -1
  109. package/registry/npm/index.cjs.js +1 -3
  110. package/registry/npm/index.cjs.js.map +1 -1
  111. package/registry/npm/index.esm.js +1 -3
  112. package/registry/npm/index.esm.js.map +1 -1
  113. package/repository/index.cjs.js +998 -0
  114. package/repository/index.cjs.js.map +1 -0
  115. package/repository/index.d.ts +4 -0
  116. package/repository/index.d.ts.map +1 -0
  117. package/repository/index.esm.js +981 -0
  118. package/repository/index.esm.js.map +1 -0
  119. package/repository/models/index.cjs.js +301 -0
  120. package/repository/models/index.cjs.js.map +1 -0
  121. package/repository/models/index.d.ts +7 -0
  122. package/repository/models/index.d.ts.map +1 -0
  123. package/repository/models/index.esm.js +290 -0
  124. package/repository/models/index.esm.js.map +1 -0
  125. package/repository/models/platform.d.ts +58 -0
  126. package/repository/models/platform.d.ts.map +1 -0
  127. package/repository/models/repository-config.d.ts +132 -0
  128. package/repository/models/repository-config.d.ts.map +1 -0
  129. package/repository/models/resolution.d.ts +121 -0
  130. package/repository/models/resolution.d.ts.map +1 -0
  131. package/repository/parse/index.cjs.js +755 -0
  132. package/repository/parse/index.cjs.js.map +1 -0
  133. package/repository/parse/index.d.ts +5 -0
  134. package/repository/parse/index.d.ts.map +1 -0
  135. package/repository/parse/index.esm.js +749 -0
  136. package/repository/parse/index.esm.js.map +1 -0
  137. package/repository/parse/package-json.d.ts +100 -0
  138. package/repository/parse/package-json.d.ts.map +1 -0
  139. package/repository/parse/url.d.ts +81 -0
  140. package/repository/parse/url.d.ts.map +1 -0
  141. package/repository/url/compare.d.ts +84 -0
  142. package/repository/url/compare.d.ts.map +1 -0
  143. package/repository/url/index.cjs.js +178 -0
  144. package/repository/url/index.cjs.js.map +1 -0
  145. package/repository/url/index.d.ts +3 -0
  146. package/repository/url/index.d.ts.map +1 -0
  147. package/repository/url/index.esm.js +176 -0
  148. package/repository/url/index.esm.js.map +1 -0
  149. package/workspace/discovery/index.cjs.js +324 -330
  150. package/workspace/discovery/index.cjs.js.map +1 -1
  151. package/workspace/discovery/index.esm.js +324 -330
  152. package/workspace/discovery/index.esm.js.map +1 -1
  153. package/workspace/discovery/packages.d.ts +0 -6
  154. package/workspace/discovery/packages.d.ts.map +1 -1
  155. package/workspace/index.cjs.js +0 -6
  156. package/workspace/index.cjs.js.map +1 -1
  157. package/workspace/index.esm.js +0 -6
  158. package/workspace/index.esm.js.map +1 -1
package/ARCHITECTURE.md CHANGED
@@ -137,7 +137,7 @@ sequenceDiagram
137
137
  Flow->>Workspace: discoverProjects()
138
138
  Workspace-->>Flow: projects[]
139
139
 
140
- Flow->>Git: getCommitsSince(lastTag)
140
+ Flow->>Git: getCommitsSince(publishedCommit)
141
141
  Git-->>Flow: commits[]
142
142
 
143
143
  Flow->>Commits: parseConventionalCommits(commits)
@@ -214,6 +214,55 @@ flowchart TD
214
214
  breaking2 --> result
215
215
  ```
216
216
 
217
+ ### Commit Classification Pipeline
218
+
219
+ When generating changelogs for monorepo projects, commits must be classified to determine which project(s) they belong to:
220
+
221
+ ```mermaid
222
+ flowchart TB
223
+ input["Raw Commits\n(git log)"]
224
+
225
+ subgraph engine["Commit Classification Engine"]
226
+ direction TB
227
+ subgraph filters["Filtering Strategies"]
228
+ scope["Scope-Based\nFiltering"]
229
+ file["File-Based\nFiltering"]
230
+ end
231
+ scope --> matrix
232
+ file --> matrix
233
+ matrix["Classification\nDecision Matrix"]
234
+ end
235
+
236
+ input --> engine
237
+
238
+ matrix --> direct
239
+ matrix --> indirect
240
+ matrix --> excluded
241
+
242
+ subgraph direct["DIRECT"]
243
+ d1["Matching scope OR\ntouches project files"]
244
+ d2["Scope: OMITTED\n(redundant)"]
245
+ end
246
+
247
+ subgraph indirect["INDIRECT"]
248
+ i1["Dependency changes OR\ninfrastructure changes"]
249
+ i2["Scope: PRESERVED\n(context)"]
250
+ end
251
+
252
+ subgraph excluded["EXCLUDED"]
253
+ e1["Unrelated to project"]
254
+ e2["Not in CHANGELOG"]
255
+ end
256
+
257
+ direct --> changelog["Project CHANGELOG"]
258
+ indirect --> changelog
259
+
260
+ style direct fill:#c8e6c9
261
+ style indirect fill:#fff3e0
262
+ style excluded fill:#ffcdd2
263
+ style engine fill:#e3f2fd
264
+ ```
265
+
217
266
  ---
218
267
 
219
268
  ## Core Types
package/CHANGELOG.md CHANGED
@@ -2,34 +2,34 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## 0.1.0 - 2026-03-16
5
+ ## [0.2.0](https://github.com/AndrewRedican/hyperfrontend/compare/a9185d9b783d7d8d51cc4ad91eb3178eba3e3930...bdcdfe00e5c9680e7a1eb925ef69997601d0f393) - 2026-03-20
6
6
 
7
7
  ### Features
8
8
 
9
- - **lib-versioning:** support commit amend no edit
10
- - **lib-versioning:** support force bump with release as config
11
- - **tool-package:** improve memory management and visibility on builder executor
12
- - **eslint-rules:** lib-ts-config-paths
13
- - **e2e-lib-versioning:** test cjs and esm builds
14
- - **eslint-rules:** lib-e2e-project-required
15
- - **lib-versioning:** implement project versioning
16
- - **eslint-rules:** ensure publishable libraries accounted for in docs
17
- - **eslint-rules:** add rule to ensure pipeline is ready for publishable libraries
18
- - **eslint-rules:** root readme.md rule to ensure packages are listed
19
- - **eslint-rules:** rules to align readme.md content format
20
- - **docs-site:** add project-scope
21
- - **tool-package:** build executor now takes unpkg and jsdelivr configuration
22
- - **lib-json-utils:** regex pattern safety
23
- - **eslint-rules:** no-unsafe-regex
24
- - **eslint-rules:** no-deprecated-tag
25
- - **lib-project-scope:** complete implementation
9
+ - support commit existence verification
10
+ - track commits to project dependencies
11
+ - support of indirect infra changes tht may be consider for semantic versioning
12
+ - add core commit classification engine
13
+ - git client now supports get remote url
14
+ - support remote repository url comparison
15
+ - support remote repository url parsing
16
+ - support repository models
17
+ - support jscutlery/semver style changelog entries
26
18
 
27
19
  ### Bug Fixes
28
20
 
29
- - **lib-versioning:** remove unused %h format causing git log field misalignment
30
- - **lib-immutable-api-utils:** rename safe object to prevent variable shadowing on cjs module init
31
- - **@hyperfrontend/workspace:** prevent changelog corruption in pr ci
21
+ - idempotently update pre-existing unpublished change log entry
22
+ - update calculate bump process to account for unpublished versions
32
23
 
33
- ### Other
24
+ ## 0.1.0 - 2026-03-16
25
+
26
+ ### Features
34
27
 
35
- - **eslint-rules:** disable angle bracket typecasting on eslint-rules project
28
+ - support commit amend no edit
29
+ - support force bump with release as config
30
+ - implement project versioning
31
+
32
+ ### Bug Fixes
33
+
34
+ - remove unused %h format causing git log field misalignment
35
+ - **@hyperfrontend/workspace:** prevent changelog corruption in pr ci
package/README.md CHANGED
@@ -45,6 +45,8 @@ Versioning library with changelog parsing, conventional commits, and semver flow
45
45
  - **Conventional Commits** - Parse commit messages following the conventional commits specification
46
46
  - **Semver Utilities** - Parse, compare, increment, and validate semantic versions
47
47
  - **Registry Client** - Query npm registry for published versions and package metadata
48
+ - **Compare URLs** - Generate platform-specific compare URLs for changelog entries (GitHub, GitLab, Bitbucket, Azure DevOps)
49
+ - **Monorepo Scope Filtering** - Intelligent commit classification ensures changelogs only include relevant commits
48
50
  - **Composable Operations** - Build complex versioning workflows from simple, pure functions
49
51
  - **Zero External Dependencies** - Self-contained implementation with no third-party runtime dependencies
50
52
 
@@ -151,15 +153,16 @@ console.log(commit2.breakingDescription) // 'Response structure has changed'
151
153
 
152
154
  ## Module Documentation
153
155
 
154
- | Module | Description | Documentation |
155
- | ------------ | --------------------------------------- | ----------------------------------- |
156
- | `changelog/` | Parse and manipulate CHANGELOG.md files | [README](./src/changelog/README.md) |
157
- | `commits/` | Parse conventional commit messages | [README](./src/commits/README.md) |
158
- | `semver/` | Semantic version parsing and comparison | [README](./src/semver/README.md) |
159
- | `registry/` | npm registry client | [README](./src/registry/README.md) |
160
- | `git/` | Git operations abstraction | [README](./src/git/README.md) |
161
- | `workspace/` | Project discovery and package.json | [README](./src/workspace/README.md) |
162
- | `flow/` | Version release workflow orchestration | [README](./src/flow/README.md) |
156
+ | Module | Description | Documentation |
157
+ | ------------- | --------------------------------------- | ------------------------------------ |
158
+ | `changelog/` | Parse and manipulate CHANGELOG.md files | [README](./src/changelog/README.md) |
159
+ | `commits/` | Parse conventional commit messages | [README](./src/commits/README.md) |
160
+ | `semver/` | Semantic version parsing and comparison | [README](./src/semver/README.md) |
161
+ | `registry/` | npm registry client | [README](./src/registry/README.md) |
162
+ | `git/` | Git operations abstraction | [README](./src/git/README.md) |
163
+ | `workspace/` | Project discovery and package.json | [README](./src/workspace/README.md) |
164
+ | `flow/` | Version release workflow orchestration | [README](./src/flow/README.md) |
165
+ | `repository/` | Repository detection and compare URLs | [README](./src/repository/README.md) |
163
166
 
164
167
  👉 See [ARCHITECTURE.md](./ARCHITECTURE.md) for module composition diagrams and data flow.
165
168
 
@@ -72,6 +72,8 @@ function createChangelogItem(description, options) {
72
72
  commits: options?.commits ?? [],
73
73
  references: options?.references ?? [],
74
74
  breaking: options?.breaking ?? false,
75
+ source: options?.source,
76
+ indirect: options?.indirect,
75
77
  };
76
78
  }
77
79
  /**
@@ -2086,6 +2088,25 @@ function parseVersionFromHeading(heading) {
2086
2088
  if (trimmed[pos] === ']') {
2087
2089
  pos++;
2088
2090
  }
2091
+ // Handle markdown link format [version](url) - jscutlery/semver style
2092
+ // This extracts the compare URL from patterns like [0.0.4](https://github.com/.../compare/...)
2093
+ if (trimmed[pos] === '(') {
2094
+ const urlStart = pos + 1;
2095
+ let depth = 1;
2096
+ pos++;
2097
+ // Find matching closing parenthesis (handles nested parens in URLs)
2098
+ while (pos < trimmed.length && depth > 0) {
2099
+ if (trimmed[pos] === '(')
2100
+ depth++;
2101
+ else if (trimmed[pos] === ')')
2102
+ depth--;
2103
+ pos++;
2104
+ }
2105
+ // Extract URL if we found the closing paren
2106
+ if (depth === 0) {
2107
+ compareUrl = trimmed.slice(urlStart, pos - 1);
2108
+ }
2109
+ }
2089
2110
  // Skip whitespace and separator
2090
2111
  while (pos < trimmed.length && (trimmed[pos] === ' ' || trimmed[pos] === '-' || trimmed[pos] === '–')) {
2091
2112
  pos++;
@@ -2102,8 +2123,8 @@ function parseVersionFromHeading(heading) {
2102
2123
  while (pos < trimmed.length && trimmed[pos] === ' ') {
2103
2124
  pos++;
2104
2125
  }
2105
- // Check for link at end: [compare](url)
2106
- if (pos < trimmed.length) {
2126
+ // Check for link at end: [compare](url) - only if no URL was already extracted
2127
+ if (pos < trimmed.length && !compareUrl) {
2107
2128
  const linkMatch = extractLink(trimmed.slice(pos));
2108
2129
  if (linkMatch?.url) {
2109
2130
  compareUrl = linkMatch.url;