@hyperfrontend/versioning/flow/presets

presets

Pre-configured release flows for the most common monorepo and single-package release strategies.

createConventionalFlow (plus createMinimalFlow and createChangelogOnlyFlow) covers single-package conventional-commit-driven releases. createIndependentFlow and createBatchReleaseFlow cover monorepos where each package versions independently; createCheckDependentBumpsStep is the cascade-bump helper that powers the dependent-package check. createSyncedFlow, createFixedVersionFlow, createSyncAllPackagesStep, and createCombinedChangelogStep cover monorepos that release all packages together at a synced version. Each preset exposes a *_FLOW_CONFIG constant alongside its factory so consumers can read the canonical step list before tweaking.

API Reference

ƒ Functions

§function

createBatchReleaseFlow(config?: Partial<FlowConfig>): VersionFlow

Creates a flow for releasing multiple packages independently.
This is a variant that skips commit/tag creation, intended to be used when releasing multiple packages in sequence with a single commit at the end.

Parameters

NameTypeDescription
§config?
Partial<FlowConfig>
Optional configuration overrides

Returns

VersionFlow
A VersionFlow for batch independent releases

Example

Releasing multiple packages in batch

import { createBatchReleaseFlow, executeFlow } from '@hyperfrontend/versioning'

// Release multiple packages without individual commits
for (const pkg of ['lib-a', 'lib-b', 'lib-c']) {
  await executeFlow(createBatchReleaseFlow(), pkg, '/workspace')
}
// Then create a single combined commit
§function

createChangelogOnlyFlow(config?: Partial<FlowConfig>): VersionFlow

Creates a changelog-only flow.
Only generates changelog, no version bumps or git operations.

Parameters

NameTypeDescription
§config?
Partial<FlowConfig>
Optional configuration overrides

Returns

VersionFlow
A VersionFlow that only updates changelog

Example

Creating a changelog-only flow

import { createChangelogOnlyFlow, executeFlow } from '@hyperfrontend/versioning'

const flow = createChangelogOnlyFlow()
const result = await executeFlow(flow, 'my-lib', '/workspace')

// Only changelog is updated, no version bump
console.log(result.state.changelogEntry)
§function

createCheckDependentBumpsStep(): FlowStep

Creates a step that checks for dependent package bumps.
In independent versioning, when a dependency is bumped, dependents may also need version bumps.

Returns

FlowStep
A FlowStep that checks dependent bumps

Example

Checking if dependent packages need bumps

import { createCheckDependentBumpsStep, executeStep } from '@hyperfrontend/versioning'

const step = createCheckDependentBumpsStep()
const result = await executeStep(step, contextWithTrackDeps)

// Result indicates if any dependents need bumps
console.log(result.message)
§function

createCombinedChangelogStep(): FlowStep

Creates a step that generates a combined changelog for all packages.

Returns

FlowStep
A FlowStep that creates a combined changelog

Example

Generating a combined changelog for all packages

import { createCombinedChangelogStep, executeStep } from '@hyperfrontend/versioning'

const step = createCombinedChangelogStep()
const result = await executeStep(step, context)

// Single changelog for all packages
console.log(result.message)
§function

createConventionalFlow(config?: Partial<FlowConfig>): VersionFlow

Creates a conventional flow.
This flow follows the standard conventional commits workflow:
  1. Fetch published version from registry
  2. Resolve repository configuration (for compare URLs)
  3. Analyze commits since last release
  4. Calculate version bump based on commit types
  5. Check if version already published (idempotency)
  6. Generate changelog entry (with compare URL if repository resolved)
  7. Update package.json version
  8. Write changelog to file
  9. Create git commit (optional)
  10. Create git tag (optional, typically after publish)

Parameters

NameTypeDescription
§config?
Partial<FlowConfig>
Optional configuration overrides

Returns

VersionFlow
A VersionFlow configured for conventional commits

Example

Creating a conventional versioning flow

import { createConventionalFlow, executeFlow } from '@hyperfrontend/versioning'

// Use defaults
const flow = createConventionalFlow()

// With overrides
const customFlow = createConventionalFlow({
  skipTag: false,
  releaseTypes: ['feat', 'fix'],
})

