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

@tomi_tom/diffsweep

v0.1.1

Published

Zero-config CLI that sweeps your staged git changes for leftovers you'll regret pushing: debug statements, focused tests, conflict markers, secrets and more.

Readme

diffsweep

Sweep your staged changes for the stuff you'll regret pushing. One command, zero config, any language.

diffsweep reads your git diff and flags the universal mistakes that slip into commits — leftover console.log / debugger, focused tests that silently disable the rest of your suite, unresolved merge-conflict markers, hardcoded secrets, stray TODOs and accidental .env files. It exits non-zero when it finds blockers, so it drops straight into a git hook or CI.

npx diffsweep
  diffsweep  ·  staged changes

  checkout.js
    error   :2     Leftover debug statement  (debug-statement)
            console.log('debugging total', items);
  checkout.test.js
    error   :2     Focused test will skip every other test  (focused-test)
            it.only('sums prices', () => {
  config.js
    error   :4     Possible hardcoded GitHub token  (hardcoded-secret)

  4 errors, 2 warnings

Why diffsweep?

Husky, lint-staged and friends are hook runners — you still have to install them, write a config, and wire up every check yourself. diffsweep is the opposite: batteries included, zero config. Run one command and every built-in rule is live, across JavaScript, TypeScript, Python, Go, PHP, Ruby and more. It only ever inspects added lines, so it stays fast and quiet.

  • Zero config — no config file, no plugins to choose.
  • Language-agnostic — not just a JS linter.
  • Private & local — your code never leaves the machine. No network, no telemetry.
  • Zero runtime dependencies.
  • Hook & CI ready — meaningful exit codes, --json output, one-line install.

Usage

diffsweep                 # staged changes (git diff --cached) — the default
diffsweep --unstaged      # working tree
diffsweep main            # everything on this branch vs main
diffsweep --html          # also write a shareable HTML report
diffsweep --json          # machine-readable output for CI

Install a git hook so you can never forget:

diffsweep --install-hook pre-push     # add --force to overwrite an existing hook

Suppress a single line by adding diffsweep-ignore to it.

Rules

| Rule | Severity | Catches | |------|----------|---------| | debug-statement | error | console.log, debugger, breakpoint(), binding.pry, var_dump, dd() | | focused-test | error | .only, fdescribe, fit — silently skips the rest of the suite | | merge-conflict | error | unresolved <<<<<<< / ======= / >>>>>>> markers | | hardcoded-secret | error | AWS keys, private keys, GitHub/Slack/OpenAI tokens, password = "…" | | skipped-test | warning | .skip, xit, @Ignore | | todo-marker | warning | newly added TODO / FIXME / HACK / XXX | | large-addition | warning | very large or binary additions | | env-file | warning | committing a real .env file |

diffsweep --list prints them all. Filter with --only debug-statement,focused-test or --skip todo-marker. Generated/vendored files (dist/, lockfiles, *.min.js, source maps…) are ignored for line-level rules by default — pass --no-default-ignore to scan them too.

Exit codes

| Code | Meaning | |------|---------| | 0 | clean (or within --max-warnings) | | 1 | blocking findings (any error, or warnings over the threshold) | | 2 | usage / git error |

Use --max-warnings <n> to fail on warnings, or --no-fail to report only.

Pro

The free tier ships every built-in rule. diffsweep Pro adds custom rule packs (--config), team-shared rule sets, baselines and SARIF output for GitHub code scanning.

On the free tier, --config is ignored with a notice (printed to stderr) and the default audit still runs — so a gated flag can never mask findings or hand CI a misleading clean pass.

License

MIT