Skip to content

UpdateVersionOptions

Options for updateVersion.

Import:

import type { UpdateVersionOptions } from '@mnaoumov/typescript-dev-toolkit/version';

Signature:

export interface UpdateVersionOptions

Properties

PropertyTypeDescription
changelogFilePath?string | undefinedA 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.
getReleaseAssetPaths?(() => Promise<string[]>) | undefinedReturns the files to attach to the GitHub release. See PublishGitHubReleaseOptions.getReleaseAssetPaths.
prepareGitHubRelease?(newVersion: string) => Promise<void>A callback function to prepare the GitHub release.
shouldBuild?booleanWhether 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.
shouldCloseReleasedIssues?booleanWhether to close the issues the release carries once it is published. See PublishGitHubReleaseOptions.shouldCloseReleasedIssues.
shouldEditChangelog?booleanWhether 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?booleanWhether 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?booleanWhether 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?booleanWhether 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.
updateVersionInExtraFiles?((newVersion: string) => Promise<void>) | undefinedUpdates the version in any file beyond package.json and the lockfiles, once the new version is known and before the release commit is made. An Obsidian plugin's manifest.json and versions.json are the case this exists for.

Links to this page: