@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.
- package/ARCHITECTURE.md +593 -0
- package/CHANGELOG.md +35 -0
- package/FUNDING.md +141 -0
- package/LICENSE.md +21 -0
- package/README.md +195 -0
- package/SECURITY.md +82 -0
- package/changelog/compare/diff.d.ts +128 -0
- package/changelog/compare/diff.d.ts.map +1 -0
- package/changelog/compare/index.cjs.js +628 -0
- package/changelog/compare/index.cjs.js.map +1 -0
- package/changelog/compare/index.d.ts +4 -0
- package/changelog/compare/index.d.ts.map +1 -0
- package/changelog/compare/index.esm.js +612 -0
- package/changelog/compare/index.esm.js.map +1 -0
- package/changelog/compare/is-equal.d.ts +114 -0
- package/changelog/compare/is-equal.d.ts.map +1 -0
- package/changelog/index.cjs.js +6448 -0
- package/changelog/index.cjs.js.map +1 -0
- package/changelog/index.d.ts +6 -0
- package/changelog/index.d.ts.map +1 -0
- package/changelog/index.esm.js +6358 -0
- package/changelog/index.esm.js.map +1 -0
- package/changelog/models/changelog.d.ts +86 -0
- package/changelog/models/changelog.d.ts.map +1 -0
- package/changelog/models/commit-ref.d.ts +51 -0
- package/changelog/models/commit-ref.d.ts.map +1 -0
- package/changelog/models/entry.d.ts +84 -0
- package/changelog/models/entry.d.ts.map +1 -0
- package/changelog/models/index.cjs.js +2043 -0
- package/changelog/models/index.cjs.js.map +1 -0
- package/changelog/models/index.d.ts +11 -0
- package/changelog/models/index.d.ts.map +1 -0
- package/changelog/models/index.esm.js +2026 -0
- package/changelog/models/index.esm.js.map +1 -0
- package/changelog/models/schema.d.ts +68 -0
- package/changelog/models/schema.d.ts.map +1 -0
- package/changelog/models/section.d.ts +25 -0
- package/changelog/models/section.d.ts.map +1 -0
- package/changelog/operations/add-entry.d.ts +56 -0
- package/changelog/operations/add-entry.d.ts.map +1 -0
- package/changelog/operations/add-item.d.ts +18 -0
- package/changelog/operations/add-item.d.ts.map +1 -0
- package/changelog/operations/filter-by-predicate.d.ts +81 -0
- package/changelog/operations/filter-by-predicate.d.ts.map +1 -0
- package/changelog/operations/filter-by-range.d.ts +63 -0
- package/changelog/operations/filter-by-range.d.ts.map +1 -0
- package/changelog/operations/filter-entries.d.ts +9 -0
- package/changelog/operations/filter-entries.d.ts.map +1 -0
- package/changelog/operations/index.cjs.js +2455 -0
- package/changelog/operations/index.cjs.js.map +1 -0
- package/changelog/operations/index.d.ts +15 -0
- package/changelog/operations/index.d.ts.map +1 -0
- package/changelog/operations/index.esm.js +2411 -0
- package/changelog/operations/index.esm.js.map +1 -0
- package/changelog/operations/merge.d.ts +88 -0
- package/changelog/operations/merge.d.ts.map +1 -0
- package/changelog/operations/remove-entry.d.ts +45 -0
- package/changelog/operations/remove-entry.d.ts.map +1 -0
- package/changelog/operations/remove-section.d.ts +50 -0
- package/changelog/operations/remove-section.d.ts.map +1 -0
- package/changelog/operations/transform.d.ts +143 -0
- package/changelog/operations/transform.d.ts.map +1 -0
- package/changelog/parse/index.cjs.js +1282 -0
- package/changelog/parse/index.cjs.js.map +1 -0
- package/changelog/parse/index.d.ts +5 -0
- package/changelog/parse/index.d.ts.map +1 -0
- package/changelog/parse/index.esm.js +1275 -0
- package/changelog/parse/index.esm.js.map +1 -0
- package/changelog/parse/line.d.ts +48 -0
- package/changelog/parse/line.d.ts.map +1 -0
- package/changelog/parse/parser.d.ts +16 -0
- package/changelog/parse/parser.d.ts.map +1 -0
- package/changelog/parse/tokenizer.d.ts +49 -0
- package/changelog/parse/tokenizer.d.ts.map +1 -0
- package/changelog/serialize/index.cjs.js +574 -0
- package/changelog/serialize/index.cjs.js.map +1 -0
- package/changelog/serialize/index.d.ts +6 -0
- package/changelog/serialize/index.d.ts.map +1 -0
- package/changelog/serialize/index.esm.js +564 -0
- package/changelog/serialize/index.esm.js.map +1 -0
- package/changelog/serialize/templates.d.ts +81 -0
- package/changelog/serialize/templates.d.ts.map +1 -0
- package/changelog/serialize/to-json.d.ts +57 -0
- package/changelog/serialize/to-json.d.ts.map +1 -0
- package/changelog/serialize/to-string.d.ts +30 -0
- package/changelog/serialize/to-string.d.ts.map +1 -0
- package/commits/index.cjs.js +648 -0
- package/commits/index.cjs.js.map +1 -0
- package/commits/index.d.ts +3 -0
- package/commits/index.d.ts.map +1 -0
- package/commits/index.esm.js +629 -0
- package/commits/index.esm.js.map +1 -0
- package/commits/models/breaking.d.ts +39 -0
- package/commits/models/breaking.d.ts.map +1 -0
- package/commits/models/commit-type.d.ts +32 -0
- package/commits/models/commit-type.d.ts.map +1 -0
- package/commits/models/conventional.d.ts +49 -0
- package/commits/models/conventional.d.ts.map +1 -0
- package/commits/models/index.cjs.js +207 -0
- package/commits/models/index.cjs.js.map +1 -0
- package/commits/models/index.d.ts +7 -0
- package/commits/models/index.d.ts.map +1 -0
- package/commits/models/index.esm.js +193 -0
- package/commits/models/index.esm.js.map +1 -0
- package/commits/parse/body.d.ts +18 -0
- package/commits/parse/body.d.ts.map +1 -0
- package/commits/parse/footer.d.ts +16 -0
- package/commits/parse/footer.d.ts.map +1 -0
- package/commits/parse/header.d.ts +15 -0
- package/commits/parse/header.d.ts.map +1 -0
- package/commits/parse/index.cjs.js +505 -0
- package/commits/parse/index.cjs.js.map +1 -0
- package/commits/parse/index.d.ts +5 -0
- package/commits/parse/index.d.ts.map +1 -0
- package/commits/parse/index.esm.js +499 -0
- package/commits/parse/index.esm.js.map +1 -0
- package/commits/parse/message.d.ts +17 -0
- package/commits/parse/message.d.ts.map +1 -0
- package/commits/utils/replace-char.d.ts +19 -0
- package/commits/utils/replace-char.d.ts.map +1 -0
- package/flow/executor/execute.d.ts +72 -0
- package/flow/executor/execute.d.ts.map +1 -0
- package/flow/executor/index.cjs.js +4402 -0
- package/flow/executor/index.cjs.js.map +1 -0
- package/flow/executor/index.d.ts +3 -0
- package/flow/executor/index.d.ts.map +1 -0
- package/flow/executor/index.esm.js +4398 -0
- package/flow/executor/index.esm.js.map +1 -0
- package/flow/factory.d.ts +58 -0
- package/flow/factory.d.ts.map +1 -0
- package/flow/index.cjs.js +8506 -0
- package/flow/index.cjs.js.map +1 -0
- package/flow/index.d.ts +7 -0
- package/flow/index.d.ts.map +1 -0
- package/flow/index.esm.js +8451 -0
- package/flow/index.esm.js.map +1 -0
- package/flow/models/flow.d.ts +130 -0
- package/flow/models/flow.d.ts.map +1 -0
- package/flow/models/index.cjs.js +285 -0
- package/flow/models/index.cjs.js.map +1 -0
- package/flow/models/index.d.ts +7 -0
- package/flow/models/index.d.ts.map +1 -0
- package/flow/models/index.esm.js +268 -0
- package/flow/models/index.esm.js.map +1 -0
- package/flow/models/step.d.ts +108 -0
- package/flow/models/step.d.ts.map +1 -0
- package/flow/models/types.d.ts +150 -0
- package/flow/models/types.d.ts.map +1 -0
- package/flow/presets/conventional.d.ts +59 -0
- package/flow/presets/conventional.d.ts.map +1 -0
- package/flow/presets/independent.d.ts +61 -0
- package/flow/presets/independent.d.ts.map +1 -0
- package/flow/presets/index.cjs.js +3903 -0
- package/flow/presets/index.cjs.js.map +1 -0
- package/flow/presets/index.d.ts +4 -0
- package/flow/presets/index.d.ts.map +1 -0
- package/flow/presets/index.esm.js +3889 -0
- package/flow/presets/index.esm.js.map +1 -0
- package/flow/presets/synced.d.ts +65 -0
- package/flow/presets/synced.d.ts.map +1 -0
- package/flow/steps/analyze-commits.d.ts +19 -0
- package/flow/steps/analyze-commits.d.ts.map +1 -0
- package/flow/steps/calculate-bump.d.ts +27 -0
- package/flow/steps/calculate-bump.d.ts.map +1 -0
- package/flow/steps/create-commit.d.ts +16 -0
- package/flow/steps/create-commit.d.ts.map +1 -0
- package/flow/steps/create-tag.d.ts +22 -0
- package/flow/steps/create-tag.d.ts.map +1 -0
- package/flow/steps/fetch-registry.d.ts +19 -0
- package/flow/steps/fetch-registry.d.ts.map +1 -0
- package/flow/steps/generate-changelog.d.ts +25 -0
- package/flow/steps/generate-changelog.d.ts.map +1 -0
- package/flow/steps/index.cjs.js +3523 -0
- package/flow/steps/index.cjs.js.map +1 -0
- package/flow/steps/index.d.ts +8 -0
- package/flow/steps/index.d.ts.map +1 -0
- package/flow/steps/index.esm.js +3504 -0
- package/flow/steps/index.esm.js.map +1 -0
- package/flow/steps/update-packages.d.ts +25 -0
- package/flow/steps/update-packages.d.ts.map +1 -0
- package/flow/utils/interpolate.d.ts +11 -0
- package/flow/utils/interpolate.d.ts.map +1 -0
- package/git/factory.d.ts +233 -0
- package/git/factory.d.ts.map +1 -0
- package/git/index.cjs.js +2863 -0
- package/git/index.cjs.js.map +1 -0
- package/git/index.d.ts +5 -0
- package/git/index.d.ts.map +1 -0
- package/git/index.esm.js +2785 -0
- package/git/index.esm.js.map +1 -0
- package/git/models/commit.d.ts +129 -0
- package/git/models/commit.d.ts.map +1 -0
- package/git/models/index.cjs.js +755 -0
- package/git/models/index.cjs.js.map +1 -0
- package/git/models/index.d.ts +7 -0
- package/git/models/index.d.ts.map +1 -0
- package/git/models/index.esm.js +729 -0
- package/git/models/index.esm.js.map +1 -0
- package/git/models/ref.d.ts +120 -0
- package/git/models/ref.d.ts.map +1 -0
- package/git/models/tag.d.ts +141 -0
- package/git/models/tag.d.ts.map +1 -0
- package/git/operations/commit.d.ts +97 -0
- package/git/operations/commit.d.ts.map +1 -0
- package/git/operations/head-info.d.ts +29 -0
- package/git/operations/head-info.d.ts.map +1 -0
- package/git/operations/index.cjs.js +1954 -0
- package/git/operations/index.cjs.js.map +1 -0
- package/git/operations/index.d.ts +14 -0
- package/git/operations/index.d.ts.map +1 -0
- package/git/operations/index.esm.js +1903 -0
- package/git/operations/index.esm.js.map +1 -0
- package/git/operations/log.d.ts +104 -0
- package/git/operations/log.d.ts.map +1 -0
- package/git/operations/manage-tags.d.ts +60 -0
- package/git/operations/manage-tags.d.ts.map +1 -0
- package/git/operations/query-tags.d.ts +88 -0
- package/git/operations/query-tags.d.ts.map +1 -0
- package/git/operations/stage.d.ts +66 -0
- package/git/operations/stage.d.ts.map +1 -0
- package/git/operations/status.d.ts +173 -0
- package/git/operations/status.d.ts.map +1 -0
- package/index.cjs.js +16761 -0
- package/index.cjs.js.map +1 -0
- package/index.d.ts +102 -0
- package/index.d.ts.map +1 -0
- package/index.esm.js +16427 -0
- package/index.esm.js.map +1 -0
- package/package.json +200 -0
- package/registry/factory.d.ts +18 -0
- package/registry/factory.d.ts.map +1 -0
- package/registry/index.cjs.js +543 -0
- package/registry/index.cjs.js.map +1 -0
- package/registry/index.d.ts +5 -0
- package/registry/index.d.ts.map +1 -0
- package/registry/index.esm.js +535 -0
- package/registry/index.esm.js.map +1 -0
- package/registry/models/index.cjs.js +69 -0
- package/registry/models/index.cjs.js.map +1 -0
- package/registry/models/index.d.ts +6 -0
- package/registry/models/index.d.ts.map +1 -0
- package/registry/models/index.esm.js +66 -0
- package/registry/models/index.esm.js.map +1 -0
- package/registry/models/package-info.d.ts +55 -0
- package/registry/models/package-info.d.ts.map +1 -0
- package/registry/models/registry.d.ts +62 -0
- package/registry/models/registry.d.ts.map +1 -0
- package/registry/models/version-info.d.ts +67 -0
- package/registry/models/version-info.d.ts.map +1 -0
- package/registry/npm/cache.d.ts +50 -0
- package/registry/npm/cache.d.ts.map +1 -0
- package/registry/npm/client.d.ts +30 -0
- package/registry/npm/client.d.ts.map +1 -0
- package/registry/npm/index.cjs.js +456 -0
- package/registry/npm/index.cjs.js.map +1 -0
- package/registry/npm/index.d.ts +4 -0
- package/registry/npm/index.d.ts.map +1 -0
- package/registry/npm/index.esm.js +451 -0
- package/registry/npm/index.esm.js.map +1 -0
- package/semver/compare/compare.d.ts +100 -0
- package/semver/compare/compare.d.ts.map +1 -0
- package/semver/compare/index.cjs.js +386 -0
- package/semver/compare/index.cjs.js.map +1 -0
- package/semver/compare/index.d.ts +3 -0
- package/semver/compare/index.d.ts.map +1 -0
- package/semver/compare/index.esm.js +370 -0
- package/semver/compare/index.esm.js.map +1 -0
- package/semver/compare/sort.d.ts +36 -0
- package/semver/compare/sort.d.ts.map +1 -0
- package/semver/format/index.cjs.js +58 -0
- package/semver/format/index.cjs.js.map +1 -0
- package/semver/format/index.d.ts +2 -0
- package/semver/format/index.d.ts.map +1 -0
- package/semver/format/index.esm.js +53 -0
- package/semver/format/index.esm.js.map +1 -0
- package/semver/format/to-string.d.ts +31 -0
- package/semver/format/to-string.d.ts.map +1 -0
- package/semver/increment/bump.d.ts +37 -0
- package/semver/increment/bump.d.ts.map +1 -0
- package/semver/increment/index.cjs.js +223 -0
- package/semver/increment/index.cjs.js.map +1 -0
- package/semver/increment/index.d.ts +2 -0
- package/semver/increment/index.d.ts.map +1 -0
- package/semver/increment/index.esm.js +219 -0
- package/semver/increment/index.esm.js.map +1 -0
- package/semver/index.cjs.js +1499 -0
- package/semver/index.cjs.js.map +1 -0
- package/semver/index.d.ts +6 -0
- package/semver/index.d.ts.map +1 -0
- package/semver/index.esm.js +1458 -0
- package/semver/index.esm.js.map +1 -0
- package/semver/models/index.cjs.js +153 -0
- package/semver/models/index.cjs.js.map +1 -0
- package/semver/models/index.d.ts +5 -0
- package/semver/models/index.d.ts.map +1 -0
- package/semver/models/index.esm.js +139 -0
- package/semver/models/index.esm.js.map +1 -0
- package/semver/models/range.d.ts +83 -0
- package/semver/models/range.d.ts.map +1 -0
- package/semver/models/version.d.ts +78 -0
- package/semver/models/version.d.ts.map +1 -0
- package/semver/parse/index.cjs.js +799 -0
- package/semver/parse/index.cjs.js.map +1 -0
- package/semver/parse/index.d.ts +5 -0
- package/semver/parse/index.d.ts.map +1 -0
- package/semver/parse/index.esm.js +793 -0
- package/semver/parse/index.esm.js.map +1 -0
- package/semver/parse/range.d.ts +38 -0
- package/semver/parse/range.d.ts.map +1 -0
- package/semver/parse/version.d.ts +49 -0
- package/semver/parse/version.d.ts.map +1 -0
- package/workspace/discovery/changelog-path.d.ts +21 -0
- package/workspace/discovery/changelog-path.d.ts.map +1 -0
- package/workspace/discovery/dependencies.d.ts +145 -0
- package/workspace/discovery/dependencies.d.ts.map +1 -0
- package/workspace/discovery/discover-changelogs.d.ts +76 -0
- package/workspace/discovery/discover-changelogs.d.ts.map +1 -0
- package/workspace/discovery/index.cjs.js +2300 -0
- package/workspace/discovery/index.cjs.js.map +1 -0
- package/workspace/discovery/index.d.ts +13 -0
- package/workspace/discovery/index.d.ts.map +1 -0
- package/workspace/discovery/index.esm.js +2283 -0
- package/workspace/discovery/index.esm.js.map +1 -0
- package/workspace/discovery/packages.d.ts +83 -0
- package/workspace/discovery/packages.d.ts.map +1 -0
- package/workspace/index.cjs.js +4445 -0
- package/workspace/index.cjs.js.map +1 -0
- package/workspace/index.d.ts +52 -0
- package/workspace/index.d.ts.map +1 -0
- package/workspace/index.esm.js +4394 -0
- package/workspace/index.esm.js.map +1 -0
- package/workspace/models/index.cjs.js +284 -0
- package/workspace/models/index.cjs.js.map +1 -0
- package/workspace/models/index.d.ts +10 -0
- package/workspace/models/index.d.ts.map +1 -0
- package/workspace/models/index.esm.js +261 -0
- package/workspace/models/index.esm.js.map +1 -0
- package/workspace/models/project.d.ts +118 -0
- package/workspace/models/project.d.ts.map +1 -0
- package/workspace/models/workspace.d.ts +139 -0
- package/workspace/models/workspace.d.ts.map +1 -0
- package/workspace/operations/batch-update.d.ts +99 -0
- package/workspace/operations/batch-update.d.ts.map +1 -0
- package/workspace/operations/cascade-bump.d.ts +125 -0
- package/workspace/operations/cascade-bump.d.ts.map +1 -0
- package/workspace/operations/index.cjs.js +2675 -0
- package/workspace/operations/index.cjs.js.map +1 -0
- package/workspace/operations/index.d.ts +12 -0
- package/workspace/operations/index.d.ts.map +1 -0
- package/workspace/operations/index.esm.js +2663 -0
- package/workspace/operations/index.esm.js.map +1 -0
- package/workspace/operations/validate.d.ts +85 -0
- package/workspace/operations/validate.d.ts.map +1 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { Logger } from '@hyperfrontend/logging';
|
|
2
|
+
import type { Tree } from '@hyperfrontend/project-scope';
|
|
3
|
+
import type { ChangelogEntry } from '../../changelog/models/entry';
|
|
4
|
+
import type { ConventionalCommit } from '../../commits/models/conventional';
|
|
5
|
+
import type { GitClient } from '../../git/factory';
|
|
6
|
+
import type { Registry } from '../../registry/models/registry';
|
|
7
|
+
import type { BumpType } from '../../semver/models/version';
|
|
8
|
+
export type { Logger } from '@hyperfrontend/logging';
|
|
9
|
+
/**
|
|
10
|
+
* Accumulated state during flow execution.
|
|
11
|
+
* Each step can read previous state and contribute updates.
|
|
12
|
+
*/
|
|
13
|
+
export interface FlowState {
|
|
14
|
+
/** Current/local version from package.json */
|
|
15
|
+
readonly currentVersion?: string;
|
|
16
|
+
/** Published version on registry (null if never published) */
|
|
17
|
+
readonly publishedVersion?: string | null;
|
|
18
|
+
/** Calculated next version */
|
|
19
|
+
readonly nextVersion?: string;
|
|
20
|
+
/** Bump type (major/minor/patch/none) */
|
|
21
|
+
readonly bumpType?: BumpType;
|
|
22
|
+
/** Analyzed commits since last release */
|
|
23
|
+
readonly commits?: readonly ConventionalCommit[];
|
|
24
|
+
/** Tag name that marks the last release */
|
|
25
|
+
readonly lastReleaseTag?: string | null;
|
|
26
|
+
/** Generated changelog entry */
|
|
27
|
+
readonly changelogEntry?: ChangelogEntry;
|
|
28
|
+
/** Files modified during flow execution */
|
|
29
|
+
readonly modifiedFiles?: readonly string[];
|
|
30
|
+
/** Created git commit hash */
|
|
31
|
+
readonly commitHash?: string;
|
|
32
|
+
/** Created git tag name */
|
|
33
|
+
readonly tagName?: string;
|
|
34
|
+
/** Whether this is a first release (no prior versions) */
|
|
35
|
+
readonly isFirstRelease?: boolean;
|
|
36
|
+
/** Additional custom state for extensibility */
|
|
37
|
+
readonly [key: string]: unknown;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Flow configuration options.
|
|
41
|
+
*/
|
|
42
|
+
export interface FlowConfig {
|
|
43
|
+
/** Preset name or custom configuration */
|
|
44
|
+
readonly preset?: 'conventional' | 'independent' | 'synced';
|
|
45
|
+
/** Commit types that trigger releases */
|
|
46
|
+
readonly releaseTypes?: readonly string[];
|
|
47
|
+
/** Commit types that trigger minor bumps */
|
|
48
|
+
readonly minorTypes?: readonly string[];
|
|
49
|
+
/** Commit types that trigger patch bumps */
|
|
50
|
+
readonly patchTypes?: readonly string[];
|
|
51
|
+
/** Skip git operations */
|
|
52
|
+
readonly skipGit?: boolean;
|
|
53
|
+
/** Skip tag creation */
|
|
54
|
+
readonly skipTag?: boolean;
|
|
55
|
+
/** Skip changelog update */
|
|
56
|
+
readonly skipChangelog?: boolean;
|
|
57
|
+
/** Dry run mode - preview changes without applying */
|
|
58
|
+
readonly dryRun?: boolean;
|
|
59
|
+
/** Custom commit message template */
|
|
60
|
+
readonly commitMessage?: string;
|
|
61
|
+
/** Custom tag format */
|
|
62
|
+
readonly tagFormat?: string;
|
|
63
|
+
/** Track dependencies for cascade bumps */
|
|
64
|
+
readonly trackDeps?: boolean;
|
|
65
|
+
/** Branch allowed for releases */
|
|
66
|
+
readonly releaseBranch?: string;
|
|
67
|
+
/** Base version for first release */
|
|
68
|
+
readonly firstReleaseVersion?: string;
|
|
69
|
+
/** Allow prerelease versions */
|
|
70
|
+
readonly allowPrerelease?: boolean;
|
|
71
|
+
/** Prerelease identifier (e.g., 'alpha', 'beta') */
|
|
72
|
+
readonly prereleaseId?: string;
|
|
73
|
+
/** Force a specific bump type, bypassing commit analysis */
|
|
74
|
+
readonly releaseAs?: 'major' | 'minor' | 'patch';
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Default flow configuration values.
|
|
78
|
+
*/
|
|
79
|
+
export declare const DEFAULT_FLOW_CONFIG: Required<FlowConfig>;
|
|
80
|
+
/**
|
|
81
|
+
* Execution context passed to each step.
|
|
82
|
+
* Contains all resources and accumulated state.
|
|
83
|
+
*
|
|
84
|
+
* Note: `state` is mutable within context to allow
|
|
85
|
+
* accumulation, but individual FlowState objects are immutable.
|
|
86
|
+
*/
|
|
87
|
+
export interface FlowContext {
|
|
88
|
+
/** Workspace root path */
|
|
89
|
+
readonly workspaceRoot: string;
|
|
90
|
+
/** Target project name */
|
|
91
|
+
readonly projectName: string;
|
|
92
|
+
/** Project root path */
|
|
93
|
+
readonly projectRoot: string;
|
|
94
|
+
/** Package name from package.json */
|
|
95
|
+
readonly packageName: string;
|
|
96
|
+
/** Virtual file system tree */
|
|
97
|
+
readonly tree: Tree;
|
|
98
|
+
/** Registry client */
|
|
99
|
+
readonly registry: Registry;
|
|
100
|
+
/** Git client */
|
|
101
|
+
readonly git: GitClient;
|
|
102
|
+
/** Logger instance */
|
|
103
|
+
readonly logger: Logger;
|
|
104
|
+
/** Flow configuration */
|
|
105
|
+
readonly config: FlowConfig;
|
|
106
|
+
/** Accumulated state from previous steps (mutable reference) */
|
|
107
|
+
state: FlowState;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Result of a single step execution.
|
|
111
|
+
*/
|
|
112
|
+
export interface FlowStepResult {
|
|
113
|
+
/** Step outcome */
|
|
114
|
+
readonly status: 'success' | 'skipped' | 'failed';
|
|
115
|
+
/** State updates from this step */
|
|
116
|
+
readonly stateUpdates?: Partial<FlowState>;
|
|
117
|
+
/** Descriptive message */
|
|
118
|
+
readonly message?: string;
|
|
119
|
+
/** Error if failed */
|
|
120
|
+
readonly error?: Error;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Step result with step identification.
|
|
124
|
+
*/
|
|
125
|
+
export interface FlowStepResultWithId extends FlowStepResult {
|
|
126
|
+
/** Step identifier */
|
|
127
|
+
readonly stepId: string;
|
|
128
|
+
/** Step display name */
|
|
129
|
+
readonly stepName: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Overall flow execution status.
|
|
133
|
+
*/
|
|
134
|
+
export type FlowStatus = 'success' | 'partial' | 'failed' | 'skipped';
|
|
135
|
+
/**
|
|
136
|
+
* Complete result of flow execution.
|
|
137
|
+
*/
|
|
138
|
+
export interface FlowResult {
|
|
139
|
+
/** Overall flow outcome */
|
|
140
|
+
readonly status: FlowStatus;
|
|
141
|
+
/** Results for each step */
|
|
142
|
+
readonly steps: readonly FlowStepResultWithId[];
|
|
143
|
+
/** Final accumulated state */
|
|
144
|
+
readonly state: FlowState;
|
|
145
|
+
/** Duration in milliseconds */
|
|
146
|
+
readonly duration: number;
|
|
147
|
+
/** Summary message */
|
|
148
|
+
readonly summary: string;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/versioning/src/flow/models/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAG3D,YAAY,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAMpD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,8CAA8C;IAC9C,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAEhC,8DAA8D;IAC9D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEzC,8BAA8B;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAE7B,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;IAE5B,0CAA0C;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;IAEhD,2CAA2C;IAC3C,Q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,CAAA;IAEjD,mCAAmC;IACnC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;IAE1C,0BAA0B;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IAEzB,sBAAsB;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,sBAAsB;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IAEvB,wBAAwB;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAMD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AAErE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,2BAA2B;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAE3B,4BAA4B;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAA;IAE/C,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IAEzB,+BAA+B;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAEzB,sBAAsB;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { VersionFlow } from '../models/flow';
|
|
2
|
+
import type { FlowConfig } from '../models/types';
|
|
3
|
+
/**
|
|
4
|
+
* Default configuration for conventional flow.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CONVENTIONAL_FLOW_CONFIG: FlowConfig;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a conventional flow.
|
|
9
|
+
*
|
|
10
|
+
* This flow follows the standard conventional commits workflow:
|
|
11
|
+
* 1. Fetch published version from registry
|
|
12
|
+
* 2. Analyze commits since last release
|
|
13
|
+
* 3. Calculate version bump based on commit types
|
|
14
|
+
* 4. Check if version already published (idempotency)
|
|
15
|
+
* 5. Generate changelog entry
|
|
16
|
+
* 6. Update package.json version
|
|
17
|
+
* 7. Write changelog to file
|
|
18
|
+
* 8. Create git commit (optional)
|
|
19
|
+
* 9. Create git tag (optional, typically after publish)
|
|
20
|
+
*
|
|
21
|
+
* @param config - Optional configuration overrides
|
|
22
|
+
* @returns A VersionFlow configured for conventional commits
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* import { createConventionalFlow, executeFlow } from '@hyperfrontend/versioning'
|
|
27
|
+
*
|
|
28
|
+
* // Use defaults
|
|
29
|
+
* const flow = createConventionalFlow()
|
|
30
|
+
*
|
|
31
|
+
* // With overrides
|
|
32
|
+
* const customFlow = createConventionalFlow({
|
|
33
|
+
* skipTag: false,
|
|
34
|
+
* releaseTypes: ['feat', 'fix'],
|
|
35
|
+
* })
|
|
36
|
+
*
|
|
37
|
+
* const result = await executeFlow(flow, 'lib-utils', '/workspace')
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function createConventionalFlow(config?: Partial<FlowConfig>): VersionFlow;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a minimal flow for quick releases.
|
|
43
|
+
*
|
|
44
|
+
* Skips changelog and tag creation.
|
|
45
|
+
*
|
|
46
|
+
* @param config - Optional configuration overrides
|
|
47
|
+
* @returns A minimal VersionFlow
|
|
48
|
+
*/
|
|
49
|
+
export declare function createMinimalFlow(config?: Partial<FlowConfig>): VersionFlow;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a changelog-only flow.
|
|
52
|
+
*
|
|
53
|
+
* Only generates changelog, no version bumps or git operations.
|
|
54
|
+
*
|
|
55
|
+
* @param config - Optional configuration overrides
|
|
56
|
+
* @returns A VersionFlow that only updates changelog
|
|
57
|
+
*/
|
|
58
|
+
export declare function createChangelogOnlyFlow(config?: Partial<FlowConfig>): VersionFlow;
|
|
59
|
+
//# sourceMappingURL=conventional.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conventional.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/versioning/src/flow/presets/conventional.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAcjD;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,UAatC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,WAAW,CAsBhF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,WAAW,CAM3E;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,WAAW,CAqBjF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { VersionFlow } from '../models/flow';
|
|
2
|
+
import type { FlowStep } from '../models/step';
|
|
3
|
+
import type { FlowConfig } from '../models/types';
|
|
4
|
+
/**
|
|
5
|
+
* Default configuration for independent flow.
|
|
6
|
+
*/
|
|
7
|
+
export declare const INDEPENDENT_FLOW_CONFIG: FlowConfig;
|
|
8
|
+
/**
|
|
9
|
+
* Creates a step that checks for dependent package bumps.
|
|
10
|
+
*
|
|
11
|
+
* In independent versioning, when a dependency is bumped,
|
|
12
|
+
* dependents may also need version bumps.
|
|
13
|
+
*
|
|
14
|
+
* @returns A FlowStep that checks dependent bumps
|
|
15
|
+
*/
|
|
16
|
+
export declare function createCheckDependentBumpsStep(): FlowStep;
|
|
17
|
+
/**
|
|
18
|
+
* Creates an independent versioning flow.
|
|
19
|
+
*
|
|
20
|
+
* This flow is designed for monorepos where each package
|
|
21
|
+
* is versioned independently:
|
|
22
|
+
*
|
|
23
|
+
* 1. Fetch published version from registry
|
|
24
|
+
* 2. Analyze commits since last release
|
|
25
|
+
* 3. Calculate version bump based on commit types
|
|
26
|
+
* 4. Check for dependent package bumps (cascade)
|
|
27
|
+
* 5. Check if version already published (idempotency)
|
|
28
|
+
* 6. Generate changelog entry
|
|
29
|
+
* 7. Update package.json version
|
|
30
|
+
* 8. Cascade dependency updates
|
|
31
|
+
* 9. Write changelog to file
|
|
32
|
+
* 10. Create git commit
|
|
33
|
+
* 11. Create git tag
|
|
34
|
+
*
|
|
35
|
+
* @param config - Optional configuration overrides
|
|
36
|
+
* @returns A VersionFlow configured for independent versioning
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import { createIndependentFlow, executeFlow } from '@hyperfrontend/versioning'
|
|
41
|
+
*
|
|
42
|
+
* const flow = createIndependentFlow()
|
|
43
|
+
* const result = await executeFlow(flow, 'lib-utils', '/workspace')
|
|
44
|
+
*
|
|
45
|
+
* // Check which dependents were bumped
|
|
46
|
+
* console.log(result.state.cascadedBumps)
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function createIndependentFlow(config?: Partial<FlowConfig>): VersionFlow;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a flow for releasing multiple packages independently.
|
|
52
|
+
*
|
|
53
|
+
* This is a variant that skips commit/tag creation, intended
|
|
54
|
+
* to be used when releasing multiple packages in sequence
|
|
55
|
+
* with a single commit at the end.
|
|
56
|
+
*
|
|
57
|
+
* @param config - Optional configuration overrides
|
|
58
|
+
* @returns A VersionFlow for batch independent releases
|
|
59
|
+
*/
|
|
60
|
+
export declare function createBatchReleaseFlow(config?: Partial<FlowConfig>): VersionFlow;
|
|
61
|
+
//# sourceMappingURL=independent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"independent.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/versioning/src/flow/presets/independent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAiBjD;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,UAIrC,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,IAAI,QAAQ,CAkCxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,WAAW,CAwB/E;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,WAAW,CAuBhF"}
|