UpdateVersionOptions
Options for updateVersion.
Import:
import type { UpdateVersionOptions } from 'obsidian-dev-utils/script-utils/version';Signature:
export interface UpdateVersionOptionsProperties
| Property | Type | Description |
|---|---|---|
| changelogFilePath? | string | undefined | A path to a file whose contents become the body of the new version's changelog section, instead of the bullets derived from the commit messages. Use it to supply prepared release notes from a non-interactive caller (a background process, CI, an agent). Setting it implies no interactive review: the commit log is not read, and the changelog is never opened in the editor nor waited on at the console, regardless of shouldEditChangelog. |
| minAppVersion? | string | undefined | An explicit minAppVersion to write into the plugin's manifest.json and its new versions.json entry. When set, it is used verbatim and the latest Obsidian desktop version is not fetched at all.Set this when the plugin has a known minimum it actually requires, rather than tracking whatever Obsidian released most recently. Only applies to Obsidian plugins, and only to non-pre-release versions (a pre-release copies the existing manifest.json and never writes minAppVersion). |
| shouldArchiveDemoVault? | boolean | Whether to archive the plugin's demo vault (demo-vault/ in the repo root) as a release artifact. Only applies to Obsidian plugins; ignored when the repo has no demo-vault/ folder. |
| shouldBuild? | boolean | Whether to run the build step. The build is a publishing prerequisite, not a verification check, so it is governed by this flag independently of shouldRunChecks — it runs even when the checks are skipped, so a fast release still ships fresh artifacts. Set to false only when the build output is known to already match the current code; otherwise the release would publish stale artifacts. |
| shouldEditChangelog? | boolean | Whether to open the generated changelog in the editor for an interactive review. Ignored when changelogFilePath is set. When it is neither set nor disabled, the release requires an interactive terminal, and updateVersion refuses up front without one rather than blocking on an editor nobody will close. |
| shouldRelease? | boolean | Whether to publish the release. When false, all local steps are executed (version bump, changelog, commit, tag), but the changes are not pushed and no GitHub release is published. |
| shouldRunChecks? | boolean | Whether to run the preflight verification checks (clean-repo check, format, spellcheck, lint, over-exposure analysis, and tests). The build step is not one of these checks — it is governed separately by shouldBuild. |
| shouldVerifyCommit? | boolean | Whether to run the pre-commit hook when creating the release commit. When false, --no-verify is passed to the release commit to skip the hook. |
Methods
| Method | Returns | Description |
|---|---|---|
| prepareGitHubRelease(this, newVersion) | Promise<void> | A callback function to prepare the GitHub release. |
Links to this page: