Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@conventional-commits/parser

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@conventional-commits/parser

reference implementation of conventionalcommits.org spec

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
283K
decreased by-1.56%
Maintainers
2
Weekly downloads
 
Created

What is @conventional-commits/parser?

@conventional-commits/parser is an npm package designed to parse conventional commit messages. It helps in extracting structured information from commit messages that follow the Conventional Commits specification. This can be useful for generating changelogs, automating versioning, and ensuring commit message consistency.

What are @conventional-commits/parser's main functionalities?

Parse Commit Messages

This feature allows you to parse a conventional commit message and extract structured information such as type, scope, and description.

const parser = require('@conventional-commits/parser');
const commitMessage = 'feat(core): add new feature';
const parsed = parser.sync(commitMessage);
console.log(parsed);

Handle Commit Message with Body and Footer

This feature allows you to parse commit messages that include a body and footer, extracting detailed information including breaking changes.

const parser = require('@conventional-commits/parser');
const commitMessage = 'fix(core): fix bug\n\nThis fixes a critical bug in the core module.\n\nBREAKING CHANGE: This change breaks the API.';
const parsed = parser.sync(commitMessage);
console.log(parsed);

Custom Parser Options

This feature allows you to customize the parser options to fit different commit message patterns.

const parser = require('@conventional-commits/parser');
const commitMessage = 'chore: update dependencies';
const options = { headerPattern: /^(	ype)(?:	ype)?(?:	ype)?$/ };
const parsed = parser.sync(commitMessage, options);
console.log(parsed);

Other packages similar to @conventional-commits/parser

Keywords

FAQs

Package last updated on 30 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc