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

diffstalkerd-grammars

v0.12.3

Published

Tree-sitter grammars and outline queries for diffstalkerd's in-file symbol search. Opt-in: diffstalkerd works without it.

Readme

diffstalkerd-grammars

Tree-sitter grammars and outline queries for diffstalkerd's in-file symbol search (o in the web UI).

Opt-in. diffstalkerd works without this package — outlines are simply absent, and GET /health reports which extensions the running daemon can actually outline so a client can say so rather than guess. Install it only if you want outlines:

npm i -g diffstalkerd-grammars

On Arch, use the companion AUR package instead. npm i -g there installs into /usr, which pacman does not own — see diffstalker-git's PKGBUILD for why that goes badly.

What is here

| File | Source | |---|---| | web-tree-sitter.wasm | the tree-sitter runtime | | tree-sitter-typescript.wasm | TypeScript, and Vue <script> blocks | | tree-sitter-javascript.wasm | JavaScript | | tree-sitter-java.wasm | Java | | queries/*.scm | ours — what counts as a symbol | | checksums.json | sha256 of every file, plus the runtime version |

The .wasm files are not committed. bun run vendor fetches them against pinned versions and checksums; a mismatch writes nothing and fails, because a grammar that drifts from its query does not error — it captures the wrong nodes and produces confidently wrong labels.

Adding a language

  1. Pin the grammar package and its sha256 in scripts/vendor.ts.
  2. Write queries/<grammar>.scm. One @symbol.<kind> and one @name per pattern; the extractor reads nothing else.
  3. Map the extensions in packages/core/src/symbols/languages.ts.
  4. Add golden fixtures to packages/daemon/src/symbols/pool.test.ts, and run the query over real files of that language before shipping it.
  5. bun run vendor to refresh checksums.json.

No code changes are needed for steps 1, 2 and 5 — a language is data. But the set is closed at the repo boundary: there is no runtime grammar loading and no user-supplied wasm path, because follow mode opens repositories without anyone clicking, and a repo-controlled grammar path would be arbitrary WebAssembly executing on the daemon's origin.