@hyperfrontend/versioning/flow/executorexecutor
Flow execution engine: runs a VersionFlow end-to-end with dry-run, validation, and structured result reporting.
executeFlow walks the steps of a flow in declared order, invoking each step's executor with the current FlowContext, threading state through FlowStepResult[], and short-circuiting on the first failed step (or on the first step whose condition opts out). dryRun performs the same traversal but instructs each step to report what it would do without performing side effects — useful for validating release plans before publishing. validateFlow walks the flow definition only (not the runtime context) and surfaces structural problems such as duplicate step IDs, missing dependencies, or invalid configuration.
API Reference
ƒ Functions
dryRun(flow: VersionFlow, projectName: string, workspaceRoot: string, options: Omit<ExecuteOptions, "dryRun">): Promise<FlowResult>
Convenience wrapper that sets dryRun: true.
Parameters
Returns
Promise<FlowResult>Example
Previewing version changes without modifying files
import { dryRun, createConventionalFlow } from '@hyperfrontend/versioning'
const flow = createConventionalFlow()
const result = await dryRun(flow, 'my-lib', '/workspace')
// Preview what would happen
console.log('Would bump to:', result.state.nextVersion)
// No files modified, no git operations performedexecuteFlow(flow: VersionFlow, projectName: string, workspaceRoot: string, options: ExecuteOptions): Promise<FlowResult>
This is the main entry point for running a versioning workflow. Steps are executed in order, with state accumulated between steps.
Parameters
Returns
Promise<FlowResult>Example
Executing a conventional version flow
import { createConventionalFlow, executeFlow } from '@hyperfrontend/versioning'
const flow = createConventionalFlow({ dryRun: true })
const result = await executeFlow(flow, 'lib-utils', '/path/to/workspace')
console.log(result.summary)
// "Flow success in 234ms: 8 completed, 0 skipped, 0 failed. Version: 1.2.3 → 1.3.0"Checks for:
- Duplicate step IDs
- Invalid dependency references
- Circular dependencies
Parameters
| Name | Type | Description |
|---|---|---|
§flow | VersionFlow | The flow to validate |
Returns
unknownExample
Validating a flow before execution
import { validateFlow, createConventionalFlow } from '@hyperfrontend/versioning'
const flow = createConventionalFlow()
const errors = validateFlow(flow)
if (errors.length > 0) {
console.error('Invalid flow:', errors)
}
// => []◈ Interfaces
Properties
projectRoot?:string— rollbackOnFailure?:boolean— When true (default), pending VFS changes are discarded when a step fails and
continueOnError is false. This ensures no partial state remains.