diff --git a/plugins/changelog/mod.ts b/plugins/changelog/mod.ts index 5f9cadd..4d6ac8b 100644 --- a/plugins/changelog/mod.ts +++ b/plugins/changelog/mod.ts @@ -2,8 +2,8 @@ import { join } from "./deps.ts"; import type { ReleasePlugin } from "../../plugin.ts"; import { - Document, defaultFilters, + Document, polyfillVersion, pushHeader, pushTag, diff --git a/plugins/github/mod.ts b/plugins/github/mod.ts index bc3e0a2..9b07079 100644 --- a/plugins/github/mod.ts +++ b/plugins/github/mod.ts @@ -1,7 +1,7 @@ import { ReleasePlugin } from "../../plugin.ts"; import { - Document, defaultFilters, + Document, polyfillVersion, pushTag, render, diff --git a/src/changelog.ts b/src/changelog.ts index 24bf8bc..4fc6d62 100644 --- a/src/changelog.ts +++ b/src/changelog.ts @@ -54,7 +54,7 @@ export function pushChanges( commits: Commit[], style: "github" | "md", ): void { - if (title !== '') doc.sections.push(`### ${title}`); + if (title !== "") doc.sections.push(`### ${title}`); const list: string[] = []; for (const commit of commits) { const { hash } = commit; @@ -104,18 +104,18 @@ export function pushTag( let hasConventionalCommit = false; // capture all commits by their types for (const filter of filters) { - let title = filter.title + let title = filter.title; let filtered; - if (filter.type === '!') { + if (filter.type === "!") { // process breaking change - filtered = commits.filter((commit) => commit.cc.type?.endsWith('!')); - if (filtered.length > 0) hasConventionalCommit = true + filtered = commits.filter((commit) => commit.cc.type?.endsWith("!")); + if (filtered.length > 0) hasConventionalCommit = true; } else if (filter.type !== "") { // use conventional commmits as defined in filters filtered = commits.filter((commit) => commit.cc.type?.toLocaleLowerCase() === filter.type.toLocaleLowerCase() ); - if (filtered.length > 0) hasConventionalCommit = true + if (filtered.length > 0) hasConventionalCommit = true; } else { // capture other commits const types = filters.map((f) => f.type); @@ -125,7 +125,7 @@ export function pushTag( } if (filtered.length > 0) { if (!hasConventionalCommit) { - title = '' + title = ""; } pushChanges(doc, repo, title, filtered, style); }