1. conventional-recommended-bump
Get a recommended version bump based on conventional commits.
conventional-recommended-bump
Package: conventional-recommended-bump
Created by: conventional-changelog
Last modified: Fri, 03 May 2024 22:57:21 GMT
Version: 10.0.0
License: MIT
Downloads: 8,767,980
Repository: https://github.com/conventional-changelog/conventional-changelog

Install

npm install conventional-recommended-bump
yarn add conventional-recommended-bump

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(process.cwd()).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 & Params | string): this

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

bumper.commits(params: GetCommitsParams & Params, 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.

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

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin