conventional library

Classes

ChangeSummary
A summary of changes
Commit
Represents a git commit item.
CommitAuthor
Represents the author of the commit
CommitMessage
Represents a git commit message
CommitSections
A grouping of commit changes.
LintConfig
A configuration for linting rules
LintContext
The context of a LintRule pass
LintResult
A result for a LintRule pass
LintRule
A rule used to validate commit messages.

Constants

releasableCommitTypes → const Set<String>
These are the commit types that should trigger a release.

Properties

defaultRules List<LintRule>
The default rules used for linting
final

Functions

buildlessVersion(Version version) → Version
Generates a version that doesn't have build numbers
changelogSummary({required List<Commit> commits, required String version, DateTime? now}) Future<ChangeSummary?>
Outputs a would-be content to a changelog file based on commits.
hasReleasableCommits(List<Commit> commits) bool
Checks whether a list of commits has commits that can be released.
lintCommit(String commitMessage, {LintConfig? config, List<LintRule>? rules}) LintResult
Checks whether a commit message follows rules
nextVersion(Version currentVersion, List<Commit> commits, {bool incrementBuild = false, bool afterV1 = false, String? pre}) → Version
Bump up a currentVersion based on a list of commits
writeChangelog({required List<Commit> commits, required String changelogFilePath, required String version, DateTime? now}) Future<ChangeSummary?>
Writes to a changelog file based on commits.
writeChangelogToFile({required List<Commit> commits, required File file, required String version, DateTime? now}) Future<ChangeSummary?>
Writes to a changelog file based on commits.

Typedefs

LintInvalidMessage = String Function(LintContext context)
A function for generating LintResult.message
LintValidator = bool Function(LintContext context)
A validator function for validating messages