| addGitTag | Creates a Git tag for the new version. |
| addUpdatedFilesToGit | Adds updated files to the Git staging area and commits them with the new version message. If the commit fails (for example, the pre-commit hook rejects a new word in the changelog) and the process is attached to an interactive terminal, the user is prompted to fix the issue (for example, add the missing word to cspell.json) and press Enter to retry. The retry re-stages all files, so the fix is picked up without restarting the whole release lifecycle. In a non-interactive environment (no TTY, such as CI), the error is re-thrown instead of prompting, so the script fails fast rather than hanging. Pass shouldVerifyCommit: false to skip the pre-commit hook entirely in such cases. |
| assertGitHubCliInstalled | Checks if the GitHub CLI is installed on the system. Throws an error if the GitHub CLI is not installed. |
| assertGitInstalled | Checks if Git is installed on the system. Throws an error if Git is not installed. |
| assertGitRepoClean | Checks if the Git repository is clean, meaning there are no uncommitted changes. Throws an error if the Git repository is not clean. |
| autolinkBareUrls | Wraps any bare http(s):// URL in the given text in angle brackets (<url>) so that text emitted into a Markdown document (such as a generated changelog bullet) passes markdownlint’s MD034/no-bare-urls rule while still rendering as a clickable autolink on GitHub. URLs that are already wrapped in angle brackets (<url>) or that form the target of a Markdown link ([text](url)) are left untouched, so the function is safe to run repeatedly. Trailing sentence punctuation (., ,, ;, :, !, ?) is kept outside the angle brackets so it does not become part of the link. |
| copyUpdatedManifest | Copies the updated manifest file to the distribution build folder. |
| getNewVersion | Generates a new version string based on the current version and the specified update type. Uses the semver package to compute the next version, supporting all npm increment types: major, minor, patch, premajor, preminor, prepatch, and prerelease. Pre-release versions use the beta identifier by default (e.g., 1.2.4-beta.0). |
| getReleaseNotes | Retrieves the release notes for a specific version from the changelog. |
| getVersionUpdateType | Determines the type of version update based on the input string. |
| gitPush | Pushes commits and tags to the remote Git repository. |
| parseVersionArguments | Parses the command-line arguments for a version update into a version update type and UpdateVersionOptions. Each behavior is enabled by default; the corresponding --no-* flag turns it off. --changelog-file and --min-app-version take a value instead and have no default. Recognized flags: - --changelog-file=<path> — use this file’s contents as the new version’s changelog section instead of the commit-derived bullets, and skip the interactive review entirely. - --min-app-version=<x.y.z> — write this minAppVersion into the plugin’s manifest.json and its new versions.json entry instead of tracking the latest Obsidian desktop version. - --no-build — skip the build step (only safe when the build output already matches the current code). - --no-changelog-editing — generate the changelog without opening it for manual review. - --no-checks — skip the clean-repo check, format, spellcheck, lint, over-exposure analysis, and tests (the build still runs). - --no-commit-verification — pass --no-verify to the release commit, skipping the pre-commit hook. - --no-demo-vault — skip archiving the plugin’s demo vault (demo-vault/) as a release artifact. - --no-release — run all local steps but skip the push and the GitHub release. |
| publishGitHubRelease | Publishes a GitHub release for the new version. Handles the creation of a release and uploading files for either an Obsidian plugin or another project. |
| updateChangelog | Updates the changelog file with new version information and commit messages. This function reads the current changelog, appends new entries for the latest version, and prompts the user to review the changes. The review happens on a scratch copy in the OS temporary folder, and the repository’s own CHANGELOG.md is written only once the review is over — so interrupting the review leaves the repository untouched. |
| updateVersion | Updates the version of the project based on the specified update type. This function performs a series of tasks to handle version updates: 1. Validates the version update type. 2. Checks if Git and GitHub CLI are installed. 3. Verifies that the interactive changelog review, if one is due, can actually be answered. 4. Verifies that the Git repository is clean. 5. Runs spellcheck and linting. 6. Builds the project. 7. Settles the changelog — the only step that can block on a human, and deliberately the last one before anything is written, so an interrupt here leaves the working tree clean and the release re-runnable. 8. Updates version in files, then writes the settled changelog. 9. Adds updated files to Git, tags the commit, and pushes to the repository. 10. If an Obsidian plugin, copies the updated manifest and publishes a GitHub release. |
| updateVersionInFiles | Updates the version in various files, including package.json, package-lock.json, and Obsidian plugin manifests if applicable. |
| validate | Validates the version update type to ensure it is either a recognized type or a valid manual version string. |