npvm
Node Package Version Manager
🔗 GitHub
About
npvm is a smart versioning tool for Node.js monorepos. It automatically determines version bumps based on conventional commits and handles workspace dependencies correctly.
Features
- 🔄 Automatic version bumping — Based on conventional commits
- 📦 Workspace-aware — Updates cross-dependencies correctly
- 📝 Changelog generation — From commit history
- 🏷️ Git tag management — Automatic tagging
- 🔧 Multi-runtime — pnpm, npm, yarn workspaces
Installation
bash
npm install -g npvm
# or
pnpm add -g npvmUsage
Bump Versions
bash
# Auto-detect bump type from commits
npvm bump
# Force specific bump type
npvm bump --major
npvm bump --minor
npvm bump --patch
# Preview without changes
npvm bump --dry-runChangelog
bash
# Generate changelog
npvm changelog
# Output to file
npvm changelog -o CHANGELOG.mdPublish
bash
# Publish changed packages
npvm publish
# Skip already published versions
npvm publish --skip-existingConventional Commits
npvm analyzes commits to determine version bumps:
| Commit Type | Bump |
|---|---|
feat: | minor |
fix: | patch |
BREAKING CHANGE: | major |
feat!: | major |
docs:, chore: | no bump |
Monorepo Support
npvm understands workspace dependencies:
packages/
├── core/ # v1.0.0 → v1.1.0
├── cli/ # depends on core
└── utils/ # no changesWhen core is bumped, cli's dependency is automatically updated.
Configuration
Create npvm.config.json:
json
{
"tagPrefix": "v",
"changelog": {
"file": "CHANGELOG.md",
"includeCommitBody": true
},
"git": {
"push": true,
"pushTags": true
}
}Comparison
| Feature | npvm | changesets | lerna |
|---|---|---|---|
| Auto-bump from commits | ✅ | ❌ | ⚠️ |
| Workspace deps | ✅ | ✅ | ✅ |
| Changelog | ✅ | ✅ | ✅ |
| Config-free | ✅ | ❌ | ❌ |
| Bundle size | Small | Medium | Large |
Status
| Feature | Status |
|---|---|
| Version detection | ✅ Complete |
| Auto-bump | ✅ Complete |
| Changelog | 🔄 In progress |
| Publish | 🔄 In progress |
