Skip to content

Commit

Permalink
chore(repo): update publish script to recognize 'feature'
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Jan 29, 2021
1 parent e09c8cf commit 521d776
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const getNewVersion = (version, commits) => {

const types = new Set(commits.map(({ type }) => type));
const breaking = commits.some((commit) => !!commit.breaking);
const level = breaking ? 'major' : types.has('feat') ? 'minor' : 'patch';
const level = breaking ? 'major' : types.has('feat') || types.has('feature') ? 'minor' : 'patch';

return semver.inc(version, level);
};
Expand Down Expand Up @@ -134,7 +134,7 @@ const updateChangelog = (commits, cwd, pluginName, version) => {
notes.breaking.push(message);
} else if (type === 'fix') {
notes.fixes.push(message);
} else if (type === 'feat') {
} else if (type === 'feat' || type === 'feature') {
notes.features.push(message);
} else {
notes.updates.push(message);
Expand Down

0 comments on commit 521d776

Please sign in to comment.