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

vitest-snapshot-tools

v0.5.0

Published

Safely capture, review, and apply Vitest snapshot updates

Downloads

1,946

Readme

vitest-snapshot-tools

Compact repeated Vitest 4 snapshot failures into exact change families, review each distinct change once, and safely apply only approved updates.

vitest-snapshot-tools runs the target project's own Vitest installation, redirects snapshot candidates outside the repository, and writes only explicitly accepted changes. Review in a local authenticated UI or use the versioned JSON CLI for automation.

The vitest-snapshot-tools review workspace: a mocked external API-call change compacted into a 40-test exact family alongside separate log and response families

Quick start

npx vitest-snapshot-tools

Requires Node.js 22.14 or newer and a project-local Vitest version in the >=4 <5 range. npx downloads the package for a one-off run or uses the local version when installed. To pin it for a project:

npm install --save-dev vitest-snapshot-tools
npx vitest-snapshot-tools

Optional arguments after -- are passed to Vitest.

Agent skill and token-efficient review

A repeated API or rendering change can appear in hundreds of snapshots. Instead of sending every diff through an agent, the CLI groups snapshot entries with the same complete set of added and removed lines. The agent reviews one representative diff and can accept or reject all occurrences with one family_... selector. Unique changes remain separate.

npx vitest-snapshot-tools skill install

Ask a Codex-compatible agent to use $review-vitest-snapshots. The bundled skill starts with exact families to reduce JSON payloads, repeated diff inspection, model context, and token usage while preserving preview and stale-write checks.

Headless workflow

npx vitest-snapshot-tools run --json -- src/example.test.ts
npx vitest-snapshot-tools families --status pending --json
npx vitest-snapshot-tools diff entry_... --format unified
npx vitest-snapshot-tools accept family_...
npx vitest-snapshot-tools preview --format patch
npx vitest-snapshot-tools apply
npx vitest-snapshot-tools verify

Vitest snapshot updates reach the repository only through vsnap apply. The tool hash-checks the captured baseline, rejects unsafe paths, uses crash-aware atomic writes, and never invokes Git.

For the source demo, full CLI reference, safety model, current limitations, and contribution guide, read the project README.