@hyperfrontend/workspace/executors/version-checkversion-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"
}
}
| Option | What it does |
|---|---|
--skipIfVersionCommit | Passes when the head commit is the project's own version commit; defaults to true |
--repository | How changelog compare links are resolved: inferred from the manifest or the remote, disabled, or given |
--maxCommitFallback | How many commits the flow reads at most; defaults to 500 |
--scopeFiltering | Which commit scopes count for the project |
--verbose, --quiet | More or less output |
A failing check names the remedy: run the project's version target and push again.
API Reference§
ƒ Functions
§functionversionCheckExecutor(
versionCheckExecutor( options: VersionCheckExecutorOptions, context: ExecutorContext): Promise< ExecutorResult>
Validates version state without making changes.
This executor is designed for CI validation to verify that:
Use cases:
This executor is designed for CI validation to verify that:
- The expected version bump (based on conventional commits) has been applied
- The package.json version matches the expected version
- The CHANGELOG.md contains the correct entry for the version
Use cases:
- CI pipeline validation
- Local verification that a version run did what the commits call for
- Debugging version discrepancies
Parameters
| Name | Type | Description |
|---|---|---|
§options | VersionCheckExecutorOptions | Configuration options for the version-check executor |
§context | ExecutorContext | The 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
What a
version-check target configures: how commits are attributed to the project, and whether the check stands down on a version commit.Properties
§
Controls how commits are filtered and classified for this project:
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 includeexcludeScopes: Scopes to exclude even if files matchtrackDependencyChanges: Include dependency commits as indirectinfrastructure: Infrastructure path and scope tracking
§
maxCommitFallback?:numberUpper bound on the commit window the flow analyzes for bumps and changelogs.§
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