Skip to content

changelog() ​

Write the CHANGELOG.md files from Node.js with changelog(), the changelog of each package and the root one, for a bump result or a range of commits.

ts
function changelog(options?: Partial<ChangelogOptions>): Promise<void>

changelog() runs relizy changelog: it writes the CHANGELOG.md of each package (and the root one in a monorepo), then runs the format command. It resolves once the files are written.

Options ​

The flags of relizy changelog, camelCased, and the shared options:

OptionDescription
bumpResultBumpResultTruthy, the result of bump(): the changelogs of the bumped packages, at their new version
from, toThe commit range, instead of the last release tag and HEAD
formatCmdOverrides changelog.formatCmd
rootChangelogOverrides changelog.rootChangelog
forceWithout bumpResult, includes the packages without commits
suffixWithout bumpResult, the prerelease suffix of the versions, as for bump()
privatePackagesOverrides monorepo.privatePackages
includeCommitBodyOverrides changelog.includeCommitBody

See ChangelogOptions for the types.

Examples ​

ts
import { bump, changelog } from 'relizy'

const bumpResult = await bump({ yes: true })

if (bumpResult.bumped) {
  await changelog({ bumpResult })
}

A given range, previewed:

ts
await changelog({ from: 'v1.0.0', to: 'v1.1.0', dryRun: true })

See Also ​