@hyperfrontend/versioning/flow/presetspresets
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
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
| Name | Type | Description |
|---|---|---|
§config? | Partial<FlowConfig> | Optional configuration overrides |
Returns
VersionFlowExample
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 commitOnly generates changelog, no version bumps or git operations.
Parameters
| Name | Type | Description |
|---|---|---|
§config? | Partial<FlowConfig> | Optional configuration overrides |
Returns
VersionFlowExample
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)In independent versioning, when a dependency is bumped, dependents may also need version bumps.
Returns
FlowStepExample
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)Returns
FlowStepExample
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)This flow follows the standard conventional commits workflow:
- Fetch published version from registry
- Resolve repository configuration (for compare URLs)
- Analyze commits since last release
- Calculate version bump based on commit types
- Check if version already published (idempotency)
- Generate changelog entry (with compare URL if repository resolved)
- Update package.json version
- Write changelog to file
- Create git commit (optional)
- Create git tag (optional, typically after publish)
Parameters
| Name | Type | Description |
|---|---|---|
§config? | Partial<FlowConfig> | Optional configuration overrides |
Returns
VersionFlowExample
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')Similar to synced, but uses a fixed version scheme where the version is explicitly provided rather than calculated from commits.
Parameters
Returns
VersionFlowExample
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'This flow is designed for monorepos where each package is versioned independently:
- Fetch published version from registry
- Analyze commits since last release
- Calculate version bump based on commit types
- Check for dependent package bumps (cascade)
- Check if version already published (idempotency)
- Generate changelog entry
- Update package.json version
- Cascade dependency updates
- Write changelog to file
- Create git commit
- Create git tag
Parameters
| Name | Type | Description |
|---|---|---|
§config? | Partial<FlowConfig> | Optional configuration overrides |
Returns
VersionFlowExample
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)Skips changelog and tag creation.
Parameters
| Name | Type | Description |
|---|---|---|
§config? | Partial<FlowConfig> | Optional configuration overrides |
Returns
VersionFlowExample
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)Returns
FlowStepExample
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)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:
- Fetch published version from registry
- Analyze commits across all packages
- Calculate version bump (highest needed)
- Check if version already published
- Sync all package versions
- Generate combined changelog
- Write changelog to root
- Create git commit
- Create single git tag
Parameters
| Name | Type | Description |
|---|---|---|
§config? | Partial<FlowConfig> | Optional configuration overrides |
Returns
VersionFlowExample
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}`)