Gathering detailed insights and metrics for keep-a-changelog
Gathering detailed insights and metrics for keep-a-changelog
Gathering detailed insights and metrics for keep-a-changelog
Gathering detailed insights and metrics for keep-a-changelog
@release-it/keep-a-changelog
Keep-a-changelog plugin for release-it
@slavkojos/keep-a-changelog
[Keep a Changelog](https://github.com/oscarotero/keep-a-changelog) library for Node & Deno
git-cliff-linux-x64
A highly customizable Changelog Generator that follows Conventional Commit specifications ⛰️
git-cliff
A highly customizable Changelog Generator that follows Conventional Commit specifications ⛰️
Node & Deno package to parse and generate changelogs
npm install keep-a-changelog
Typescript
Module System
Node Version
NPM Version
TypeScript (100%)
Total Downloads
811,615
Last Day
1,384
Last Week
5,997
Last Month
25,237
Last Year
350,528
MIT License
62 Stars
202 Commits
24 Forks
4 Watchers
3 Branches
14 Contributors
Updated on Mar 23, 2025
Minified
Minified + Gzipped
Latest Version
2.6.2
Package Id
keep-a-changelog@2.6.2
Unpacked Size
0.98 MB
Size
126.13 kB
File Count
792
NPM Version
10.8.1
Node Version
22.3.0
Published on
Mar 23, 2025
Cumulative downloads
Total Downloads
1
2
Keep a Changelog library for Node & Deno
Deno package to parse and generate changelogs following the keepachangelog format.
1import { parser } from "keep-a-changelog"; 2import fs from "fs"; 3 4//Parse a changelog file 5const changelog = parser(fs.readFileSync("CHANGELOG.md", "UTF-8")); 6 7//Generate the new changelog string 8console.log(changelog.toString());
1import { parser } from "https://deno.land/x/changelog@v2.2.1/mod.ts"; 2 3//Parse a changelog file 4const changelog = parser(await Deno.readTextFile("CHANGELOG.md")); 5 6//Generate the new changelog string 7console.log(changelog.toString());
1import { 2 Changelog, 3 Release, 4} from "https://deno.land/x/changelog@v2.2.1/mod.ts"; 5 6const changelog = new Changelog("My project") 7 .addRelease( 8 new Release("0.1.0", "2017-12-06") 9 .added("New awesome feature") 10 .added("New other awesome feature") 11 .fixed("Bug #3") 12 .removed("Drop support for X"), 13 ) 14 .addRelease( 15 new Release("0.2.0", "2017-12-09") 16 .security("Fixed security vulnerability") 17 .deprecated("Feature X is deprecated"), 18 ); 19 20console.log(changelog.toString());
By default, the output format of the markdown is "compact", that removes the
space after the headings. You can change it to follow the
markdownlint
rules:
1const changelog = new Changelog(); 2changelog.format = "markdownlint";
By default, the bullet style of the markdown is "-". You can change it to use other styles of bullet points:
1const changelog = new Changelog(); 2changelog.bulletStyle = "*";
By default, the tag names are v
+ version number. For example, the tag for the
version 2.4.9
is v2.4.9
. To change this behavior, set a new
tagNameBuilder
:
1const changelog = new Changelog(); 2changelog.tagNameBuilder = (release) => `version-${release.version}`;
By default, compare links are build compliant with GitHub format. To change this
behavior, set a new compareLinkBuilder
:
1const changelog = new Changelog(); 2changelog.url = "https://bitbucket.org/oscarotero/keep-a-changelog"; 3changelog.compareLinkBuilder = (previous, release) => 4 `${this.url}/branches/compare/${release.version}%0D${previous.version}`;
By default and according to the keepachangelog
format, the change types are Added
, Changed
, Deprecated
, Removed
,
Fixed
, and Security
.
In case you'd like add another type, you need to extend the Release
class to
support new types. Additionally, you have to tell the parser
that it should
create instances of your new extended Release
in order to parse your changelog
correctly.
For example, we would like to add a type Maintenance
. Extend the provided
Release
class:
1class CustomRelease extends Release { 2 constructor(version, date, description) { 3 super(version, date, description); 4 // add whatever types you want - in lowercase 5 const newChangeTypes = [ 6 ["maintenance", []], 7 ]; 8 9 this.changes = new Map([...this.changes, ...newChangeTypes]); 10 } 11 // for convenience, add a new method to add change of type 'maintanance' 12 maintenance(change) { 13 return this.addChange("maintenance", change); 14 } 15}
And once you want to use the parser:
1const releaseCreator = (ver, date, desc) => new CustomRelease(ver, date, desc);
2const changelog = parser(changelogTextContent, { releaseCreator });
This library provides the changelog
command to normalize the changelog format.
It reads the CHANGELOG.md file and override it with the new format:
Deno:
1deno install --global --allow-read --allow-write -fr --name changelog https://deno.land/x/changelog/bin.ts
Node:
1npm install keep-a-changelog -g
Run the script:
1changelog
To use other file name:
1changelog --file=History.md
To generate an empty new CHANGELOG.md file:
1changelog --init
You can release automatically the latest "Unreleased" version:
1changelog --release
If your "Unreleased" section has no version, you can specify it as an argument:
1changelog --release 2.0.0
Print the latest released version:
1changelog --latest-release 2> 2.0.0
Print the latest release:
1changelog --latest-release-full 2## 2.6.1 - 2025-02-24 3### Fixed 4- NPM publishing [#55], [#56].
See available options:
1changelog --help
No vulnerabilities found.
Reason
30 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 6/14 approved changesets -- score normalized to 4
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-04-28
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
84%
1,384
Compared to previous day
Last Week
3%
5,997
Compared to previous week
Last Month
-13.3%
25,237
Compared to previous month
Last Year
99%
350,528
Compared to previous year