TurboVersion
Automated version management for monorepos and single-package projects
Introduction
TurboVersion is a universal solution for managing package versions in both monorepos and single-package projects. It provides:
- Automated version bumps based on commit messages or branch names
- Support for all Semantic Versioning (SemVer) increments
- Flexible configuration for different project architectures
Motivation
Managing versions manually in monorepos is error-prone and time-consuming. TurboVersion solves:
- Human errors in version bumps
- Inconsistent dependencies between packages
- Wasted time on manual version updates
- CI/CD complexity in release workflows
By automating versioning through: ✔ Commit message analysis ✔ Branch name patterns ✔ Smart dependency resolution
Key Features
Feature | Description |
---|---|
Dual Versioning Strategies | Choose between commit message or branch name based versioning |
Monorepo Ready | Supports both synchronized and independent versioning modes |
CI/CD Friendly | Designed for seamless integration in automated workflows |
Smart Dependency Handling | Automatic internal dependency version updates |
Installation
# Global install
npm install -g turboversion
# Local install (recommended)
npm install -D turboversion
# Using npx
npx turboversion
Basic Usage
# Interactive version bump
turboversion
# Direct version specification
turboversion --bump minor
turboversion --bump patch
Configuration
Create version.config.json
:
{
"versionStrategy": "commitMessage",
"tagPrefix": "v",
"baseBranch": "main",
"branchPattern": ["major", "minor", "patch"]
}
Versioning Strategies
1. Commit Message Strategy (Default)
fix: → Patch version bump
feat: → Minor version bump
BREAKING → Major version bump
2. Branch Pattern Strategy
feature/* → Minor bump
fix/* → Patch bump
release/* → Major bump
Advanced Usage
# Target specific package
turboversion --target my-package
# Prerelease
turboversion --bump prerelease
# Config file
turboversion --config version.config.json
# Mode
## Synchronized Mode
turboversion --sync
## Independent Mode
turboversion --async
Integration
PNPM Workflow
pnpm turboversion
pnpm publish -r
CI/CD Example
steps:
- run: npx turboversion
- run: pnpm publish
Troubleshooting
Q: How to skip packages?
A: Add to skip
array in config.
Q: Custom commit formats?
A: Configure preset
option.