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

@modulify/conventional-changelog

v0.1.2

Published

Generate a changelog from your git history using conventional commits. Groups entries by sections you define and skips commits reverted later. Customizable with Nunjucks templates.

Downloads

331

Readme

@modulify/conventional-changelog

Generate a changelog from your git history using conventional commits. Groups entries by sections you define and skips commits reverted later. Customizable with Nunjucks templates.

npm version codecov

🌐 Translations

  • Repository: https://github.com/modulify/conventional
  • Spec: https://www.conventionalcommits.org/en/v1.0.0/

Installation

  • npm: npm i @modulify/conventional-changelog
  • yarn: yarn add @modulify/conventional-changelog
  • pnpm: pnpm add @modulify/conventional-changelog

Quick start

import { createWrite } from '@modulify/conventional-changelog'

const write = createWrite({
  types: [
    { type: 'feat', section: 'Features' },
    { type: 'fix', section: 'Bug Fixes' },
  ],
})

const content = await write('1.0.0')
console.log(content)

You can also write directly to a file, and it will prepend with a header:

const write = createWrite({
  file: 'CHANGELOG.md',
  header: '# My Changelog',
})

await write('1.1.0')

Public API

createWrite

Factory function that creates a changelog writer.

createWrite(options?: ChangelogOptions): (version?: string) => Promise<string>

ChangelogOptions

  • cwd?: string — Working directory for git commands.
  • git?: Client — Custom @modulify/conventional-git client.
  • types?: CommitType[] — Custom type-to-section mapping.
  • header?: string — Static header for the changelog file (default: # Changelog).
  • context?: RenderContext — Additional context for the template (host, owner, repository, etc).
  • render?: RenderFunction — Custom render function.
  • file?: string — Optional file path to write/prepend the changelog to.
  • output?: Writable — Optional Node.js Writable stream to write the changelog to.

createRender

Creates a render function based on Nunjucks templates.

createRender(templatesPaths?: string | string[]): RenderFunction

You can provide custom paths to your own .njk templates to override the default ones (changelog.md.njk, commit.md.njk, header.md.njk, section.md.njk).

Middleware-style wrapper example:

import { createRender, createWrite } from '@modulify/conventional-changelog'

const base = createRender()

const write = createWrite({
  render: ({ version = '0.0.0', sections = [], highlights = [] }) => {
    const header = `<!-- generated -->\n## ${version}`
    const body = sections.map((section) => base.section(section)).join('\n\n')
    const notes = highlights.length
      ? '\n\n' + base({ version, sections: [], highlights })
      : ''

    return `${header}\n\n${body}${notes}`.trim()
  },
})

createEnvironment

Creates a Nunjucks environment with pre-configured filters (forge, shorten).

Behavior highlights:

  • Groups commits into sections according to types.
  • Skips commits that were later reverted; revert-of-revert chains are handled.
  • Automatically detects repository URL from git remote to generate links for commits and issues (supports GitHub).
  • When file is provided, it prepends the new version to the existing file content, keeping the header at the top.