JSPM

tiny-conventional-commits-parser

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5339
  • Score
    100M100P100Q209768F
  • License MIT

A tiny conventional commits parser

Package Exports

  • tiny-conventional-commits-parser

Readme

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