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

@mr-hope/verify-commit-message

v0.1.1

Published

Verify conventional commit messages with actionable, agent-friendly error reports.

Readme

@mr-hope/verify-commit-message

npm license

Verify conventional commit messages, with error reports written for both humans and AI agents.

Unlike commitlint, every failure explains what was received, what was expected, which values are allowed, and how to fix it — so an agent can correct the message without reading the source.

Usage

As a commit-msg hook

// scripts/verifyCommit.ts
import { verifyCommitMessage } from "@mr-hope/verify-commit-message";

await verifyCommitMessage({ importMeta: import.meta, process });
# .husky/commit-msg
pnpm exec tsx scripts/verifyCommit.ts "$1"

As a CLI

npx @mr-hope/verify-commit-message .git/COMMIT_EDITMSG

When no path is given, .git/COMMIT_EDITMSG of the detected project root is used.

As a library

import { verifySubject } from "@mr-hope/verify-commit-message";

const problems = verifySubject("fix(plugin-attrs): correct parsing", {
  scopes: ["plugin-attrs", "deps"],
});

if (problems.length > 0) console.error(problems);

API

verifyCommitMessage(options)

End-to-end verification: locates the project root, derives the allowed scopes, reads the commit message file, validates the subject line, and exits with code 1 after printing a report when the message is invalid.

| Option | Type | Default | Description | | ------------------ | ------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------- | | process | ProcessLike | — | The caller's process, used to read argv and to exit. | | importMeta | ImportMeta | — | The caller's import.meta, used to locate the project root. Falls back to process.cwd(). | | types | readonly string[] | 13 conventional | Allowed commit types. | | scopes | readonly string[] | derived | Allowed commit scopes. When given, it replaces the derived scopes entirely. | | packages | readonly string[] | ["packages/*"] | Glob patterns matching package directories. A directory counts as a package when it directly contains a package.json. | | defaultScopes | "public" \| "all" | "public" | "public" only counts packages that are not marked private; "all" counts every match. | | extraScopes | readonly string[] | ["deps"] | Extra scopes always allowed in addition to the derived ones. | | maxSubjectLength | number | 50 | Maximum length of the description after : . |

The commit message file is read from process.argv[2], falling back to <root>/.git/COMMIT_EDITMSG.

verifySubject(subject, options)

Validates a single subject line and returns a list of problems. An empty array means the subject is valid.

resolveScopes(root, packages, defaultScopes, extraScopes)

Derives the allowed scopes from the packages of a project. Returns null when no pattern matches any package, which means scopes are not allowed at all.

printProblems(problems, msgPath, subject, options)

Prints a report to stderr.

Scope derivation

Scopes are derived from the packages matched by packages:

  • A directory counts as a package when it directly contains a package.json, so dist/ and node_modules/ are never mistaken for packages.
  • * matches within one path segment, ** across segments, and ? a single character. Multiple roots and arbitrary nesting are supported, e.g. ["packages/*", "plugins/*/*", "theme/*"].
  • The scope of a package is its name without the npm scope (@mdit/plugin-attrs → plugin-attrs), falling back to the directory name when the manifest has no name.
  • When no pattern matches any package, scopes are not allowed at all — which is what a non-monorepo project wants.

Error report

 ERROR  invalid commit message — 1 problem found
  message file: /path/to/.git/COMMIT_EDITMSG
  subject line: "feature(plugin-attrs): add thing"

  1. unknown commit type "feature".
     • A commit type must be one of: feat, fix, docs, style, refactor, perf, test, workflow, build, ci, chore, types, release
     • Example: fix(plugin-attrs): correct nested token parsing

  Required format: type(scope): subject — subject ≤ 50 characters, ASCII ": " separator.

License

MIT © Mr.Hope