lerna.json Config Builder

Generate a lerna.json for Lerna-managed multi-package repositories

Creates a lerna.json with fixed or independent versioning, npmClient, useWorkspaces, packages globs, publish access, and conventional-commits command overrides for versioning and publishing multi-package repos.

What is the difference between fixed and independent versioning?

Fixed mode keeps every package on the same version number, bumping them all together on each release. Independent mode versions each package separately so only changed packages get a new version, which suits libraries that release at different cadences.

Configure Lerna for a multi-package repo

Lerna manages versioning and publishing across many packages in one repository. The lerna.json file at the root decides how versions are bumped, which package manager runs installs, where packages live, and how publishing behaves. This builder writes a correct lerna.json for both fixed and independent release strategies.

How it works

The version field is the core choice. Set it to a literal version like 1.0.0 for fixed mode, where every package shares one number and bumps together. Set it to the string independent for independent mode, where Lerna versions each package separately based on what changed.

npmClient tells Lerna whether to shell out to npm, yarn, or pnpm. useWorkspaces: true makes Lerna inherit the package list from your package manager’s workspaces, while turning it off lets you list packages globs directly. The command object overrides behavior for version and publish: enabling conventionalCommits makes Lerna read commit messages to compute semver bumps and generate changelogs, and access controls whether published scoped packages are public or restricted.

Tips and notes

  • Prefer useWorkspaces: true so your package list lives in one place.
  • Independent versioning is best for libraries that release on different schedules.
  • Conventional commits remove guesswork: feat bumps minor, fix bumps patch.
  • Set access to public for open-source scoped packages, or npm rejects the publish.