Skip to content
Latchkey

Lerna Independent Versioning Bumped the Wrong Packages in CI

With "version": "independent", Lerna versions each package on its own based on what changed. In CI it can bump more packages than intended when conventional-commit detection, a wide change diff, or a forced flag pulls in packages you did not mean to release.

What this error means

A release job bumps and tags packages that had no meaningful change, or bumps the wrong semver level. The set differs from what you expected given the diff. Deterministic for the same commits and config.

Lerna output
lerna info version independent
lerna info Bumping: @acme/ui 1.4.0 => 2.0.0   # expected a patch
            @acme/config 1.0.1 => 1.0.2        # unchanged, but force-bumped

Common causes

Conventional-commit detection over-broad

With --conventional-commits, a commit touching shared files or an over-broad scope can mark unrelated packages as changed.

Forced version flag

--force-publish (or --force-publish=*) bumps every package regardless of changes, which is rarely what an independent release wants.

Wide change detection from a bad base

Lerna diffs against the last tag; a shallow clone or wrong base makes nearly everything look changed.

How to fix it

Scope the version run precisely

Avoid force-publishing everything; let change detection drive bumps from a correct base.

lerna.json / Terminal
# lerna.json
{ "version": "independent" }

# release
npx lerna version --conventional-commits --no-push   # review before tagging

Fix the change-detection base

  1. Use fetch-depth: 0 so Lerna diffs against the real last tag.
  2. Drop --force-publish unless you truly intend to bump every package.
  3. Use --no-push first and inspect the planned bumps before tagging.

How to prevent it

  • Avoid --force-publish=* with independent versioning unless intended.
  • Use full history so change detection diffs against the correct tag.
  • Review the planned bumps (--no-push) before pushing tags in CI.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →