conventional 0.1.0 copy "conventional: ^0.1.0" to clipboard
conventional: ^0.1.0 copied to clipboard

outdated

A light-weight conventional commit parser and tools

Conventional #

A light-weight library for working with commits that follow the Conventional Commits specification.

NOTE: At the moment, this library is only used on my projects and the API is a moving target. The Conventional Commit parser is not comprehensive. If you need a more mature solution, try conventional_commits.

Features #

  • Commit.parseCommits() for parsing commits from a git --no-pager log --no-decorate command output.
  • hasReleasableCommits() for checking if a list Commit items has releasable commits following the convention.
  • writeChangelog() for automated authoring of CHANGELOGs based on commits that follow the conventional commits spec.
  • lintCommit() for checking whether commit messages follow the conventional commit spec. Useful when used alongside git_hooks.
  • nextVersion() for bumping to a next version based on releasable commits.

Usage #

A simple usage example:

import 'package:conventional/conventional.dart';

main() {
  final List<Commit> commits = Commit.parseCommits(testLog);
  if (hasReleasableCommits(commits)) {
    writeChangelog(
      commits: commits,
      changelogFilePath: 'CHANGELOG.md',
      version: '1.2.0',
      now: DateTime.now(),
    );
  }
}

Feature Requests and Bugs #

Please file feature requests and bugs at the issue tracker. PR's are welcome and appreciated!

4
likes
0
pub points
61%
popularity

Publisher

verified publisherbrainchildprojects.com

A light-weight conventional commit parser and tools

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

equatable, pub_semver

More

Packages that depend on conventional