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 🙏

© 2024 – Pkg Stats / Ryan Hefner

conv-changelog

v1.0.0

Published

A conventional commits changelog generator

Downloads

9

Readme

conv-changelog

A conventional commits compatible changelog generator.

Attribute commit messages according to determine the next semver version of your package.

With this, conv-changelog can generate the changelog in markdown format for the whole git history or just the next unreleased version.

Conventions: (From conventional commits)

The commit message should be structured as follows:


<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Where:

| type | note | | -------- | --------------------------------------------------------------------- | | feat!: | ! describes a BREAKING CHANGE (The major version needs increment) | | feat: | describes a feature change (The minor version needs increment) | | fix: | describes a bugfix change (The patch version needs increment) | | chore: | types other than feat: or fix: are allowed, e.g. build:, chore:, docs:, refactor:, perf:, test: |

For breaking changes it is good practice to describe the reason with BREAKING CHANGE: in the footer, e.g.

chore!: drop support for node 12

BREAKING CHANGE: Switch to ESM modules.

Additionally you can use the types break: or BREAKING CHANGE: in this project, to describe breaking commits. E.g.

break: drop support for node 12

We are switching to ESM modules.

Any commit message which is not according to this convention is considered being of type fix: and it's patch version is incremented.

If a package.json file is found in the working directory the version property is updated to the next pre-release according to the above described conventions.

Otherwise a VERSION file is generated or updated.

How does is look like? Take a look at CHANGELOG.md.

Usage

Either install in your project or globally with:

npm install -g conv-changelog

Then run the cli, e.g. (this creates a CHANGELOG.md for the next version)

conv-changelog -o

CLI

  conv-changelog [options]

  options:

    -h|-?|--help
                          this help
    -v|--version
                          show version
    -i|--in <filename>
                          input filename; defaults to CHANGELOG.md
    -o|--out [<filename>]
                          output filename; if <filename> is omitted then input
                          file gets pre-pended.
    -r|--revision <count>
                          generate <count> versions
                          default is 1; if set to 0 the full history is
                          processed.
    -t|--theme [groups|lines]
                          use theme groups or lines
                          default is lines.
    -u|--url <href>
                          Repo url.
    -f|--filter <regex>
                          filter commit subjects by regular expression.
    -d|--dir <dirname>
                          use different dirname instead of current working
                          directory.
    --from <tagname>
                          start from git tag or hash.
    --to <tagname>
                          end with git tag or hash.

API

import {changelog, handleFiles} from 'conv-changelog'

// this generates CHANGELOG.md for the complete git history.
const options = {
  cwd: process.cwd(),
  in: 'CHANGELOG.md',
  out: 'CHANGELOG.md',
  revisions: 0
}
const { changes, lastVersion, nextVersion } = await changelog(options)
await handleFiles(options, { changes, lastVersion, nextVersion })

Please check out main() in ./src/cli.js.

License

MIT