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

@hyperfrontend/versioning

v0.10.3

Published

Versioning library with changelog parsing, conventional commits, and semver flow orchestration.

Readme

Versioning library with changelog parsing, conventional commits, and semver flow orchestration.

• 👉 See documentation • 👉 See guides & tutorials

What is @hyperfrontend/versioning?

@hyperfrontend/versioning provides a comprehensive toolkit for managing software versioning in JavaScript/TypeScript projects. The library is built on a purely functional architecture with factory functions, immutable data structures, and composable operations.

Key Features

  • Interactive Commit Author (cz) - npx cz launches a keystroke-live conventional-commit session (type, scope, subject countdown, body, breaking marker, issues, preview, commit) with clipboard-paste support and terminal-resize redraw
  • Commit Validator (cl) - npx cl <path> plugs into any commit-msg git hook to enforce your ruleset
  • Changelog Parsing - Parse CHANGELOG.md files into structured objects with lossless round-tripping
  • Conventional Commits - Parse, validate, format, and classify messages following the Conventional Commits specification
  • Semver Utilities - Parse, compare, increment, and validate semantic versions
  • Registry Client - Query npm registry for published versions and package metadata
  • Compare URLs - Generate platform-specific compare URLs for changelog entries (GitHub, GitLab, Bitbucket, Azure DevOps)
  • Monorepo Scope Filtering - Intelligent commit classification ensures changelogs only include relevant commits
  • Composable Operations - Build complex versioning workflows from simple, pure functions
  • Zero External Dependencies - Self-contained implementation with no third-party runtime dependencies

Architecture Highlights

Parsing is bounded and predictable: every parser is a character-by-character state machine rather than a regular expression, so no input pattern can trigger catastrophic backtracking. Each entry point also rejects oversized input before processing it (10,000 characters for a commit message, 1 MB for a changelog file, 256 for a version string, 214 for a package name).

👉 See the architecture guide for detailed design principles, data flow diagrams, and module composition.

Why Use @hyperfrontend/versioning?

Type-Safe Changelog Manipulation

Working with CHANGELOG.md files programmatically typically involves fragile string manipulation. This library parses changelogs into fully typed data structures with factory functions for creating entries, sections, and items. Modify changelog content with confidence using immutable operations and round-trip safely back to markdown.

Unified Versioning Primitives

Version management requires coordinating semver parsing, commit analysis, changelog generation, and registry queries. This library provides all these primitives in one cohesive package with consistent APIs. Query npm for published versions, parse commit history, calculate version bumps, and generate changelog entries, all composable into custom release workflows.

Zero-Dependency CI Integration

Designed for automated pipelines where minimal attack surface matters. Zero external runtime dependencies and state-machine parsing ensure predictable performance on any input. All parsers enforce input length limits to prevent resource exhaustion.

One-Stop Commit Toolchain

The interactive cz and validator cl bins cover the same ground as commitizen + cz-conventional-changelog + @commitlint/cli, in one package, without patch-package workarounds, with a config-driven session (commit.config.{js,mjs,cjs}), a live 72-char header countdown, and scope choices derived from staged files. Acknowledgment to those projects: they shaped the conventions this library now implements natively.

Installation

npm install @hyperfrontend/versioning

Quick Start

Parsing a Changelog

import { parseChangelog } from '@hyperfrontend/versioning'
import fs from 'fs'

// Parse existing changelog content
const content = fs.readFileSync('CHANGELOG.md', 'utf-8')
const changelog = parseChangelog(content)

// Access entries
for (const entry of changelog.entries) {
  console.log(`Version ${entry.version} - ${entry.date}`)
  for (const section of entry.sections) {
    console.log(`  ${section.heading}: ${section.items.length} changes`)
  }
}

// Access metadata
// Formats: 'keep-a-changelog' (https://keepachangelog.com), 'conventional', etc.
console.log(changelog.metadata.format)

Parsing Conventional Commits

import { parseConventionalCommit } from '@hyperfrontend/versioning'

const commit = parseConventionalCommit('feat(api): add user authentication')

console.log(commit.type) // 'feat'
console.log(commit.scope) // ['api'], an array because `feat(a,b): x` names two
console.log(commit.subject) // 'add user authentication'
console.log(commit.breaking) // false

Checking for Breaking Changes

import { parseConventionalCommit } from '@hyperfrontend/versioning'

// Breaking change via !
const commit1 = parseConventionalCommit('feat(api)!: remove deprecated endpoint')
console.log(commit1.breaking) // true

// Breaking change via footer
const commit2 = parseConventionalCommit(\`fix: update API response format

BREAKING CHANGE: Response structure has changed\`)
console.log(commit2.breaking) // true
console.log(commit2.breakingDescription) // 'Response structure has changed'

API Overview

The package publishes one subpath per concern, and the name of the import is the job it does. commits parses, validates, classifies and authors conventional commit messages. changelog reads and writes CHANGELOG.md. semver parses, compares and increments versions and ranges. git, registry and workspace cover the three things a release has to ask the world outside the process: the repository, the npm registry, and the packages on disk. repository turns a remote URL into the compare links a changelog entry carries. flow composes the rest into a release. The root entry re-exports all of them.

parseConventionalCommit is where most work starts: hand it the raw message and it returns a ConventionalCommit carrying type, subject, breaking, the parsed footers and a scope that is a readonly string[] rather than a string, because feat(a,b): x names two. Its type and breaking go to getSemverBump, which answers major, minor, patch or none, and that answer plus a parsed version goes to increment. All three are pure functions over plain data.

parseChangelog turns a CHANGELOG.md into an addressable tree of entries, sections and items, and serializeChangelog writes that tree back to markdown, so a file read and rewritten unedited comes back as itself. Those parsers, and the commit parsers beside them, are hand-written character state machines rather than regular expressions, and each refuses oversized input before it begins, which is why no pathological changelog can stall a release job.

Two bins ship alongside the API, and neither asks you to import anything: npx cz runs the interactive session that authors a conventional commit, and npx cl <path> validates one message from a commit-msg hook. For unattended releases, createConventionalFlow assembles the ordered steps (fetch the published version, analyse commits, calculate the bump, generate the changelog entry, update package.json, write, commit, tag) and executeFlow runs them against a virtual file system, so a dry run reports the whole diff without touching disk.

Every model, option, step and outcome type is in the API reference.

Compatibility

| Operating System | Supported | | ---------------- | :-------: | | Linux | ✅ | | macOS | ✅ | | Windows | ✅ |

Output Formats

| Format | File | Tree-Shakeable | | ------ | ----------- | :------------: | | ESM | index.mjs | ✅ | | CJS | index.cjs | ❌ |

Security

All parsers use state-machine tokenization with O(n) complexity and enforce input length limits (commit messages: 10KB, changelog files: 1MB) to prevent resource exhaustion. Character-by-character parsing eliminates regex-based vulnerabilities.

Part of hyperfrontend

This library is part of the hyperfrontend monorepo.

📖 Full documentation

License

MIT