Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

changelogfmt

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

changelogfmt

Formats the reference links of Keep a Changelog style files.

  • 2.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by80%
Maintainers
1
Weekly downloads
 
Created
Source

changelogfmt npm version

Formats the reference links of Keep a Changelog style files.

Overview

When maintaining a changelog file in the Keep a Changelog format, you need to manually add links to compare each version with the previous one.

You might also reference issues and pull requests, and unlike in GitHub comments, you need to explicitly add the Markdown link for those in your changelog.

This can be a bit cumbersome and error-prone. To ease that, let me introduce changelogfmt.

This tool takes your changelog as stdin, makes sure that each version has the proper GitHub compare URL (or adds it otherwise), identifies all # links to add the issue or PR link reference for all the missing ones, and outputs the new version to stdout.

Installation

npm install -g changelogfmt

Usage

Format given file, stdin or CHANGELOG.md otherwise, and print it to stdout:

changelogfmt whatever.md
changelogfmt < whatever.md
changelogfmt

Format given file or CHANGELOG.md otherwise, and overwrite it:

changelogfmt --write whatever.md
changelogfmt --write

My favorite way is from inside Vim, while editing the changelog file:

:%!changelogfmt

Development

# Lint the code.
npm run lint

Possible improvements

Pull requests are welcome!

  • Automatically fetch version dates from Git tags if missing (or validate existing ones too).
  • Add missing version entries based on Git tags.

FAQs

Package last updated on 11 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc