From f579ff08f386aaae022a395ed0dbec9af77a5d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mica=C3=ABl=20Mbagira?= Date: Tue, 4 May 2021 02:24:41 +0200 Subject: [PATCH] feat: add --lerna-package flag used to extract tags in case of lerna repo (#503) Co-authored-by: Benjamin E. Coe --- command.js | 4 ++++ lib/lifecycles/bump.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/command.js b/command.js index f84b3f9ef..d65d5ea06 100755 --- a/command.js +++ b/command.js @@ -99,6 +99,10 @@ const yargs = require('yargs') default: defaults.preset, describe: 'Commit message guideline preset' }) + .option('lerna-package', { + type: 'string', + describe: 'Name of the package from which the tags will be extracted' + }) .check((argv) => { if (typeof argv.scripts !== 'object' || Array.isArray(argv.scripts)) { throw Error('scripts must be an object') diff --git a/lib/lifecycles/bump.js b/lib/lifecycles/bump.js index 119025fb0..370fbff03 100644 --- a/lib/lifecycles/bump.js +++ b/lib/lifecycles/bump.js @@ -120,7 +120,8 @@ function bumpVersion (releaseAs, currentVersion, args) { debug: args.verbose && console.info.bind(console, 'conventional-recommended-bump'), preset: presetOptions, path: args.path, - tagPrefix: args.tagPrefix + tagPrefix: args.tagPrefix, + lernaPackage: args.lernaPackage }, function (err, release) { if (err) return reject(err) else return resolve(release)