Gathering detailed insights and metrics for conventional-changelog
Gathering detailed insights and metrics for conventional-changelog
Gathering detailed insights and metrics for conventional-changelog
Gathering detailed insights and metrics for conventional-changelog
conventional-changelog-conventionalcommits
Conventionalcommits.org preset for conventional-changelog.
conventional-changelog-angular
Angular preset for conventional-changelog.
conventional-changelog-core
Core package of conventional-changelog.
conventional-changelog-writer
Write logs based on conventional commits and templates.
Generate changelogs and release notes from a project's commit messages and metadata.
npm install conventional-changelog
Typescript
Module System
Min. Node Version
Node Version
NPM Version
conventional-changelog: v7.1.1
Updated on Jul 10, 2025
conventional-changelog-conventionalcommits: v9.1.0
Updated on Jul 10, 2025
conventional-changelog-writer: v8.2.0
Updated on Jul 09, 2025
conventional-commits-parser: v6.2.0
Updated on Jun 09, 2025
conventional-recommended-bump: v11.2.0
Updated on Jun 07, 2025
conventional-changelog: v7.1.0
Updated on Jun 07, 2025
TypeScript (77.48%)
JavaScript (20.23%)
Handlebars (2.29%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
ISC License
8,156 Stars
1,786 Commits
729 Forks
54 Watchers
3 Branches
152 Contributors
Updated on Jul 11, 2025
Latest Version
7.1.1
Package Id
conventional-changelog@7.1.1
Unpacked Size
378.88 kB
Size
33.94 kB
File Count
45
NPM Version
10.8.2
Node Version
20.19.3
Published on
Jul 10, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Generate a changelog from git metadata.
[!NOTE] You don't have to use the angular commit convention. For the best result of the tool to tokenize your commit and produce flexible output, it's recommended to use a commit convention.
1# pnpm 2pnpm add conventional-changelog 3# yarn 4yarn add conventional-changelog 5# npm 6npm i conventional-changelog
1conventional-changelog -p angular
This will not overwrite any previous changelogs. The above generates a changelog based on commits since the last semver tag that matches the pattern of "Feature", "Fix", "Performance Improvement" or "Breaking Changes".
If this is your first time using this tool and you want to generate all previous changelogs, you could do
1conventional-changelog -p angular -r 0
This will overwrite any previous changelogs if they exist.
All available command line parameters can be listed using CLI: conventional-changelog --help
.
[!TIP] You can alias your command or add it to your package.json. EG:
"changelog": "conventional-changelog -p angular -r 0"
.
package.json
conventional-changelog
package.json
and CHANGELOG.md
filesThe reason why you should commit and tag after conventional-changelog
is that the CHANGELOG should be included in the new release, hence commits.from
defaults to the latest semver tag.
npm version
Using the npm scripts to our advantage with the following hooks:
1{ 2 "scripts": { 3 "version": "conventional-changelog -p angular && git add CHANGELOG.md" 4 } 5}
You could follow the following workflow
npm version [patch|minor|major]
commandYou could optionally add a preversion
script to package your project or running a full suit of test.
And a postversion
script to clean your system and push your release and tags.
By adding a .npmrc
you could also automate your commit message and set your tag prefix as such:
tag-version-prefix=""
message="chore(release): %s :tada:"
1import { ConventionalChangelog } from 'conventional-changelog' 2 3const generator = new ConventionalChangelog() 4 .readPackage() 5 .loadPreset('angular') 6 7generator 8 .writeStream() 9 .pipe(process.stdout) 10 11// or 12 13for await (const chunk of generator.write()) { 14 console.log(chunk) 15}
new ConventionalChangelog(cwdOrGitClient: string | ConventionalGitClient = process.cwd())
Create a new instance of conventional-changelog generator. cwdOrGitClient
is the current working directory or a ConventionalGitClient
instance.
generator.loadPreset(preset: PresetParams): this
Load and set necessary params from a preset.
generator.config(config: Preset | Promise<Preset>): this
Set the config directly.
generator.readPackage(transform?: PackageTransform): this
Find package.json
up the directory tree and read it. Optionally transform the package data.
generator.readPackage(path: string, transform?: PackageTransform): this
Read a package.json
file from a specific path. Optionally transform the package data.
generator.package(pkg: Record<string, unknown>): this
Set the package data directly.
generator.readRepository(): this
Read and parse the repository URL from current git repository.
generator.repository(infoOrGitUrl: string | Partial<HostedGitInfo>): this
Set the repository info directly.
generator.options(options: Options): this
Set conventional-changelog options.
Name | Type | Default | Description |
---|---|---|---|
reset | boolean | false | Whether to reset the changelog or not. |
append | boolean | false | Should the log be appended to existing data. |
releaseCount | number | 1 | How many releases of changelog you want to generate. It counts from the upcoming release. Useful when you forgot to generate any previous changelog. Set to 0 to regenerate all. |
outputUnreleased | boolean | true if a different version than last release is given. Otherwise false | If this value is true and context.version equals last release then context.version will be changed to 'Unreleased' . |
transformCommit | (commit: Commit, params: Params) => Partial<Commit> | Promise<Partial<Commit> | null> | null | A transform function that applies after the parser and before the writer. | |
warn | function | Logger for warnings | |
debug | function | Logger for debug messages | |
fromatDate | (date: Date) => string | Custom date formatter function. |
generator.context(context: Context): this
Set the writer context.
generator.tags(params: GetSemverTagsParams): this
Set params to get semver tags.
Name | Type | Default | Description |
---|---|---|---|
prefix | string | RegExp | Specify a prefix for the git tag that will be taken into account during the comparison. | |
skipUnstable | boolean | false | If set, unstable release tags will be skipped, e.g. x.x.x-rc. |
clean | boolean | false | Clean version from prefix and trash. |
If you want to take package-prefixed tags, for example lerna-style tags, you should use packagePrefix
utility function:
1import { 2 ConventionalChangelog, 3 packagePrefix 4} from 'conventional-changelog' 5 6const generator = new ConventionalChangelog() 7 .readPackage() 8 .loadPreset('angular') 9 .tags({ 10 prefix: packagePrefix('foo-package') 11 })
generator.commits(params: GetCommitsParams, parserOptions?: ParserStreamOptions): this
Set params to get commits.
generator.writer(params: WriterOptions): this
Set writer options.
generator.write(includeDetails?: boolean): AsyncGenerator<string | Details<Commit>, void>
Generate changelog.
generator.writeStream(includeDetails?: boolean): Readable
Generate changelog stream.
MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 2/25 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More