Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
nf-conventional-changelog
Advanced tools
Generate a changelog from git metadata, using the Netflix DSC commit conventions
Generate a changelog from git metadata, using the AngularJS commit conventions
$ npm install conventional-changelog
Adapted from code originally written by @vojtajina and @btford in grunt-conventional-changelog.
Simple usage:
require('conventional-changelog')({
repository: 'https://github.com/joyent/node',
version: require('./package.json').version
}, function(err, log) {
console.log('Here is your changelog!', log);
});
changelog(options, callback)
By default, calls the callback with a string containing a changelog from the previous tag to HEAD, using pkg.version, prepended to existing CHANGELOG.md (if it exists).
callback
is the second parameter, and takes two parameters: (err, log)
. log
is a string containing the newly generated changelog, and err
is either an error or null.
options
is the first parameter, an object. The following fields are available:
version
{string}
- The version to be written to the changelog. For example, {version: "1.0.1"}
. Defaults to the version found in package.json
. See pkg
to configure the path of package.json.
subtitle
{string}
- A string to display after the version title in the changelog. For example, it will show '## 1.0.0 "Super Version"' if codename '"Super Version"' is given. By default, it's blank.
repository
{string}
- If this is provided, allows issues and commit hashes to be linked to the actual commit. Usually used with github repositories. For example, {repository: 'http://github.com/joyent/node'}
. Defaults to "normalized" repository.url
found in package.json
. See pkg
to configure the path of package.json.
pkg
{string}
- The path of package.json
. Defaults to ./package.json
.
from
{string}
- Which commit the changelog should start at. By default, uses previous tag, or if no previous tag the first commit.
to
{string}
- Which commit the changelog should end at. By default, uses HEAD.
file
{string}
- Which file to read the current changelog from and prepend the new changelog's contents to. By default, uses 'CHANGELOG.md'
.
versionText
{function(version, subtitle)}
- What to use for the title of a major version in the changelog. Defaults to '## ' + version + ' ' + subtitle
.
patchVersionText
{function(version, subtitle)}
- What to use for the title of a patch version in the changelog. Defaults to '### ' + version + ' ' + subtitle
.
commitLink
{function(commitHash)}
- If repository is provided, this function will be used to link to commits. By default, returns a github commit link based on options.repository: opts.repository + '/commit/' + hash
.
issueLink
{function(issueId)}
- If repository is provided, this function will be used to link to issues. By default, returns a github issue link based on options.repository: opts.repository + '/issues/' + id
.
log
{function()}
- What logging function to use. For example, {log: grunt.log.ok}
. By default, uses console.log
.
warn
{function()}
- What warn function to use. For example, {warn: grunt.log.writeln}
. By default, uses console.warn
.
BSD
FAQs
Generate a changelog from git metadata, using the Netflix DSC commit conventions
The npm package nf-conventional-changelog receives a total of 334 weekly downloads. As such, nf-conventional-changelog popularity was classified as not popular.
We found that nf-conventional-changelog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.