@hyperfrontend/workspace/executors/version-check

version-check

Compares a project's manifest and changelog with what its commits call for, without writing anything: the read-only half of the release flow, for CI to confirm that the bump the push carried is the one the commits earn.

{
  "version-check": {
    "executor": "@hyperfrontend/workspace:version-check"
  }
}
OptionWhat it does
--skipIfVersionCommitPasses when the head commit is the project's own version commit; defaults to true
--repositoryHow changelog compare links are resolved: inferred from the manifest or the remote, disabled, or given
--maxCommitFallbackHow many commits the flow reads at most; defaults to 500
--scopeFilteringWhich commit scopes count for the project
--verbose, --quietMore or less output

A failing check names the remedy: run the project's version target and push again.

API Reference§

ƒ Functions

§function

versionCheckExecutor(options: VersionCheckExecutorOptions, context: ExecutorContext): Promise<ExecutorResult>

Validates version state without making changes.
This executor is designed for CI validation to verify that:
  1. The expected version bump (based on conventional commits) has been applied
  2. The package.json version matches the expected version
  3. The CHANGELOG.md contains the correct entry for the version
Unlike the version executor, this makes NO changes to the repository. It's a read-only check that provides clear failure messages for remediation.
Use cases:
  • CI pipeline validation
  • Local verification that a version run did what the commits call for
  • Debugging version discrepancies
Parameters
NameTypeDescription
§options
VersionCheckExecutorOptionsConfiguration options for the version-check executor
§context
ExecutorContextThe workspace, the project and the target the task runs on
Returns
Promise<ExecutorResult>
Success status
Example

A `version-check` target sharing the `version` target's attribution

{
  "targets": {
    "version-check": {
      "executor": "@hyperfrontend/workspace:version-check",
      "options": { "scopeFiltering": { "strategy": "hybrid", "excludeScopes": ["ci"] } }
    }
  }
}
```
`npx hf run lib-core:version-check` fails when `libs/core/package.json` or its changelog lag behind what the commits call for, naming the `npx hf run lib-core:version` run that puts them right; it passes without a look on a version commit for the project.

◈ Interfaces

§interface

VersionCheckExecutorOptions

What a version-check target configures: how commits are attributed to the project, and whether the check stands down on a version commit.
Properties
§scopeFiltering?:ScopeFilteringConfigScope filtering configuration for commit classification and changelog generation.
Controls how commits are filtered and classified for this project:
  • strategy: Filtering strategy ('hybrid', 'scope-only', 'file-only', 'inferred')
  • includeScopes: Additional scopes to always include
  • excludeScopes: Scopes to exclude even if files match
  • trackDependencyChanges: Include dependency commits as indirect
  • infrastructure: Infrastructure path and scope tracking
§maxCommitFallback?:numberUpper bound on the commit window the flow analyzes for bumps and changelogs.
§skipIfVersionCommit?:booleanSkip validation if the current commit is a version/release commit.
§verbose?:booleanEnable verbose output for debugging. Shows additional details about validation.
§quiet?:booleanSuppress all non-error output.
§repository?:RepositoryConfig | "inferred" | "disabled" | RepositoryResolutionRepository resolution for changelog compare URLs.
  • 'disabled': No compare URLs generated
  • 'inferred': Auto-detect from package.json or git remote (default)
  • Object: Fine-grained control with mode and options