conventional-recommended-bump

Get a recommended version bump based on conventional commits.

MIT 52 个版本
安装
npm install conventional-recommended-bump
yarn add conventional-recommended-bump
pnpm add conventional-recommended-bump
bun add conventional-recommended-bump
README

conventional-recommended-bump

ESM-only package NPM version Node version Dependencies status Install size Build status Coverage status

Get a recommended version bump based on conventional commits.

Got the idea from https://github.com/conventional-changelog/conventional-changelog/pull/29


Install   •   Usage   •   API   •   CLI

Install

# pnpm
pnpm add conventional-recommended-bump
# yarn
yarn add conventional-recommended-bump
# npm
npm i conventional-recommended-bump

Usage

import { Bumper } from 'conventional-recommended-bump'

const bumper = new Bumper().loadPreset('angular')
const recommendation = await bumper.bump()

console.log(recommendation.releaseType) // 'major'

API

new Bumper(cwdOrGitClient: string | ConventionalGitClient = process.cwd())

Create a new Bumper instance. cwdOrGitClient is the current working directory or a ConventionalGitClient instance.

bumper.tag(paramsOrTag: GetSemverTagsParams | string): this

Set params to get the last semver tag or set the tag directly.

bumper.commits(params: GetCommitsParams, parserOptions?: ParserStreamOptions): this

Set params to get the commits.

bumper.commits(commits: Iterable<Commit> | AsyncIterable<Commit>): this

Set the commits directly.

bumper.loadPreset(preset: PresetParams): this

Load and set necessary params from a preset.

generator.config(config: Preset | Promise<Preset>): this

Set the config directly.

bumper.bump(whatBump?: (commits: Commit[]) => Promise<BumperRecommendation | null | undefined>): Promise<BumperRecommendation>

Get a recommended version bump based on conventional commits. whatBump function is required if preset is not loaded.

CLI

conventional-recommended-bump --help

License

MIT © Steve Mao

版本列表
11.2.0 2025-06-07
11.1.0 2025-05-19
11.0.0 2025-02-16
10.0.0 2024-05-03
9.0.0 2023-09-08
8.0.0 2023-08-27
7.0.1 2023-06-06
7.0.0 2023-06-06
6.1.0 2020-12-30
6.0.12 2020-12-30
6.0.11 2020-11-05
6.0.10 2020-08-12
6.0.9 2020-05-08
6.0.5 2019-11-14
6.0.4 2019-11-07
6.0.3 2019-10-24
6.0.2 2019-10-03
6.0.0 2019-07-29
5.0.1 2019-05-18
5.0.0 2019-05-02
4.1.1 2019-04-11
4.0.4 2018-11-01
4.0.3 2018-11-01
4.0.1 2018-08-21
4.0.0 2018-06-06
3.0.0 2018-05-29
2.0.9 2018-04-16
2.0.8 2018-03-27
2.0.7 2018-03-22
2.0.6 2018-02-24
2.0.5 2018-02-20
2.0.4 2018-02-13
2.0.3 2018-02-13
2.0.1 2018-02-12
2.0.0 2018-02-12
1.2.1 2018-02-05
1.2.0 2018-01-29
1.1.0 2017-12-08
1.0.3 2017-11-13
1.0.2 2017-10-01
1.0.1 2017-07-17
1.0.0 2017-03-11
0.3.0 2016-08-13
0.2.1 2016-04-16
0.2.0 2016-04-02
0.1.2 2016-03-10
0.1.1 2016-02-23
0.1.0 2016-02-08
0.0.3 2015-08-12
0.0.2 2015-07-03
0.0.1 2015-06-22
0.0.0 2015-06-17