Socket
Socket
Sign inDemoInstall

conventional-changelog-conventionalcommits

Package Overview
Dependencies
4
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    conventional-changelog-conventionalcommits

Conventionalcommits.org preset for conventional-changelog.


Version published
Maintainers
2
Install size
34.0 kB
Created

Package description

What is conventional-changelog-conventionalcommits?

The conventional-changelog-conventionalcommits package is a preset for the conventional-changelog tool that formats changelogs according to the Conventional Commits specification. This specification outlines a set of rules for creating an explicit commit history, which makes it easier to automate the generation of release notes.

What are conventional-changelog-conventionalcommits's main functionalities?

Generating changelogs

This feature allows you to generate a changelog from git metadata using the conventional commits specification. The code sample demonstrates how to create a changelog stream and write it to a file.

const conventionalChangelog = require('conventional-changelog');
const fs = require('fs');
const stream = fs.createWriteStream('CHANGELOG.md');

conventionalChangelog({
  preset: 'conventionalcommits'
}).pipe(stream);

Customizing changelog generation

This feature allows for customization of the changelog generation process. The code sample shows how to generate a changelog with all releases and includes a placeholder for additional configuration options.

const conventionalChangelog = require('conventional-changelog');
const fs = require('fs');
const stream = fs.createWriteStream('CHANGELOG.md');

conventionalChangelog({
  preset: 'conventionalcommits',
  releaseCount: 0, // Generate all releases
  config: {
    // Custom configuration here
  }
}).pipe(stream);

Other packages similar to conventional-changelog-conventionalcommits

Readme

Source

conventional-changelog-conventionalcommits

ESM-only package NPM version Node version Dependencies status Install size Build status Coverage status

A concrete implementation of the specification described at conventionalcommits.org for automated CHANGELOG generation and version management.

Install

# yarn
yarn add -D conventional-changelog-conventionalcommits
# pnpm
pnpm add -D conventional-changelog-conventionalcommits
# npm
npm i -D conventional-changelog-conventionalcommits

Indirect Usage (as preset)

Use the Conventional Changelog CLI Quick Start with the -p conventionalcommits option.

Direct Usage (as a base preset so you can customize it)

If you want to use this package directly and pass options, you can use the Conventional Changelog CLI Quick Start and with the --config or -n parameter, pass a js config that looks like this:

import createPreset from 'conventional-changelog-conventionalcommits'

createPreset({
  issuePrefixes: ['TEST-'],
  issueUrlFormat: 'https://myBugTracker.com/{{prefix}}{{id}}'
}).then((config) => {
  // do something with the config
})

or json config like that:

{
  "options": {
    "preset": {
      "name": "conventionalchangelog",
      "issuePrefixes": ["TEST-"],
      "issueUrlFormat": "https://myBugTracker.com/{{prefix}}{{id}}"
    }
  }
}

This last json config way passes the preset object to the conventional-changelog-preset-loader package, that in turn, passes this same preset object as the config for the conventional-changelog-conventionalcommits.

See conventional-changelog-config-spec for available configuration options.

Keywords

FAQs

Last updated on 03 May 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc