Ember preset for conventional-changelog that parses commit messages and generates standardized changelog entries.
npx @tessl/cli install tessl/npm-conventional-changelog-ember@5.0.0conventional-changelog-ember is a preset configuration for the conventional-changelog system that implements Ember.js commit message conventions. It parses Ember-style commit messages with tags like [BUGFIX beta], [FEATURE name], and [DOC release] to generate standardized changelog entries with proper categorization and semantic version bumping.
npm install conventional-changelog-emberimport createPreset from "conventional-changelog-ember";For older Node.js versions or bundlers without full ESM support:
const createPreset = (await import("conventional-changelog-ember")).default;import createPreset from "conventional-changelog-ember";
import conventionalChangelogCore from "conventional-changelog-core";
// Create the preset configuration
const preset = await createPreset();
// Use with conventional-changelog-core
for await (const chunk of conventionalChangelogCore({
config: preset
})) {
console.log(chunk.toString());
}The package is organized around three core modules that work together to implement the Ember commit convention:
Creates a complete preset configuration for conventional-changelog with Ember-specific parsing, writing, and version bump rules.
/**
* Creates a preset configuration for conventional-changelog with Ember.js commit conventions
* @returns Promise<PresetConfig> Complete preset configuration object
*/
export default async function createPreset(): Promise<PresetConfig>;
interface PresetConfig {
commits: {
merges: false;
};
parser: ParserOptions;
writer: WriterOptions;
whatBump: WhatBumpFunction;
}Usage Example:
import createPreset from "conventional-changelog-ember";
const preset = await createPreset();
// Use preset with conventional-changelog toolsThe preset includes parsing capabilities for Ember commit message formats. This functionality is built into the preset configuration and not directly exposed as a separate API.
Supported Commit Formats:
[BUGFIX beta] Fix authentication issue
[FEATURE query-params-new] Add new query parameter handling
[DOC release] Update API documentation
[CLEANUP beta] Remove deprecated methods
[SECURITY CVE-2023-001] Address security vulnerabilityThe parser recognizes:
Merge pull request #123 from branch/name[TAG target] commit messageThe preset includes writing capabilities that transform parsed commits into formatted changelog entries. The writer handles template rendering and commit categorization automatically within the preset.
Tag Transformations:
BUGFIX → "Bug Fixes"CLEANUP → "Cleanup"FEATURE → "Features"DOC → "Documentation"SECURITY → "Security"Analyzes commit messages to determine appropriate semantic version increments. This function is not exported directly but is available through the preset configuration.
Bump Logic:
interface PresetConfig {
/** Configuration for commit handling */
commits: {
/** Whether to include merge commits (always false) */
merges: false;
};
/** Parser options for extracting commit information */
parser: ParserOptions;
/** Writer options for formatting changelog entries */
writer: WriterOptions;
/** Function to determine version bump level */
whatBump: (commits: Commit[]) => BumpResult;
}
interface ParserOptions {
/** Regex pattern to match merge commit format */
mergePattern: RegExp;
/** Field names for merge commit capture groups */
mergeCorrespondence: string[];
/** Regex pattern to match Ember commit tag format */
headerPattern: RegExp;
/** Field names for header capture groups */
headerCorrespondence: string[];
}
interface WriterOptions {
/** Main Handlebars template for changelog structure */
mainTemplate: string;
/** Header partial template for version headers */
headerPartial: string;
/** Commit partial template for individual commit entries */
commitPartial: string;
/** Transform function to convert commits to changelog format */
transform: (commit: ParsedCommit) => ChangelogCommit | undefined;
/** Group commits by this field */
groupBy: string;
/** Sort commit groups by this criteria */
commitGroupsSort: string;
/** Sort individual commits by these criteria */
commitsSort: string[];
}
interface ParsedCommit {
/** Commit tag from Ember format (BUGFIX, FEATURE, etc.) */
tag: string;
/** Target branch or feature flag */
taggedAs: string;
/** Commit message text */
message: string;
/** Pull request number (if merge commit) */
pr?: string;
/** Full commit hash */
hash?: string;
/** Short commit hash */
shortHash?: string;
}
interface ChangelogCommit {
/** Display tag for changelog section */
tag: string;
/** Short commit hash for linking */
shortHash: string;
}
interface Commit {
/** Commit type for semantic analysis */
type?: string;
/** Breaking change notes */
notes: BreakingChangeNote[];
}
interface BreakingChangeNote {
/** Breaking change note content */
[key: string]: any;
}
interface BumpResult {
/** Version bump level: 0 (major), 1 (minor), 2 (patch) */
level: number;
/** Explanation of the bump decision */
reason: string;
}