const result = await executeFlow(flow, 'lib-utils', '/workspace')
§function

createFixedVersionFlow(version: string, config?: Partial<FlowConfig>): VersionFlow

Creates a fixed versioning flow.
Similar to synced, but uses a fixed version scheme where the version is explicitly provided rather than calculated from commits.

Parameters

NameTypeDescription
§version
string
The fixed version to use
§config?
Partial<FlowConfig>
Optional configuration overrides

Returns

VersionFlow
A VersionFlow with a fixed version

Example

Creating a fixed version release flow

import { createFixedVersionFlow, executeFlow } from '@hyperfrontend/versioning'

// Release with explicit version, ignoring commit analysis
const flow = createFixedVersionFlow('2.0.0')
const result = await executeFlow(flow, 'workspace', '/workspace')

console.log(result.state.nextVersion)
// => '2.0.0'
§function

createIndependentFlow(config?: Partial<FlowConfig>): VersionFlow

Creates an independent versioning flow.
This flow is designed for monorepos where each package is versioned independently:
  1. Fetch published version from registry
  2. Analyze commits since last release
  3. Calculate version bump based on commit types
  4. Check for dependent package bumps (cascade)
  5. Check if version already published (idempotency)
  6. Generate changelog entry
  7. Update package.json version
  8. Cascade dependency updates
  9. Write changelog to file
  10. Create git commit
  11. Create git tag

Parameters

NameTypeDescription
§config?
Partial<FlowConfig>
Optional configuration overrides

Returns

VersionFlow
A VersionFlow configured for independent versioning

Example

Creating an independent versioning flow

import { createIndependentFlow, executeFlow } from '@hyperfrontend/versioning'

const flow = createIndependentFlow()
const result = await executeFlow(flow, 'lib-utils', '/workspace')

// Check which dependents were bumped
console.log(result.state.cascadedBumps)
§function

createMinimalFlow(config?: Partial<FlowConfig>): VersionFlow

Creates a minimal flow for quick releases.
Skips changelog and tag creation.

Parameters

NameTypeDescription
§config?
Partial<FlowConfig>
Optional configuration overrides

Returns

VersionFlow
A minimal VersionFlow

Example

Creating a minimal release flow

import { createMinimalFlow, executeFlow } from '@hyperfrontend/versioning'

const flow = createMinimalFlow()
const result = await executeFlow(flow, 'my-lib', '/workspace')

// Quick release without changelog or tags
console.log('Released:', result.state.nextVersion)
§function

createSyncAllPackagesStep(): FlowStep

Creates a step that updates all workspace packages to the same version.

Returns

FlowStep
A FlowStep that syncs all package versions

Example

Syncing all packages to the same version

import { createSyncAllPackagesStep, executeStep } from '@hyperfrontend/versioning'

const step = createSyncAllPackagesStep()
const result = await executeStep(step, context)

// All packages updated to same version
console.log(result.stateUpdates?.modifiedFiles)
§function

createSyncedFlow(config?: Partial<FlowConfig>): VersionFlow

Creates a synced versioning flow.
This flow maintains the same version across all packages in a monorepo. When any package changes, all packages get the same new version.
Flow steps:
  1. Fetch published version from registry
  2. Analyze commits across all packages
  3. Calculate version bump (highest needed)
  4. Check if version already published
  5. Sync all package versions
  6. Generate combined changelog
  7. Write changelog to root
  8. Create git commit
  9. Create single git tag

Parameters

NameTypeDescription
§config?
Partial<FlowConfig>
Optional configuration overrides

Returns

VersionFlow
A VersionFlow configured for synced versioning

Example

Creating a synced versioning flow

import { createSyncedFlow, executeFlow } from '@hyperfrontend/versioning'

const flow = createSyncedFlow()
const result = await executeFlow(flow, 'workspace', '/workspace')

// All packages now share the same version
console.log(`Released v${result.state.nextVersion}`)

Variables

§type

CONVENTIONAL_FLOW_CONFIG

Default configuration for conventional flow.
§type

INDEPENDENT_FLOW_CONFIG

Default configuration for independent flow.
§type

SYNCED_FLOW_CONFIG

Default configuration for synced flow.