Socket
Socket
Sign inDemoInstall

@commitlint/parse

Package Overview
Dependencies
79
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @commitlint/parse

Lint your commit messages


Version published
Weekly downloads
2.3M
decreased by-18.7%
Maintainers
4
Install size
2.81 MB
Created
Weekly downloads
 

Package description

What is @commitlint/parse?

The @commitlint/parse package is used to parse commit messages according to the conventions used by commitlint. It takes a raw commit message string and returns a promise that resolves to an object representing the parsed commit, which includes information such as the header, type, scope, subject, body, footer, and references. This package is typically used in the context of commit message linting to ensure that commit messages follow a certain format.

What are @commitlint/parse's main functionalities?

Parsing commit messages

This feature allows you to parse a commit message and obtain an object with structured information about the commit. The code sample demonstrates how to use the parse function to parse a commit message and log the result.

const parse = require('@commitlint/parse');
const message = 'feat(scope): add new feature';
parse(message).then(commit => {
  console.log(commit);
});

Other packages similar to @commitlint/parse

Changelog

Source

7.5.0 (2019-01-31)

Bug Fixes

  • sentence-case allow upper-case characters in first word (#531) (5a6a4a8), closes #211
  • resolve-extends: override array on extending rules (#470) (#539) (b35000c)
  • all broken website references (#564) (82eeb5a)
  • cleanup message for input with no config (#519) (7d9e760)
  • cli: avoid linebreak in empty input (#523) (3141882)
  • mark optional parameter with undefined (#553) (6720284)
  • replace all repository references with conventional changelog (#561) (6c3afcd)
  • replace all website references with conventional changelog (#563) (6b86fb1)
  • replace old require-uncached with import-fresh (#533) (b636e8c)
  • resolve path to commit message for git submodules (83b1a47)
  • slash in scope #291 (#529) (b2b63e5)
  • store concatenated array to problems variable (#551) (434a70f)

Features

  • add support for git submodules (cc575fa)
  • rule-header-length: show current header length (6d61c4f)

<a name="7.4.0"></a>

Readme

Source

Parse commit messages to structured data

@commitlint/parse

Install

npm install --save @commitlint/parse

Use

const parse = require('@commitlint/parse');

API

parse(message: string, parser: Function, parserOpts: Object)

  • message: Commit message to parser
  • parser: Sync parser function to use. Defaults to sync of conventional-commits-parser
  • parserOpts: Options to pass to parser
    {
      commentChar: null, // character indicating comment lines
      issuePrefixes: ['#'] // prefix characters for issue references
    }
    

Keywords

FAQs

Last updated on 31 Jan 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc