getLatestChangelog.mjs 208 B

123456
  1. import { readFile } from 'fs/promises';
  2. const changelogContent = await readFile('./CHANGELOG.md', 'utf-8');
  3. const [, lastChangelog] = changelogContent.split(/^## .*$/gm);
  4. console.log(lastChangelog.trim());