{"id":26192,"library":"remark-common-changelog","title":"remark-common-changelog","description":"A remark plugin to lint or fix a Markdown changelog according to the Common Changelog specification. Current stable version 2.3.2 (npm, 2023). ESM-only, requires Node >=12.20. It enforces changelog structure, heading format, version links, dates, release ordering, and can auto-fill empty releases with commit logs. Unlike generic Markdown linting, it specializes in changelog conventions and integrates with git history.","status":"active","version":"2.3.2","language":"javascript","source_language":"en","source_url":"https://github.com/vweevers/remark-common-changelog","tags":["javascript","changelog","common-changelog","remark"],"install":[{"cmd":"npm install remark-common-changelog","lang":"bash","label":"npm"},{"cmd":"yarn add remark-common-changelog","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-common-changelog","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as the unified processor to use the plugin.","package":"remark","optional":false},{"reason":"Used to read and write VFile from the filesystem in examples, but not a runtime dependency of the plugin itself.","package":"to-vfile","optional":true}],"imports":[{"note":"The package is ESM-only since v2.0.0, so CJS require will fail.","wrong":"const changelog = require('remark-common-changelog')","symbol":"default (changelog)","correct":"import changelog from 'remark-common-changelog'"},{"note":"Use the unified ecosystem: import remark and call .use() with the plugin.","wrong":"remark().use(changelog) without importing remark","symbol":"remark use","correct":"import { remark } from 'remark'; remark().use(changelog)"},{"note":"TypeScript types are not explicitly documented; may rely on inferred types.","wrong":"","symbol":"TypeScript types","correct":"import type { ... } from 'remark-common-changelog'"}],"quickstart":{"code":"import changelog from 'remark-common-changelog'\nimport { readSync, writeSync } from 'to-vfile'\nimport { remark } from 'remark'\n\nremark()\n  .use(changelog)\n  .process(readSync('CHANGELOG.md'), (err, file) => {\n    if (err) throw err\n    writeSync(file)\n  })\nconsole.log('CHANGELOG.md linted and fixed (if fix mode enabled)')","lang":"javascript","description":"Lint and fix a CHANGELOG.md file using remark-common-changelog plugin with to-vfile for I/O."},"warnings":[{"fix":"Update Node to >=12.20 and use import instead of require.","message":"v2.0.0 broke ESM/CJS: switched to ESM-only and dropped Node <12.20.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure the first line is '# Changelog' or let fix mode add/update it.","message":"Changelog must start with a top-level \"Changelog\" heading (title rule).","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Use version format '1.0.0' not 'v1.0.0' in headings.","message":"Release versions must be semver-valid, no 'v' prefix.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Use '[1.0.0]: <url>' reference style, not inline links.","message":"Release headings require a link reference (release-version-link-reference rule).","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Manually review and edit the filled content.","message":"Auto-fill empty releases with commit log uses git history; may include unwanted commits.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Switch to ES modules: use import syntax or rename file to .mjs.","cause":"Using CJS require() on an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Run 'npm install remark' or include it in your dependencies.","cause":"Missing peer dependency 'remark' not installed.","error":"Error: Cannot find module 'remark'"},{"fix":"Run 'npm install to-vfile' if you are using it in your code.","cause":"Missing optional dependency used in examples.","error":"Error: Cannot find module 'to-vfile'"},{"fix":"Ensure CHANGELOG.md exists and starts with '# Changelog'.","cause":"Changelog file missing or malformed (e.g., no 'Changelog' heading).","error":"TypeError: Cannot read properties of undefined (reading 'some')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}