From 1a3449a84216399fa9f1bf4862086ab90ed60331 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Wed, 4 Jan 2023 16:00:59 +0100 Subject: [PATCH] build: add more changelog types --- tools/changelog.mjs | 59 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/tools/changelog.mjs b/tools/changelog.mjs index 68608da..313a4a4 100644 --- a/tools/changelog.mjs +++ b/tools/changelog.mjs @@ -1,10 +1,63 @@ import conventionalChangelogCore from 'conventional-changelog-core'; import conventionalChangelogPreset from 'conventional-changelog-conventionalcommits'; -import fs from "node:fs" +import fs from 'node:fs'; -const config = conventionalChangelogPreset(); +const config = conventionalChangelogPreset({ + types: [ + { + type: 'feat', + section: 'Features', + }, + { + type: 'feature', + section: 'Features', + }, + { + type: 'fix', + section: 'Bug Fixes', + }, + { + type: 'perf', + section: 'Performance Improvements', + }, + { + type: 'revert', + section: 'Reverts', + }, + { + type: 'docs', + section: 'Documentation', + }, + { + type: 'style', + section: 'Styles', + }, + { + type: 'chore', + section: 'Miscellaneous Chores', + }, + { + type: 'refactor', + section: 'Code Refactoring', + }, + { + type: 'test', + section: 'Tests', + }, + { + type: 'build', + section: 'Build System', + }, + { + type: 'ci', + section: 'Continuous Integration', + }, + ], +}); -const file = process.argv[3] ? fs.createWriteStream(process.argv[3]): process.stdout; +const file = process.argv[3] + ? fs.createWriteStream(process.argv[3]) + : process.stdout; conventionalChangelogCore( {