Skip to content

Commit

Permalink
tests: fix parseReleases (#265)
Browse files Browse the repository at this point in the history
* tests: make sure options.plugins is iterable

* use [].concat instead of Array.from - kudos to @ljharb

* remove [].concat
  • Loading branch information
Reddine committed Sep 11, 2024
1 parent 79acd55 commit 03811f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const parseReleases = async (tags, options, onParsed) => {
const merges = commits.filter(commit => commit.merge).map(commit => commit.merge)
const fixes = commits.filter(commit => commit.fixes).map(commit => ({ fixes: commit.fixes, commit }))

for (const plugin of options.plugins) {
for (const plugin of options.plugins || []) {
if (plugin.processCommits) await plugin.processCommits(commits)
if (plugin.processMerges) await plugin.processMerges(merges)
if (plugin.processFixes) await plugin.processFixes(merges)
Expand All @@ -35,7 +35,7 @@ const parseReleases = async (tags, options, onParsed) => {
}
}))

for (const plugin of options.plugins) {
for (const plugin of options.plugins || []) {
if (plugin.processReleases) await plugin.processReleases(releases)
}

Expand Down

0 comments on commit 03811f7

Please sign in to comment.