cngpac@1.0.0
Major Changes
-
f10893f - Thanks to @almahdi404 !
change!: nest noteNameGenerator under changenote config
The top-level
noteNameGeneratoroption inCngpacConfighas been removed and replaced with a nestedchangenote.nameGeneratorfield. This groups changenote-related config together under a single namespace, making it easier to add future options.Before:
export default defineConfig({noteNameGenerator: () => `note-${Date.now()}`,});After:
export default defineConfig({changenote: {nameGenerator: () => `note-${Date.now()}`,},});Update your
cngpac.config.tsaccordingly if you use a custom name generator.
Minor Changes
-
c3db079 - PR#1 - Thanks to @almahdi404 !
feat: add version plugin for custom commit message and tag name
Adds a new
VersionPlugintype and optionalversionconfig field toCngpacConfig, allowing customization of the release commit message and git tag name.Both
commitMessageandtagNameaccept a function that receives theVersionBumpobject:export default defineConfig({version: {commitMessage: (vb) => `chore: release v${vb.newVersion}`,tagName: (vb) => `v${vb.newVersion}`,},});When not configured, the existing defaults are preserved (
Release <name>@<version>for commits and<name>@<version>for tags). -
5264d09 - Thanks to @almahdi404 !
impr: add colored branch output to commit command
The
commitcommand now useschalkto colorize branch names in the CLI output.This improves visibility for both local and remote branch names during commit and push steps.
The change updates
src/cli/commands/commit.tsto render the current branch in cyan and the remote branch in yellow when printing progress messages. -
9e95979 - Thanks to @almahdi404 !
feat(releasers/github): add customizable release name format
createGitHubReleasernow accepts an optionalnameFormatstring that controls how the GitHub release name is rendered. The format supports three template variables:{packageName},{version}, and{tagName}.When
nameFormatis omitted, the existing default"{packageName}@{version}"is used, so this change is fully backward-compatible.createGitHubReleaser({token: process.env.GITHUB_TOKEN!,nameFormat: "Release {packageName} v{version}",}); -
ee9f7d0 - Thanks to @almahdi404 !
impr(changelog): sort changenotes by commit date
Changenotes within a bump section of the generated changelog are now sorted in chronological order based on their commit date, rather than arbitrary file-system order.
The git log format was extended to capture the author date (
%aI) alongside the existing hash and subject. This ISO 8601 datetime is stored onChangenoteCommit.datetimeand used as the sort key insidecreateChangelogGenerator.This ensures the changelog accurately reflects the order in which changes were introduced when multiple changenotes share the same bump level.
Patch Changes
-
8d85f7c - Thanks to @almahdi404 !
fix(cmd/change): do not overwrite existing changenote