@wroud/conventional-commits-parser

@wroud/conventional-commits-parser is a lightweight library designed to parse conventional commit messages. It provides a structured way to extract commit types, scopes, and messages according to the conventional commits specification.
Features
- Conventional Commits Parsing: Extract commit types, scopes, and messages.
- TypeScript: Written in TypeScript for type safety and modern JavaScript support.
- Pure ESM package
Installation
Install via npm:
npm install @wroud/conventional-commits-parser @wroud/git
Usage
First, get IGitCommitInfo using getGitCommits from @wroud/git:
import { getGitCommits } from "@wroud/git";
import { parseConventionalCommit } from "@wroud/conventional-commits-parser";
async function example() {
const commitGenerator = getGitCommits();
for await (const commitInfo of commitGenerator) {
const parsedCommit = parseConventionalCommit(commitInfo);
console.log(parsedCommit);
}
}
example();
Changelog
All notable changes to this project will be documented in the CHANGELOG file.
License
This project is licensed under the MIT License - see the LICENSE file for details.