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

@bernierllc/commit-analyzer

v1.2.2

Published

Commit interest analysis and filtering

Readme

@bernierllc/commit-analyzer

Commit interest analysis and filtering

Installation

npm install @bernierllc/commit-analyzer

Features

  • Size-based filtering - Filter by additions, deletions, total changes
  • File pattern matching - Include/exclude files by glob patterns
  • Branch filtering - Ignore specific branches
  • Author filtering - Ignore specific authors
  • Interest scoring - Calculate interest score (0-100)
  • Configurable criteria - Dynamic criteria updates

Usage

Basic Usage

import { CommitAnalyzer } from '@bernierllc/commit-analyzer';

const analyzer = new CommitAnalyzer({
  minAdditions: 10,
  minDeletions: 5,
  ignoredBranches: ['develop', 'staging'],
  ignoredAuthors: ['[email protected]'],
  filePatterns: {
    include: ['src/**/*.ts', 'docs/**/*.md'],
    exclude: ['*.test.ts', '*.spec.ts']
  }
});

const commit = {
  sha: 'abc123',
  message: 'Add new feature',
  author: { name: 'Developer', email: '[email protected]' },
  branch: 'main',
  additions: 50,
  deletions: 10,
  files: ['src/feature.ts', 'src/utils.ts'],
  timestamp: new Date()
};

const result = analyzer.analyze(commit);
if (result.interesting) {
  console.log('Commit is interesting!', result.reasons);
  console.log('Score:', result.score);
}

Quick Check

const isInteresting = analyzer.isInteresting(commit);
if (isInteresting) {
  // Process commit
}

Calculate Score

const score = analyzer.calculateScore(commit);
console.log('Interest score:', score); // 0-100

Update Criteria

analyzer.updateCriteria({
  minAdditions: 20,
  minDeletions: 10
});

File Pattern Matching

const analyzer = new CommitAnalyzer({
  filePatterns: {
    include: ['src/**/*.ts'],      // Only TypeScript files
    exclude: ['*.test.ts']          // Exclude test files
  },
  requiredFilePatterns: ['src/**/*.ts'] // Must have TypeScript files
});

API

new CommitAnalyzer(criteria?: CommitAnalysisCriteria)

Creates a new commit analyzer with optional criteria.

analyzer.analyze(commit: CommitData): CommitAnalysisResult

Analyzes a commit and returns detailed results.

analyzer.isInteresting(commit: CommitData): boolean

Quick check if a commit is interesting.

analyzer.calculateScore(commit: CommitData): number

Calculates interest score (0-100).

analyzer.updateCriteria(criteria: Partial<CommitAnalysisCriteria>): void

Updates analysis criteria dynamically.

Integration Status

Logger Integration

Status: ✅ Integrated

Uses @bernierllc/logger for analysis events, filtering decisions, and scoring calculations.

NeverHub Integration

Status: ⚠️ Optional

Can emit analysis events to NeverHub for distributed monitoring and observability. Commit analyzer can publish events like commit.analyzed, commit.interesting, and commit.filtered to NeverHub when available.

Pattern: Optional service discovery integration - package can emit analysis events to NeverHub for distributed monitoring.

Example Integration:

// If NeverHub is available, emit events
if (typeof detectNeverHub === 'function') {
  const result = analyzer.analyze(commit);
  neverhub.emit('commit-analyzer.commit.analyzed', result);
}

Docs-Suite Integration

Status: ✅ Ready

TypeDoc-compatible JSDoc comments are included throughout the source code. All public APIs are documented with examples and type information.

License

Copyright (c) 2025 Bernier LLC. All rights reserved.