Skip to content

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 npvm

Usage ​

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-run

Changelog ​

bash
# Generate changelog
npvm changelog

# Output to file
npvm changelog -o CHANGELOG.md

Publish ​

bash
# Publish changed packages
npvm publish

# Skip already published versions
npvm publish --skip-existing

Conventional Commits ​

npvm analyzes commits to determine version bumps:

Commit TypeBump
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 changes

When 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 ​

Featurenpvmchangesetslerna
Auto-bump from commitsYesNoPartial
Workspace depsYesYesYes
ChangelogYesYesYes
Config-freeYesNoNo
Bundle sizeSmallMediumLarge

Status ​

FeatureStatus
Version detectionComplete
Auto-bumpComplete
ChangelogIn progress
PublishIn progress