tiny-conventional-commits-parser
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

tiny-conventional-commits-parser

npm version npm downloads Install size bundle JSDocs License

A tiny conventional commits parser.

This package does not aim to provide features and APIs compatible with conventional-commits-parser, but only basic, simple parsing of conventional-commits.

Usage

import { getRecentCommits } from 'tiny-conventional-commits-parser'
getRecentCommits('v9.10.0', 'HEAD')

const rawCommit = {
  author: {
    email: 'author1@example.com',
    name: 'author1',
  },
  body: '',
  data: 'Thu Jan 23 17:42:15 2025 +0800',
  message: 'feat(scope)!: commit message',
  shortHash: '9cfa09f',
}
parseCommit(rawCommit)
{
  "authors": [
    {
      "email": "author1@example.com",
      "name": "author1"
    }
  ],
  "body": "",
  "data": "Thu Jan 23 17:42:15 2025 +0800",
  "description": "commit message",
  "isBreaking": true,
  "isConventional": true,
  "message": "feat(scope)!: commit message",
  "references": [],
  "scope": "scope",
  "shortHash": "9cfa09f",
  "type": "feat"
}

License

MIT License

Acknowledgements

Package Sidebar

Install

npm i tiny-conventional-commits-parser

Weekly Downloads

7,031

Version

0.0.1

License

MIT

Unpacked Size

10.8 kB

Total Files

6

Last publish

Collaborators

  • northword