npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

cclog-parser

v3.0.0

Published

Modern conventional-changelog parser with ES modules and TypeScript support

Readme

cclog-parser

npm build coverage downloads

Modern conventional-changelog parser with TypeScript support and ES modules.

Parse changelog files in the format used by tools like conventional-changelog, similar to the Karma project changelog.

This package is currently maintained by AI.

Features

  • 🎯 TypeScript support - Full type definitions included
  • 📦 ES Modules - Modern module system with CommonJS compatibility
  • 🔧 Flexible parsing - Support for multiple changelog formats
  • 🚀 Modern tooling - Built with latest Node.js best practices
  • Well tested - Comprehensive test coverage

Quick Start

# Install the package
npm install cclog-parser

# Create a simple example
echo "
import { parseChangelog } from 'cclog-parser';

const changelog = \`
<a name=\"1.0.0\"></a>
# 1.0.0 (2023-01-01)

### Bug Fixes
* fix something important

### Features
* add amazing new feature
\`;

const result = parseChangelog(changelog);
console.log(result);
" > example.js

# Run it
node example.js

Usage

ES Modules (Recommended)

import { parseChangelog } from 'cclog-parser';

const changelog = `
<a name="0.1.0"></a>
# 0.1.0 (2023-01-01)

### Bug Fixes

* fix issue A ([17c2c43](https://example.com/commit/abc))
* fix issue B ([17c2c43](https://example.com/commit/def))

### Features

* add feature X ([17c2c43](https://example.com/commit/ghi))
* add feature Y ([17c2c43](https://example.com/commit/jkl))
`;

const result = parseChangelog(changelog);
console.log(result);

CommonJS

const { parseChangelog } = require('cclog-parser');

const result = parseChangelog(changelog);

Options

interface ParseOptions {
  /**
   * Whether to include detailed commit information
   * @default true
   */
  includeDetails?: boolean;
}

const result = parseChangelog(changelog, {
  includeDetails: false,
});

Output Format

The parser returns an object with the following structure:

interface ParseResult {
  /** Array of version strings */
  versions: string[];
  /** Changes grouped by version */
  changes: Record<string, ChangeObject>;
}

interface ChangeObject {
  /** Bug fixes */
  fixes: string[];
  /** New features */
  features: string[];
  /** Breaking changes */
  breakingChanges: string[];
}

Example Output

{
  versions: ['0.1.0', '0.0.1'],
  changes: {
    '0.1.0': {
      fixes: [
        'fix issue A ([17c2c43](https://example.com/commit/abc))',
        'fix issue B ([17c2c43](https://example.com/commit/def))'
      ],
      features: [
        'add feature X ([17c2c43](https://example.com/commit/ghi))',
        'add feature Y ([17c2c43](https://example.com/commit/jkl))'
      ],
      breakingChanges: []
    }
  }
}

Supported Formats

The parser supports multiple changelog formats:

Standard Format

<a name="1.0.0"></a>

# 1.0.0 (2023-01-01)

### Bug Fixes

- fix something

### Features

- add something

### BREAKING CHANGES

- breaking change

Markdown Link Format

# [1.0.0](https://github.com/user/repo/compare/v0.9.0...v1.0.0) (2023-01-01)

### Bug Fixes

- fix something

### Features

- add something

Requirements

  • Node.js >= 16.0.0

Migration from v1.x

Version 2.0 introduces breaking changes:

  • ES Modules: Package now uses ES modules by default
  • Node.js: Minimum version requirement is now 16.0.0
  • TypeScript: Full TypeScript rewrite with type definitions
  • API: Import syntax has changed (see usage examples above)

Migrating from v1.x

// Old (v1.x)
const parser = require('cclog-parser');
const result = parser(changelog);

// New (v2.x) - ES Modules
import { parseChangelog } from 'cclog-parser';
const result = parseChangelog(changelog);

// New (v2.x) - CommonJS
const { parseChangelog } = require('cclog-parser');
const result = parseChangelog(changelog);

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Run linting
npm run lint

# Run type checking
npm run type-check

# Format code
npm run format

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT © jserme