Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

536 B
Raw Blame
/**
 * Linkify CHANGELOG.md
 */

import { readFileSync, writeFileSync } from "node:fs";
import { remark } from "remark";
import remarkGithub from "remark-github";
import remarkInlineLinks from "remark-inline-links";

const filepath = new URL("../CHANGELOG.md", import.meta.url);

writeFileSync(
  filepath,
  remark()
    .data("settings", {
      bullet: "-",
      incrementListMarker: false,
      listItemIndent: "one",
    })
    .use([remarkGithub, remarkInlineLinks])
    .processSync(readFileSync(filepath))
    .toString(),
);