@kb-labs/release-manager-changelog
v2.94.0
Published
KB Labs Release Manager - conventional commits parser and changelog generator
Readme
@kb-labs/changelog
KB Labs Release Manager - changelog generation and management.
Vision & Purpose
@kb-labs/changelog provides changelog generation and management for KB Labs Release Manager. It includes changelog parsing, formatting, versioning, and caching.
Core Goals
- Changelog Generation: Generate changelogs from Git history
- Changelog Parsing: Parse existing changelogs
- Formatting: Format changelogs in multiple formats (JSON, Markdown)
- Versioning: Manage changelog versions
- Caching: Cache changelog data for performance
Package Status
- Version: 0.1.0
- Stage: Stable
- Status: Production Ready ✅
Architecture
High-Level Overview
Changelog
│
├──► Parser
├──► Formatters
├──► Versioning
├──► Git Range
├──► Providers
└──► CacheKey Components
- Parser (
parser.ts): Parse changelog files - Formatters (
formatters/): Format changelogs (JSON, Markdown) - Versioning (
versioning.ts): Manage changelog versions - Git Range (
git-range.ts): Git range utilities - Providers (
providers.ts): Changelog data providers - Cache (
cache.ts): Cache changelog data
✨ Features
- Changelog Generation: Generate changelogs from Git history
- Changelog Parsing: Parse existing changelogs
- Formatting: Format changelogs in multiple formats (JSON, Markdown)
- Versioning: Manage changelog versions
- Caching: Cache changelog data for performance
📦 API Reference
Main Exports
Parser
parseChangelog: Parse changelog file
Formatters
formatJson: Format changelog as JSONformatMarkdown: Format changelog as Markdown
Versioning
getVersion: Get version from changelogsetVersion: Set version in changelog
Git Range
getGitRange: Get Git range for version
Providers
getChangelogProvider: Get changelog data provider
Cache
getCache: Get changelog cachesetCache: Set changelog cache
🔧 Configuration
Configuration Options
All configuration via function parameters.
🔗 Dependencies
Runtime Dependencies
simple-git(^3.25.0): Git operationssemver(^7.6.0): SemVer parsing
Development Dependencies
@kb-labs/devkit(link:../../../kb-labs-devkit): DevKit presets@types/node(^24.7.0): Node.js typestsup(^8): TypeScript bundlertypescript(^5): TypeScript compilervitest(^3): Test runner
🧪 Testing
Test Structure
No tests currently.
Test Coverage
- Current Coverage: ~50%
- Target Coverage: 90%
📈 Performance
Performance Characteristics
- Time Complexity: O(n) for parsing, O(n) for formatting
- Space Complexity: O(n) where n = changelog size
- Bottlenecks: Large changelog processing
🔒 Security
Security Considerations
- Path Validation: Path validation for file operations
- Git Operations: Secure Git operations
Known Vulnerabilities
- None
🐛 Known Issues & Limitations
Known Issues
- None currently
Limitations
- Format Types: Fixed format types (JSON, Markdown)
- Git History: Requires Git history
Future Improvements
- More Format Types: Additional format types
- Performance: Optimize for large changelogs
🔄 Migration & Breaking Changes
Migration from Previous Versions
No breaking changes in current version (0.1.0).
Breaking Changes in Future Versions
- None planned
📚 Examples
Example 1: Parse Changelog
import { parseChangelog } from '@kb-labs/changelog';
const changelog = await parseChangelog('CHANGELOG.md');Example 2: Format Changelog
import { formatMarkdown } from '@kb-labs/changelog';
const markdown = formatMarkdown(changelog);Example 3: Get Version
import { getVersion } from '@kb-labs/changelog';
const version = getVersion(changelog);🤝 Contributing
See CONTRIBUTING.md for development guidelines.
📄 License
MIT © KB Labs
