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

@bhaireshm/gencl

v0.1.4

Published

A simple and efficient tool to generate a `CHANGELOG.md` file for your Git repository

Downloads

135

Readme

Changelog Generator

A simple and efficient tool to generate a CHANGELOG.md file for your Git repository. This tool lists all the commits between two specified commits, formatted by date and including commit messages and bodies.

Features

  • Generates a CHANGELOG.md file with commit details.
  • Supports specifying a range of commits.
  • Option to reverse the order of commits.
  • Customizable repository URL, file name, changelog path, and title format.
  • Supports multiple range operators ("...", "..", "space") for specifying commit ranges.

Installation

Install the package globally via npm:

npm install -g @bhaireshm/gencl

Usage

Using the generateChangelog Function

You can use the generateChangelog function in your Node.js scripts to generate a changelog programmatically.

Function Signature

generateChangelog(fromHash = '', toHash = 'HEAD'): void

Example

import ChangelogGenerator from "@bhaireshm/gencl";

const config = {
  repoUrl: "https://github.com/username/repo",
  fileName: "MY_CHANGELOG.md",
  changelogPath: "/path/to/save",
  reverse: true,
  title: "My Changelog",
  remoteName: "origin",
  rangeOperator: "...",
};

const changelogGenerator = new ChangelogGenerator(config);
changelogGenerator.generateChangelog({ fromHash: "abc1234", toHash: "def5678" });

Using the CLI

You can also use the CLI to generate a changelog. The available options are:

| Option | Alias | Description | Default | | ----------------- | ----- | ------------------------------------ | ------------------------------ | | --from | -f | The starting commit hash. | empty string | | --to | -t | The ending commit hash. | HEAD | | --reverse | -r | Reverse the order of commits. | false | | --repoUrl | -u | The repository URL. | remote.{remoteName}.url | | --fileName | -n | The name of the changelog file. | CHANGELOG.md | | --changelogPath | -p | The path to save the changelog file. | current working directory | | --title | -l | The title of the changelog. | Timeline: {day}-{month}-{year} | | --remoteName | -m | The name of the remote. | origin | | --rangeOperator | -o | The range operator to use. | space |

CLI Examples

Simple Example

Generate a changelog from the last commit to the current commit:

gencl -f HEAD~1 -t HEAD

Custom Repository URL and File Name

Generate a changelog with a custom repository URL and file name:

gencl -f abc1234 -t def5678 -u https://github.com/username/repo -n MY_CHANGELOG.md

Reverse Order and Custom Title

Generate a changelog with the commits in reverse order and a custom title:

gencl -f abc1234 -t def5678 -r -l "My Changelog"

Custom Range Operator

Generate a changelog using a custom range operator:

gencl -f abc1234 -t def5678 -o "..."