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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mohmk10/changelog-hub

v1.0.0

Published

API Breaking Change Detector - Detects breaking changes in REST, GraphQL, gRPC, AsyncAPI and Spring Boot APIs

Readme

@mohmk10/changelog-hub

A powerful CLI tool for detecting breaking changes in API specifications. Supports OpenAPI, AsyncAPI, GraphQL, and Protocol Buffers.

Installation

Global Installation

npm install -g @mohmk10/changelog-hub

Using npx

npx @mohmk10/changelog-hub compare old.yaml new.yaml

Usage

Compare Command

Compare two API specifications and detect breaking changes:

changelog-hub compare <old-spec> <new-spec> [options]

Options:

| Option | Description | Default | |--------|-------------|---------| | -f, --format <format> | Output format (console, markdown, json, html) | console | | -o, --output <file> | Write output to file | - | | --fail-on-breaking | Exit with non-zero code if breaking changes detected | false | | -v, --verbose | Show verbose output | false | | --severity <level> | Minimum severity to report (INFO, WARNING, DANGEROUS, BREAKING) | INFO | | --no-deprecations | Exclude deprecation warnings | - | | -c, --config <file> | Path to configuration file | - |

Examples:

# Basic comparison
changelog-hub compare api-v1.yaml api-v2.yaml

# Output as markdown to file
changelog-hub compare api-v1.yaml api-v2.yaml -f markdown -o CHANGELOG.md

# Fail CI pipeline on breaking changes
changelog-hub compare api-v1.yaml api-v2.yaml --fail-on-breaking

# Output as JSON
changelog-hub compare api-v1.yaml api-v2.yaml -f json

# Only show breaking changes
changelog-hub compare api-v1.yaml api-v2.yaml --severity BREAKING

Analyze Command

Analyze a single API specification:

changelog-hub analyze <spec> [options]

Options:

| Option | Description | |--------|-------------| | -v, --verbose | Show detailed analysis | | --endpoints | List all endpoints | | --schemas | List all schemas | | --security | List security schemes | | -f, --format <format> | Output format (console, json) |

Examples:

# Basic analysis
changelog-hub analyze api.yaml

# Show all endpoints
changelog-hub analyze api.yaml --endpoints

# Verbose analysis with all details
changelog-hub analyze api.yaml -v

# Output as JSON
changelog-hub analyze api.yaml -f json

Validate Command

Validate API specification files:

changelog-hub validate <specs...> [options]

Options:

| Option | Description | |--------|-------------| | -v, --verbose | Show verbose validation output | | --strict | Enable strict validation mode | | -f, --format <format> | Output format (console, json) |

Examples:

# Validate single file
changelog-hub validate api.yaml

# Validate multiple files
changelog-hub validate api-v1.yaml api-v2.yaml

# Strict validation
changelog-hub validate api.yaml --strict

# Output as JSON
changelog-hub validate api.yaml -f json

Version Command

Display version information:

changelog-hub version [options]

Options:

| Option | Description | |--------|-------------| | --json | Output version info as JSON |

Supported Formats

| Format | Extensions | Description | |--------|------------|-------------| | OpenAPI | .yaml, .yml, .json | OpenAPI 3.x and Swagger 2.x | | AsyncAPI | .yaml, .yml, .json | AsyncAPI 2.x | | GraphQL | .graphql, .gql | GraphQL Schema Definition Language | | Protocol Buffers | .proto | Protocol Buffer service definitions |

Configuration

Create a configuration file in your project root:

.changelog-hub.yaml

defaultFormat: console
failOnBreaking: false
specPath: api/openapi.yaml
severityThreshold: INFO
includeDeprecations: true
customRules: []

.changelog-hub.json

{
  "defaultFormat": "console",
  "failOnBreaking": false,
  "specPath": "api/openapi.yaml",
  "severityThreshold": "INFO",
  "includeDeprecations": true,
  "customRules": []
}

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | defaultFormat | string | console | Default output format | | failOnBreaking | boolean | false | Exit with error on breaking changes | | specPath | string | api/openapi.yaml | Default spec path pattern | | severityThreshold | string | INFO | Minimum severity to report | | includeDeprecations | boolean | true | Include deprecation warnings | | customRules | array | [] | Custom detection rules |

Breaking Change Detection

The tool detects the following types of breaking changes:

Endpoint Changes

  • Removed endpoints
  • Changed HTTP methods
  • Changed paths

Parameter Changes

  • Removed parameters
  • Changed parameter types
  • Made optional parameters required
  • Changed parameter locations

Schema Changes

  • Removed properties
  • Changed property types
  • Added required properties
  • Changed property formats

Security Changes

  • Removed security schemes
  • Changed authentication types

Risk Scoring

Each comparison produces a risk assessment:

| Risk Level | Score Range | Description | |------------|-------------|-------------| | LOW | 0-24 | Minor changes, backward compatible | | MEDIUM | 25-49 | Some changes, review recommended | | HIGH | 50-74 | Significant changes, migration needed | | CRITICAL | 75-100 | Major breaking changes |

Semantic Versioning Recommendations

Based on the changes detected, the tool recommends:

| Recommendation | When | |----------------|------| | MAJOR | Breaking changes detected | | MINOR | New features added, backward compatible | | PATCH | Bug fixes, no API changes | | NONE | No changes detected |

CI/CD Integration

GitHub Actions

- name: Check API Breaking Changes
  run: npx @mohmk10/changelog-hub compare old-api.yaml new-api.yaml --fail-on-breaking

GitLab CI

api-check:
  script:
    - npx @mohmk10/changelog-hub compare old-api.yaml new-api.yaml --fail-on-breaking

Jenkins

stage('API Check') {
    steps {
        sh 'npx @mohmk10/changelog-hub compare old-api.yaml new-api.yaml --fail-on-breaking'
    }
}

Programmatic Usage

import {
  detectBreakingChanges,
  hasBreakingChanges,
  getBreakingChangesSummary,
  generateReport,
} from '@mohmk10/changelog-hub';

// Detect breaking changes
const result = detectBreakingChanges('old.yaml', 'new.yaml', {
  severityThreshold: 'WARNING',
  includeDeprecations: true,
});

console.log(`Found ${result.breakingChanges.length} breaking changes`);
console.log(`Risk level: ${result.riskLevel}`);
console.log(`Recommended version bump: ${result.semverRecommendation}`);

// Quick check
if (hasBreakingChanges('old.yaml', 'new.yaml')) {
  console.log('Breaking changes detected!');
}

// Get summary
const summary = getBreakingChangesSummary('old.yaml', 'new.yaml');
console.log(`${summary.count} breaking changes: ${summary.changes.join(', ')}`);

// Generate report
const report = generateReport(result, 'markdown');
console.log(report);

License

MIT