Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@wroud/conventional-commits-changelog

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wroud/conventional-commits-changelog

A TypeScript library for generating markdown changelogs from conventional commit messages, providing a structured and consistent format for documenting project updates.

latest
npmnpm
Version
0.2.1
Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

@wroud/conventional-commits-changelog

ESM-only package NPM version

@wroud/conventional-commits-changelog is a TypeScript library designed to generate changelogs in markdown format based on conventional commit messages. It provides a structured and consistent format for documenting changes, helping developers keep track of notable updates and modifications in their projects.

Features

  • Changelog Generation: Automatically create changelogs from conventional commits.
  • Customizable Headers: Generate changelog headers with options for headline levels and descriptions.
  • Structured Output: Organize changelog entries by categories such as features, fixes, breaking changes, and contributors.
  • TypeScript Support: Written in TypeScript for type safety and improved developer experience.
  • Pure ESM package

Installation

Install via npm:

npm install @wroud/conventional-commits-changelog @wroud/conventional-commits-parser

Usage

To generate a changelog, you first need to parse your conventional commit messages. Here's an example of how to use the library:

import {
  createConventionalChangelog,
  createConventionalChangelogHeader,
} from "@wroud/conventional-commits-changelog";
import { getGitCommits } from "@wroud/git";

async function generateChangelog(version: string, compareUrl?: string) {
  const commitGenerator = getGitCommits();
  const commits: any[] = []; // Adjust type as needed

  for await (const commitInfo of commitGenerator) {
    commits.push(commitInfo);
  }

  const header = createConventionalChangelogHeader(version, compareUrl);
  const changelog = createConventionalChangelog(commits);

  // Combine header and changelog output
  const output: string[] = [];
  for (const line of header) {
    output.push(line);
  }
  for await (const line of changelog) {
    output.push(line);
  }

  console.log(output.join("\n"));
}

// Example usage
generateChangelog(
  "1.0.0",
  "https://github.com/Wroud/foundation/compare/git-v0.1.1...git-v0.1.2",
);

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

changelog

FAQs

Package last updated on 22 Sep 2025

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