@hyperfrontend/versioning 0.1.0 → 0.3.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 +37 -23
- package/README.md +19 -14
- package/changelog/index.cjs.js +38 -6
- package/changelog/index.cjs.js.map +1 -1
- package/changelog/index.esm.js +38 -6
- 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 +85 -6
- package/changelog/parse/index.cjs.js.map +1 -1
- package/changelog/parse/index.esm.js +85 -6
- package/changelog/parse/index.esm.js.map +1 -1
- package/changelog/parse/line.d.ts.map +1 -1
- package/changelog/parse/parser.d.ts +0 -6
- package/changelog/parse/parser.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 +707 -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 +679 -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 +69 -0
- package/commits/classify/project-scopes.d.ts.map +1 -0
- package/commits/index.cjs.js +704 -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 +678 -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 +1617 -43
- package/flow/executor/index.cjs.js.map +1 -1
- package/flow/executor/index.esm.js +1623 -49
- package/flow/executor/index.esm.js.map +1 -1
- package/flow/index.cjs.js +6749 -2938
- package/flow/index.cjs.js.map +1 -1
- package/flow/index.esm.js +6751 -2944
- package/flow/index.esm.js.map +1 -1
- package/flow/models/index.cjs.js +138 -0
- package/flow/models/index.cjs.js.map +1 -1
- package/flow/models/index.d.ts +1 -1
- package/flow/models/index.d.ts.map +1 -1
- package/flow/models/index.esm.js +138 -1
- package/flow/models/index.esm.js.map +1 -1
- package/flow/models/types.d.ts +180 -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 +3641 -303
- package/flow/presets/index.cjs.js.map +1 -1
- package/flow/presets/index.esm.js +3641 -303
- 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 +5 -0
- package/flow/steps/generate-changelog.d.ts.map +1 -1
- package/flow/steps/index.cjs.js +3663 -328
- package/flow/steps/index.cjs.js.map +1 -1
- package/flow/steps/index.d.ts +2 -1
- package/flow/steps/index.d.ts.map +1 -1
- package/flow/steps/index.esm.js +3661 -329
- 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 +7547 -4947
- package/index.cjs.js.map +1 -1
- package/index.d.ts +3 -1
- package/index.d.ts.map +1 -1
- package/index.esm.js +7550 -4954
- package/index.esm.js.map +1 -1
- package/package.json +39 -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/changelog-path.d.ts +3 -7
- package/workspace/discovery/changelog-path.d.ts.map +1 -1
- package/workspace/discovery/index.cjs.js +408 -335
- package/workspace/discovery/index.cjs.js.map +1 -1
- package/workspace/discovery/index.esm.js +408 -335
- 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 +84 -11
- package/workspace/index.cjs.js.map +1 -1
- package/workspace/index.esm.js +84 -11
- package/workspace/index.esm.js.map +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ConventionalCommit } from '../models/conventional';
|
|
2
|
+
import type { ClassificationContext, ClassificationResult, ClassifiedCommit, CommitWithRaw } from './models';
|
|
3
|
+
/**
|
|
4
|
+
* Classifies a single commit against a project.
|
|
5
|
+
*
|
|
6
|
+
* Implements the hybrid classification strategy:
|
|
7
|
+
* 1. Check scope match (fast path)
|
|
8
|
+
* 2. Check file touch (validation/catch-all)
|
|
9
|
+
* 3. Check dependency touch (indirect)
|
|
10
|
+
* 4. Fallback to excluded
|
|
11
|
+
*
|
|
12
|
+
* @param input - The commit to classify
|
|
13
|
+
* @param context - Classification context with project info
|
|
14
|
+
* @returns Classified commit with source attribution
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const classified = classifyCommit(
|
|
18
|
+
* { commit: parsedCommit, raw: gitCommit },
|
|
19
|
+
* { projectScopes: ['versioning'], fileCommitHashes: new Set(['abc123']) }
|
|
20
|
+
* )
|
|
21
|
+
*/
|
|
22
|
+
export declare function classifyCommit(input: CommitWithRaw, context: ClassificationContext): ClassifiedCommit;
|
|
23
|
+
/**
|
|
24
|
+
* Classifies multiple commits against a project.
|
|
25
|
+
*
|
|
26
|
+
* @param commits - Array of commits to classify
|
|
27
|
+
* @param context - Classification context with project info
|
|
28
|
+
* @returns Classification result with all commits and summary
|
|
29
|
+
*/
|
|
30
|
+
export declare function classifyCommits(commits: readonly CommitWithRaw[], context: ClassificationContext): ClassificationResult;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a classification context from common inputs.
|
|
33
|
+
*
|
|
34
|
+
* @param projectScopes - Scopes that match the project
|
|
35
|
+
* @param fileCommitHashes - Set of commit hashes that touched project files
|
|
36
|
+
* @param options - Additional context options
|
|
37
|
+
* @param options.dependencyCommitMap - Map of dependency names to commit hashes touching them
|
|
38
|
+
* @param options.infrastructureCommitHashes - Set of commit hashes touching infrastructure paths
|
|
39
|
+
* @param options.excludeScopes - Scopes to explicitly exclude from classification
|
|
40
|
+
* @param options.includeScopes - Additional scopes to include as direct matches
|
|
41
|
+
* @returns A ClassificationContext object
|
|
42
|
+
*/
|
|
43
|
+
export declare function createClassificationContext(projectScopes: readonly string[], fileCommitHashes: ReadonlySet<string>, options?: {
|
|
44
|
+
readonly dependencyCommitMap?: ReadonlyMap<string, ReadonlySet<string>>;
|
|
45
|
+
readonly infrastructureCommitHashes?: ReadonlySet<string>;
|
|
46
|
+
readonly excludeScopes?: readonly string[];
|
|
47
|
+
readonly includeScopes?: readonly string[];
|
|
48
|
+
}): ClassificationContext;
|
|
49
|
+
/**
|
|
50
|
+
* Filters an array of classified commits to only included ones.
|
|
51
|
+
*
|
|
52
|
+
* @param commits - Array of classified commits
|
|
53
|
+
* @returns Only commits marked for inclusion
|
|
54
|
+
*/
|
|
55
|
+
export declare function filterIncluded(commits: readonly ClassifiedCommit[]): readonly ClassifiedCommit[];
|
|
56
|
+
/**
|
|
57
|
+
* Extracts conventional commits from classified commits for changelog generation.
|
|
58
|
+
*
|
|
59
|
+
* @param commits - Array of classified commits
|
|
60
|
+
* @returns Array of conventional commits
|
|
61
|
+
*/
|
|
62
|
+
export declare function extractConventionalCommits(commits: readonly ClassifiedCommit[]): readonly ConventionalCommit[];
|
|
63
|
+
/**
|
|
64
|
+
* Creates a modified conventional commit with scope handling based on classification.
|
|
65
|
+
*
|
|
66
|
+
* For direct commits, the scope is removed (redundant in project changelog).
|
|
67
|
+
* For indirect commits, the scope is preserved (provides context).
|
|
68
|
+
*
|
|
69
|
+
* @param classified - Commit with classification metadata determining scope display
|
|
70
|
+
* @returns A conventional commit with appropriate scope handling
|
|
71
|
+
*/
|
|
72
|
+
export declare function toChangelogCommit(classified: ClassifiedCommit): ConventionalCommit;
|
|
73
|
+
//# sourceMappingURL=classifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classifier.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/versioning/src/commits/classify/classifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,gBAAgB,EAAgB,aAAa,EAAE,MAAM,UAAU,CAAA;AAI1H;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,qBAAqB,GAAG,gBAAgB,CAyDrG;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,EAAE,OAAO,EAAE,qBAAqB,GAAG,oBAAoB,CAgCvH;AA+DD;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,EACrC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,mBAAmB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAA;IACvE,QAAQ,CAAC,0BAA0B,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACzD,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1C,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC3C,GACA,qBAAqB,CASvB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,GAAG,SAAS,gBAAgB,EAAE,CAEhG;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,GAAG,SAAS,kBAAkB,EAAE,CAE9G;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,gBAAgB,GAAG,kBAAkB,CAclF"}
|