or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

cli-interface.mdconfiguration.mdindex.mdrelease-types.mdversion-bumping.md
tile.json

tessl/npm-bumpp

Automated version bumping tool with git integration for semantic versioning workflows

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/bumpp@9.11.x

To install, run

npx @tessl/cli install tessl/npm-bumpp@9.11.0

index.mddocs/

bumpp

bumpp is an automated version bumping tool that streamlines software release workflows. It provides both a CLI and programmatic API for semantic version management, file updates, git operations (commit/tag/push), and monorepo support. Originally forked from version-bump-prompt, bumpp enhances the experience with interactive prompts, conventional commits, and extensive configuration options.

Package Information

  • Package Name: bumpp
  • Package Type: npm
  • Language: TypeScript
  • Installation: npm install bumpp

Core Imports

import { 
  versionBump, 
  versionBumpInfo, 
  defineConfig,
  loadBumpConfig,
  bumpConfigDefaults
} from "bumpp";

// Types
import type { 
  VersionBumpOptions, 
  VersionBumpResults, 
  VersionBumpProgress,
  ReleaseType 
} from "bumpp";

For CommonJS:

const { 
  versionBump, 
  versionBumpInfo, 
  defineConfig,
  loadBumpConfig,
  bumpConfigDefaults 
} = require("bumpp");

Basic Usage

import { versionBump } from "bumpp";

// Interactive version bumping (prompts user)
const result = await versionBump();

// Explicit version bump
const result = await versionBump("patch");

// Full configuration
const result = await versionBump({
  release: "minor",
  commit: true,
  tag: true,
  push: true,
  files: ["package.json", "src/version.ts"]
});

console.log(`Bumped from ${result.currentVersion} to ${result.newVersion}`);

Architecture

bumpp is built around several key components:

  • Core API: versionBump() and versionBumpInfo() functions for version management
  • Configuration System: File-based configuration with defineConfig() helper and defaults
  • Release Types: Extended semantic versioning with conventional commits support
  • Git Integration: Automated commit, tag, and push operations with signing support
  • File Management: Multi-file version updates with glob patterns and custom replacements
  • CLI Interface: Command-line tool with interactive prompts and argument parsing
  • Monorepo Support: Recursive version bumping across multiple packages

Capabilities

Version Bumping

Core version bumping functionality with multiple operation modes including interactive prompts, explicit version specification, and full configuration control. Includes information functions for dry-run operations.

function versionBump(): Promise<VersionBumpResults>;
function versionBump(release: string): Promise<VersionBumpResults>;
function versionBump(options: VersionBumpOptions): Promise<VersionBumpResults>;

function versionBumpInfo(): Promise<Operation>;
function versionBumpInfo(release: string): Promise<Operation>;
function versionBumpInfo(options: VersionBumpOptions): Promise<Operation>;

interface VersionBumpResults {
  release?: ReleaseType;
  currentVersion: string;
  newVersion: string;
  commit: string | false;
  tag: string | false;
  updatedFiles: string[];
  skippedFiles: string[];
}

// Note: Operation is an internal type returned by versionBumpInfo()
// See version-bumping.md for full Operation interface details
interface Operation {
  readonly results: VersionBumpResults;
  readonly state: Readonly<{
    currentVersion: string;
    newVersion: string;
  }>;
}

Version Bumping

Configuration Management

Configuration system supporting file-based configuration, environment overrides, and programmatic configuration with type-safe defaults.

function defineConfig(config: Partial<VersionBumpOptions>): Partial<VersionBumpOptions>;
function loadBumpConfig(
  overrides?: Partial<VersionBumpOptions>, 
  cwd?: string
): Promise<VersionBumpOptions>;

const bumpConfigDefaults: VersionBumpOptions;

Configuration

Release Types

Semantic versioning system with extended release types and conventional commit support.

type ReleaseType = 
  | "major" | "minor" | "patch" 
  | "premajor" | "preminor" | "prepatch" | "prerelease"
  | "next" | "conventional";

Release Types

CLI Interface

Command-line interface providing the bumpp executable for terminal-based version bumping workflows with interactive prompts and comprehensive options.

Note: CLI functions are internal implementation details and not part of the public programmatic API. Use the bumpp command directly or the main API functions above.

CLI Interface

Types

Core Options Interface

interface VersionBumpOptions {
  /** Version string or release type (e.g., "1.2.3", "patch", "major") */
  release?: string;
  /** Current version to bump from (auto-detected if not provided) */
  currentVersion?: string;
  /** Prerelease identifier (e.g., "alpha", "beta") */
  preid?: string;
  /** Create git commit with optional custom message */
  commit?: boolean | string;
  /** Create git tag with optional custom format */
  tag?: boolean | string;
  /** Sign git commit and tag with GPG/SSH key */
  sign?: boolean;
  /** Push git commit and tag to remote */
  push?: boolean;
  /** Run npm install after version bump */
  install?: boolean;
  /** Include all files in git commit (--all flag) */
  all?: boolean;
  /** Skip git working directory checks */
  noGitCheck?: boolean;
  /** Prompt for confirmation before executing */
  confirm?: boolean;
  /** Bypass git commit hooks (--no-verify) */
  noVerify?: boolean;
  /** Files to update with new version */
  files?: string[];
  /** Working directory for operations */
  cwd?: string;
  /** CLI interface configuration */
  interface?: boolean | InterfaceOptions;
  /** Skip npm version lifecycle scripts */
  ignoreScripts?: boolean;
  /** Progress callback for operation updates */
  progress?: (progress: VersionBumpProgress) => void;
  /** Custom command or function to execute before commit */
  execute?: string | ((config: Operation) => void | PromiseLike<void>);
  /** Enable recursive bumping for monorepos */
  recursive?: boolean;
  /** Print recent commit history */
  printCommits?: boolean;
  /** Custom version provider function */
  customVersion?: (currentVersion: string, semver: typeof import('semver')) => Promise<string | void> | string | void;
}

Progress & Events

interface VersionBumpProgress extends VersionBumpResults {
  event: ProgressEvent;
  script?: NpmScript;
}

enum ProgressEvent {
  FileUpdated = "file updated",
  FileSkipped = "file skipped", 
  GitCommit = "git commit",
  GitTag = "git tag",
  GitPush = "git push",
  NpmScript = "npm script"
}

enum NpmScript {
  PreVersion = "preversion",
  Version = "version", 
  PostVersion = "postversion"
}