@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.
- package/ARCHITECTURE.md +50 -1
- package/CHANGELOG.md +23 -23
- package/README.md +12 -9
- package/changelog/index.cjs.js +23 -2
- package/changelog/index.cjs.js.map +1 -1
- package/changelog/index.esm.js +23 -2
- package/changelog/index.esm.js.map +1 -1
- package/changelog/models/entry.d.ts +5 -0
- package/changelog/models/entry.d.ts.map +1 -1
- package/changelog/models/index.cjs.js +2 -0
- package/changelog/models/index.cjs.js.map +1 -1
- package/changelog/models/index.esm.js +2 -0
- package/changelog/models/index.esm.js.map +1 -1
- package/changelog/operations/index.cjs.js.map +1 -1
- package/changelog/operations/index.esm.js.map +1 -1
- package/changelog/parse/index.cjs.js +23 -2
- package/changelog/parse/index.cjs.js.map +1 -1
- package/changelog/parse/index.esm.js +23 -2
- package/changelog/parse/index.esm.js.map +1 -1
- package/changelog/parse/line.d.ts.map +1 -1
- package/commits/classify/classifier.d.ts +73 -0
- package/commits/classify/classifier.d.ts.map +1 -0
- package/commits/classify/index.cjs.js +705 -0
- package/commits/classify/index.cjs.js.map +1 -0
- package/commits/classify/index.d.ts +8 -0
- package/commits/classify/index.d.ts.map +1 -0
- package/commits/classify/index.esm.js +678 -0
- package/commits/classify/index.esm.js.map +1 -0
- package/commits/classify/infrastructure.d.ts +205 -0
- package/commits/classify/infrastructure.d.ts.map +1 -0
- package/commits/classify/models.d.ts +108 -0
- package/commits/classify/models.d.ts.map +1 -0
- package/commits/classify/project-scopes.d.ts +59 -0
- package/commits/classify/project-scopes.d.ts.map +1 -0
- package/commits/index.cjs.js +702 -0
- package/commits/index.cjs.js.map +1 -1
- package/commits/index.d.ts +1 -0
- package/commits/index.d.ts.map +1 -1
- package/commits/index.esm.js +677 -1
- package/commits/index.esm.js.map +1 -1
- package/flow/executor/execute.d.ts +6 -0
- package/flow/executor/execute.d.ts.map +1 -1
- package/flow/executor/index.cjs.js +1604 -42
- package/flow/executor/index.cjs.js.map +1 -1
- package/flow/executor/index.esm.js +1610 -48
- package/flow/executor/index.esm.js.map +1 -1
- package/flow/index.cjs.js +6651 -2893
- package/flow/index.cjs.js.map +1 -1
- package/flow/index.esm.js +6655 -2899
- package/flow/index.esm.js.map +1 -1
- package/flow/models/index.cjs.js +125 -0
- package/flow/models/index.cjs.js.map +1 -1
- package/flow/models/index.esm.js +125 -0
- package/flow/models/index.esm.js.map +1 -1
- package/flow/models/types.d.ts +148 -3
- package/flow/models/types.d.ts.map +1 -1
- package/flow/presets/conventional.d.ts +9 -8
- package/flow/presets/conventional.d.ts.map +1 -1
- package/flow/presets/independent.d.ts.map +1 -1
- package/flow/presets/index.cjs.js +3588 -298
- package/flow/presets/index.cjs.js.map +1 -1
- package/flow/presets/index.esm.js +3588 -298
- package/flow/presets/index.esm.js.map +1 -1
- package/flow/presets/synced.d.ts.map +1 -1
- package/flow/steps/analyze-commits.d.ts +9 -6
- package/flow/steps/analyze-commits.d.ts.map +1 -1
- package/flow/steps/calculate-bump.d.ts.map +1 -1
- package/flow/steps/fetch-registry.d.ts.map +1 -1
- package/flow/steps/generate-changelog.d.ts.map +1 -1
- package/flow/steps/index.cjs.js +3604 -318
- package/flow/steps/index.cjs.js.map +1 -1
- package/flow/steps/index.d.ts +1 -0
- package/flow/steps/index.d.ts.map +1 -1
- package/flow/steps/index.esm.js +3603 -319
- package/flow/steps/index.esm.js.map +1 -1
- package/flow/steps/resolve-repository.d.ts +36 -0
- package/flow/steps/resolve-repository.d.ts.map +1 -0
- package/flow/steps/update-packages.d.ts.map +1 -1
- package/git/factory.d.ts +14 -0
- package/git/factory.d.ts.map +1 -1
- package/git/index.cjs.js +65 -0
- package/git/index.cjs.js.map +1 -1
- package/git/index.esm.js +66 -2
- package/git/index.esm.js.map +1 -1
- package/git/operations/index.cjs.js +40 -0
- package/git/operations/index.cjs.js.map +1 -1
- package/git/operations/index.d.ts +1 -1
- package/git/operations/index.d.ts.map +1 -1
- package/git/operations/index.esm.js +41 -2
- package/git/operations/index.esm.js.map +1 -1
- package/git/operations/log.d.ts +23 -0
- package/git/operations/log.d.ts.map +1 -1
- package/index.cjs.js +6962 -4413
- package/index.cjs.js.map +1 -1
- package/index.esm.js +6964 -4415
- package/index.esm.js.map +1 -1
- package/package.json +26 -1
- package/registry/index.cjs.js +3 -3
- package/registry/index.cjs.js.map +1 -1
- package/registry/index.esm.js +3 -3
- package/registry/index.esm.js.map +1 -1
- package/registry/models/index.cjs.js +2 -0
- package/registry/models/index.cjs.js.map +1 -1
- package/registry/models/index.esm.js +2 -0
- package/registry/models/index.esm.js.map +1 -1
- package/registry/models/version-info.d.ts +10 -0
- package/registry/models/version-info.d.ts.map +1 -1
- package/registry/npm/client.d.ts.map +1 -1
- package/registry/npm/index.cjs.js +1 -3
- package/registry/npm/index.cjs.js.map +1 -1
- package/registry/npm/index.esm.js +1 -3
- package/registry/npm/index.esm.js.map +1 -1
- package/repository/index.cjs.js +998 -0
- package/repository/index.cjs.js.map +1 -0
- package/repository/index.d.ts +4 -0
- package/repository/index.d.ts.map +1 -0
- package/repository/index.esm.js +981 -0
- package/repository/index.esm.js.map +1 -0
- package/repository/models/index.cjs.js +301 -0
- package/repository/models/index.cjs.js.map +1 -0
- package/repository/models/index.d.ts +7 -0
- package/repository/models/index.d.ts.map +1 -0
- package/repository/models/index.esm.js +290 -0
- package/repository/models/index.esm.js.map +1 -0
- package/repository/models/platform.d.ts +58 -0
- package/repository/models/platform.d.ts.map +1 -0
- package/repository/models/repository-config.d.ts +132 -0
- package/repository/models/repository-config.d.ts.map +1 -0
- package/repository/models/resolution.d.ts +121 -0
- package/repository/models/resolution.d.ts.map +1 -0
- package/repository/parse/index.cjs.js +755 -0
- package/repository/parse/index.cjs.js.map +1 -0
- package/repository/parse/index.d.ts +5 -0
- package/repository/parse/index.d.ts.map +1 -0
- package/repository/parse/index.esm.js +749 -0
- package/repository/parse/index.esm.js.map +1 -0
- package/repository/parse/package-json.d.ts +100 -0
- package/repository/parse/package-json.d.ts.map +1 -0
- package/repository/parse/url.d.ts +81 -0
- package/repository/parse/url.d.ts.map +1 -0
- package/repository/url/compare.d.ts +84 -0
- package/repository/url/compare.d.ts.map +1 -0
- package/repository/url/index.cjs.js +178 -0
- package/repository/url/index.cjs.js.map +1 -0
- package/repository/url/index.d.ts +3 -0
- package/repository/url/index.d.ts.map +1 -0
- package/repository/url/index.esm.js +176 -0
- package/repository/url/index.esm.js.map +1 -0
- package/workspace/discovery/index.cjs.js +324 -330
- package/workspace/discovery/index.cjs.js.map +1 -1
- package/workspace/discovery/index.esm.js +324 -330
- package/workspace/discovery/index.esm.js.map +1 -1
- package/workspace/discovery/packages.d.ts +0 -6
- package/workspace/discovery/packages.d.ts.map +1 -1
- package/workspace/index.cjs.js +0 -6
- package/workspace/index.cjs.js.map +1 -1
- package/workspace/index.esm.js +0 -6
- 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(
|
|
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.
|
|
5
|
+
## [0.2.0](https://github.com/AndrewRedican/hyperfrontend/compare/a9185d9b783d7d8d51cc4ad91eb3178eba3e3930...bdcdfe00e5c9680e7a1eb925ef69997601d0f393) - 2026-03-20
|
|
6
6
|
|
|
7
7
|
### Features
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
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
|
-
-
|
|
30
|
-
-
|
|
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
|
-
|
|
24
|
+
## 0.1.0 - 2026-03-16
|
|
25
|
+
|
|
26
|
+
### Features
|
|
34
27
|
|
|
35
|
-
-
|
|
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
|
|
155
|
-
|
|
|
156
|
-
| `changelog/`
|
|
157
|
-
| `commits/`
|
|
158
|
-
| `semver/`
|
|
159
|
-
| `registry/`
|
|
160
|
-
| `git/`
|
|
161
|
-
| `workspace/`
|
|
162
|
-
| `flow/`
|
|
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
|
|
package/changelog/index.cjs.js
CHANGED
|
@@ -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;
|