Skip to content

Commit 4280bcf

Browse files
committed
fix: Correct issue where downstream dependency would throw options.debug is not a function
1 parent 57530e5 commit 4280bcf

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

lib/lifecycles/bump.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,18 @@ function bumpVersion(releaseAs, currentVersion, args) {
189189
}
190190
conventionalRecommendedBump(
191191
{
192-
debug:
193-
args.verbose &&
194-
console.info.bind(console, 'conventional-recommended-bump'),
195192
preset: presetOptions,
196193
path: args.path,
197194
tagPrefix: args.tagPrefix,
198195
lernaPackage: args.lernaPackage,
196+
...(args.verbose
197+
? {
198+
debug: console.info.bind(
199+
console,
200+
'conventional-recommended-bump',
201+
),
202+
}
203+
: {}),
199204
},
200205
args.parserOpts,
201206
function (err, release) {

lib/lifecycles/changelog.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,17 @@ function outputChangelog(args, newVersion) {
5858
const context = { version: newVersion };
5959
const changelogStream = conventionalChangelog(
6060
{
61-
debug:
62-
args.verbose && console.info.bind(console, 'conventional-changelog'),
6361
preset: presetLoader(args),
6462
tagPrefix: args.tagPrefix,
6563
releaseCount: args.releaseCount,
64+
...(args.verbose
65+
? {
66+
debug: console.info.bind(
67+
console,
68+
'conventional-recommended-bump',
69+
),
70+
}
71+
: {}),
6672
},
6773
context,
6874
{ merges: null, path: args.path, showSignature: false },

0 commit comments

Comments
 (0)