JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q58981F
  • License MIT

Remark plugin to process Conventional Commits changelogs to be displayed in a timeline.

Package Exports

  • remark-conventional-commit-changelog-timeline
  • remark-conventional-commit-changelog-timeline/dist/remark-conventional-commit-changelog-timeline.cjs.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remark-conventional-commit-changelog-timeline) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

remark-conventional-commit-changelog-timeline

Remark plugin to process Conventional Commits changelogs to be displayed in a timeline.

page on codsen.com page on npm page on github Downloads per month changelog MIT Licence

Install

This package is not pure ESM, you can require it.

npm i remark-conventional-commit-changelog-timeline

Quick Take

import { strict as assert } from "assert";
import { unified } from "unified";
import remarkParse from "remark-parse";
import remarkRehype from "remark-rehype";
import remarkGfm from "remark-gfm";
import rehypeFormat from "rehype-format";
import rehypeStringify from "rehype-stringify";

import c from "remark-conventional-commit-changelog-timeline";

function render(str, opts) {
  let res = unified()
    .data("settings", { fragment: true })
    .use(remarkParse)
    .use(remarkGfm)
    .use(remarkRehype)
    .use(c, opts)
    .use(rehypeFormat)
    .use(rehypeStringify)
    .processSync(str);

  return res.value;
}

let input = `
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 3.1.0 (2022-08-12)

### Features

- abc
- xyz
`;

let expected = `
<h2>3.1.0</h2>
<div class="release-date">Aug 12, <span>2022</span></div>
<h3><span class="emoji">✨</span> Features</h3>
<ul>
  <li>abc</li>
  <li>xyz</li>
</ul>
`;

assert.equal(
  render(input, {
    // defaults:
    dateDivLocale: "en-US",

    dateDivMarkup: ({ date, year, month, day }) =>
      `${month} ${day}, <span>${year}</span>`,
  }),
  expected,
);

Documentation

Please visit codsen.com for a full description of the API. If you’re looking for the Changelog, it’s here.

Contributing

To report bugs or request features or assistance, raise an issue on GitHub.

Licence

MIT License

Copyright © 2010-2025 Roy Revelt and other contributors

ok codsen star