# 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. ```json { "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 #### versionCheckExecutor ```typescript function versionCheckExecutor(options: VersionCheckExecutorOptions, context: ExecutorContext): Promise ``` 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** | 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`: Success status **Example: A `version-check` target sharing the `version` target's attribution** ```json { "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 #### 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** | Name | Type | Description | | --- | --- | --- | | `scopeFiltering?` | `ScopeFilteringConfig` | Scope 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?` | `number` | Upper bound on the commit window the flow analyzes for bumps and changelogs. | | `skipIfVersionCommit?` | `boolean` | Skip validation if the current commit is a version/release commit. | | `verbose?` | `boolean` | Enable verbose output for debugging. Shows additional details about validation. | | `quiet?` | `boolean` | Suppress all non-error output. | | `repository?` | `RepositoryConfig \| "inferred" \| "disabled" \| RepositoryResolution` | Repository 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 | --- Canonical page: https://www.hyperfrontend.dev/docs/libraries/workspace/executors/version-check/ This file: https://www.hyperfrontend.dev/docs/libraries/workspace/executors/version-check.md Documentation index: https://www.hyperfrontend.dev/llms.txt