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

changelog-creator

v0.2.1

Published

Generate a changelog from git metadata

Downloads

13

Readme

Changelog creation

This package creates a Changelog based on the commit messages from your repo's history. The commit messages are grouped by the tag version they belong to. If youre package.json has a version not belonging to an already created tag, this version will also be listed in the Changelog.

The benefit of this package is that it can also sort the commits by type (currently only conventional commit types) and it does not throw the commit messages not following the pattern away, but puts them into an own subsection (currently "others").

So if you started with conventional commits at a later stage in your project, you will not get a semi-complete Changelog with this package.

Please note: This is still a work in progress!!

Installation

You can either install this package as a devDependency:

npm install --save-dev changelog-creator

and configure it as a script, e.g.:

    "changelog": "changelog-creator --sort-by=type"

OR

You can install this package globally

npm install -g changelog-creator

and run the commands directly in your terminal:

changelog-creator --releases-only

Current requirements

Help

Run

changelog-creator --help

or for scripts

npm run changelog -- --help

in order to see all possible configurations.

The output is currently:

  "--tag-prefix", "-t": Define which prefix you use for your tags. Default: "v", e.g. "v1.0.1".

  "--releases-only","-r": If the Changelog should be only grouped in releases and not also in pre-releases. Default: Pre-releases appear in Changelog.

  "--has-upcoming-section","-u": If the Changelog should have a section with the latest commits which don't belong to a version yet. Default: false.

  "--sort-by","-s": If the commits should be grouped. Options: "type" | undefined. Default: undefined.

  "--help", "-h": Display help for this package.

Usage

The default configuration for this package is:

 "--tag-prefix": "v",
 "--releases-only": false,
 "--has-upcoming-section": false,
 "--sort-by": undefined

which leads to a Changelog that is only grouped by tags (and maybe also your package.json version) and the commits are listed by creation date. Pre-releases aren't filtered in this setup.

If you have the following setup

git tags:
    v0.1.0
    v0.2.0
    v0.3.0-alpha.1

package.json:
    version: 0.3.0

then the Changelog will contain the sections v0.1.0, v0.2.0, v0.3.0-alpha.1 and v0.3.0.

--tag-prefix

Please note that the Changelog can currently only be created, if the tags follow the semantic versioning specification. The prefix of the tag can be defined via --tag-prefix=meow-. So having tags like 0.1.0 or meow-0.1.0 is fine as long as you define it as a prefix in this package.

--releases-only

This flag can be used to filter pre-releases. The commits of pre-releases like e.g. v0.3.0-alpha.1 are then listed under v0.3.0. If the tag with version v0.3.0 does not exist or the package.json does not contain such a version, the commits won't be listed in the Changelog.

--has-upcoming-section

This flag can get handy in the beginning if your Changelog is empty or if you would like to see the latest commit messages. It lists commit messages that will be part of the next release, but the next version is not yet defined in the package.json.

--sort-by

The commit messages in the Changelog are grouped by tags. The commit messages belonging to a section are sorted by creation date per default. However, it is possible to sort them by type. Currently, only conventional commits are supported.

Accepted values

  • type