npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

git-commit-markdown

v1.0.1

Published

Reads from the git history to render a parsed JSON or write a Markdown file

Readme

Git Commit Markdown

A NodeJS package wich reads from the git history to render a parsed JSON or write a Markdown file (Changelog). It is based on the Karma Git Commit Message Convention, so make sure to have your commits following that convention.

Package Version NodeJS Version

Usage

First install the package with npm as a developement dependency:

npm install -D git-commit-markdown

Then require the package and set up the options:

var gitCMD = require('git-commit-markdown');

var options = {
    // The link to the remote git repository (currently only github and bitbucket)
    remote: 'https://github.com/EastolfiWebDev/GitCommitMarkdown',
    // Fields to extract from the commit
    fields: ['shortHash', 'subject', 'commitDate'],
    // TRUE to generate a Markdown output, instead a JSON
    //markdown: true,
    // TRUE to generate a file with the markdown or a string specifyng the file path
    file: path.join(__dirname, '../CHANGELOG.md'),
    // TRUE to ignore commits of doc, test,...
    ignoreIrrelevants: true,
    // To generate the markdown with a "priority" sorting: features, fixes,...
    sort: true
};

And finally, use it asynchronously (or not):

// If no callback is passed, then it will be executed synchronously, 
// returning the result
gitCMD(options, function(err, result) {
    if (err) throw err;
    
    console.log(result.data);
});

Having the following set of commits (only relevants commits):

$ git log --grep "feat(\|feat:\|fix(\|fix:\|refactor(\|refactor:"
commit 28fb6bed9495cc749f62768c21c8f006ffb09ef9
Author: eastolfi <[email protected]>
Date:   Wed Oct 5 11:12:05 2016 +0000

    fix: Fixe the markdown generation when several commits

commit 32bc36b3c461dc029cc166e4e36a55750d1656fc
Author: eastolfi <[email protected]>
Date:   Wed Oct 5 11:01:29 2016 +0000

    feat(module): Write the markdown to a file

commit f9a30830f6bd5cfc35791d14c0440e43662fc490
Author: eastolfi <[email protected]>
Date:   Tue Oct 4 14:57:42 2016 +0000

    feat(module): Create the module

If no options.markdown or options.file is passed, it will return a JSON with the commits formated:

{
	"fix":[{
		"shortHash":"28fb6be",
		"subject":"fix: Fixe the markdown generation when several commits",
		"commitDate":"Wed Oct 5 11:12:05 2016 +0000",
		"type":"fix",
		"subjectMessage":"Fixe the markdown generation when several commits"
	}],
	"feat":[{
		"shortHash":"32bc36b",
		"subject":"feat(module): Write the markdown to a file",
		"commitDate":"Wed Oct 5 11:01:29 2016 +0000",
		"type":"feat",
		"scope":"module",
		"subjectMessage":"Write the markdown to a file"
	}, {
		"shortHash":"f9a3083",
		"subject":"feat(module): Create the module",
		"commitDate":"Tue Oct 4 14:57:42 2016 +0000",
		"type":"feat",
		"scope":"module",
		"subjectMessage":"Create the module"
	}]
}

If options.markdown: true is passed, it will return a markdown string:

#### New Features
* **module**: Write the markdown to a file ([32bc36b](https://github.com/EastolfiWebDev/GitCommitMarkdown/commit/32bc36b))
* **module**: Create the module ([f9a3083](https://github.com/EastolfiWebDev/GitCommitMarkdown/commit/f9a3083))

#### Bug Fixes
* Fixe the markdown generation when several commits ([28fb6be](https://github.com/EastolfiWebDev/GitCommitMarkdown/commit/28fb6be))
-----
*Changelog generated at Wed, 05 Oct 2016 11:58:24 GMT by [GitCommitMarkdown](https://github.com/EastolfiWebDev/GitCommitMarkdown)*

And if options.file: [path] is passed (or options.file: true for the default path), it will write to a CHANGELOG.md file the markdown, returning a success object:

New Features

  • module: Write the markdown to a file (32bc36b)
  • module: Create the module (f9a3083)

Bug Fixes

  • Fixe the markdown generation when several commits (28fb6be)

Changelog generated at Wed, 05 Oct 2016 11:58:24 GMT by GitCommitMarkdown