What is @lerna/conventional-commits?
@lerna/conventional-commits is a package that integrates conventional commit messages with Lerna, a tool for managing JavaScript projects with multiple packages. It helps automate the versioning and changelog generation based on commit messages following the Conventional Commits specification.
What are @lerna/conventional-commits's main functionalities?
Automatic Versioning
Automatically bumps the version of your packages based on the commit messages. For example, a commit message with 'feat:' will trigger a minor version bump, while 'fix:' will trigger a patch version bump.
lerna version --conventional-commits
Changelog Generation
Generates a changelog file based on the commit messages. This helps in keeping track of what changes have been made in each version.
lerna version --conventional-commits --changelog-preset angular
Commit Message Validation
Ensures that commit messages follow the Conventional Commits specification, which helps in maintaining a consistent commit history.
lerna version --conventional-commits --yes
Other packages similar to @lerna/conventional-commits
standard-version
standard-version is a utility for versioning and changelog generation based on Conventional Commits. It is similar to @lerna/conventional-commits but is more focused on single-package repositories rather than monorepos.
semantic-release
semantic-release automates the versioning and package publishing process based on the commit messages. It offers more advanced features like automatic publishing to npm and GitHub, making it a more comprehensive solution compared to @lerna/conventional-commits.
commitizen
commitizen helps you write commit messages that follow the Conventional Commits specification. While it doesn't handle versioning or changelog generation directly, it can be used in conjunction with tools like @lerna/conventional-commits to ensure commit message consistency.
@lerna/conventional-commits
Lerna's internal interface to conventional-changelog and friends
Usage
You probably shouldn't, at least directly.
Install lerna for access to the lerna
CLI.