Skip to content

Commit 4cd0826

Browse files
pvdlggr2m
authored andcommitted
chore: Stop to handle undefined pluginConfig
It's not handled by semantic-release 9.0.0
1 parent 6961dd8 commit 4cd0826

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const DEFAULT_RELEASE_RULES = require('./default/release-rules');
2626
* @param {Array} options.commits array of commits
2727
* @param {commitAnalyzerCallback} callback The callback called with the release type.
2828
*/
29-
async function commitAnalyzer(pluginConfig = {}, {commits, logger}, callback) {
29+
async function commitAnalyzer(pluginConfig, {commits, logger}, callback) {
3030
const releaseRules = loadReleaseRules(pluginConfig);
3131
const config = await loadParserConfig(pluginConfig);
3232
let releaseType = null;

test/integration.test.js

-7
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,3 @@ test('Re-Throw error from "conventional-changelog-parser"', async t => {
244244
const commits = [{message: 'Fix: First fix (fixes #123)'}, {message: 'Update: Second feature (fixes #456)'}];
245245
await t.throws(promisify(commitAnalyzer)({parserOpts: {headerPattern: '\\'}}, {commits, logger: t.context.logger}));
246246
});
247-
248-
test('Accept an undefined "pluginConfig"', async t => {
249-
const commits = [{message: 'fix(scope1): First fix'}, {message: 'feat(scope2): Second feature'}];
250-
const releaseType = await promisify(commitAnalyzer)(undefined, {commits, logger: t.context.logger});
251-
252-
t.is(releaseType, 'minor');
253-
});

0 commit comments

Comments
 (0)