async function updateChangelog(packageName) {
  const path = changelogPath(packageName)
  const contents = String(fs.readFileSync(path))
  const match = contents.match(/([0-9]+\.[0-9]+\.[0-9]+)/)
  const latestVersion = match ? match[1] : undefined

  if (!valid(latestVersion)) {
    throw new Error(
      `Could not resolve the latest version of ${packageName} in ${path}`
    )
  }
  const changeLog = await generateChangelog(packageName, latestVersion)
  if (!changeLog) {
    return false
  }

  addChangelogEntries(packageName, changeLog, contents)
  console.log(`Updated ${path}`)
  return true
}
Add new versions to the changelog starting from the most recent version listed there
(incremental updates)