diff --git a/README.md b/README.md index 965b876..f6eea00 100644 --- a/README.md +++ b/README.md @@ -109,13 +109,13 @@ for the configuration object to pass as `preset`. - This option will be passed as the first argument to [`bumper.bump`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/README.md#api) - [Type definition for `whatBump` → look for `Preset['whatBump']`](https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-recommended-bump/src/types.ts) -- Use the `"undefined"` string value to skip releasing a new version. +- Use the `false` Boolean value to skip releasing a new version. ```json { "plugins": { "@release-it/conventional-changelog": { - "whatBump": "undefined" + "whatBump": false } } } diff --git a/index.js b/index.js index ce3ba05..149f46f 100644 --- a/index.js +++ b/index.js @@ -46,8 +46,8 @@ class ConventionalChangelog extends Plugin { if (options.commitsOpts) bumper.commits(options.commitsOpts, options.parserOpts); async function getWhatBump() { - if (options.whatBump === 'undefined') { - return () => ({ releaseType: undefined }); + if (options.whatBump === false) { + return () => ({ releaseType: null }); } else { const bumperPreset = await bumper.preset; diff --git a/test.js b/test.js index 7c2de43..665142a 100644 --- a/test.js +++ b/test.js @@ -370,13 +370,13 @@ test('should not bump when recommended bump returns null', async () => { } }); -test('should not bump when whatBump === "undefined"', async () => { +test('should not bump when whatBump === false', async () => { setup(); sh.exec(`git tag 1.0.0`); add('fix', 'bar'); add('feat', 'baz'); { - const options = getOptions({ whatBump: 'undefined' }); + const options = getOptions({ whatBump: false }); const { version } = await runTasks(...options); assert.equal(version, undefined); }