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

tree-sitter-wasm

v1.1.6

Published

Pre-built WebAssembly binaries and queries for tree-sitter grammars.

Readme

tree-sitter-wasm npm version

Prebuilt WASM binaries and query files(.scm) for tree-sitter's language parsers that work with Node and bundlers like Vite. You can find a list of supported languages here

Table of Contents

Installation

pnpm add tree-sitter-wasm
# or
bun install tree-sitter-wasm

Usage

A type-safe API is provided for accessing grammars and queries at runtime

import { getAvailableQueries, getWasmPath, getQueryPath } from "tree-sitter-wasm";

const wasmPath = getWasmPath("python");
const queryPath = getQueryPath("python", "highlights");
const pythonQueries = getAvailableQueries("python");

You can also import the assets directly via your bundler

import wasmUrl from "tree-sitter-wasm/python/tree-sitter-python.wasm?url";
import wasmHighlights from "tree-sitter-wasm/python/highlights.scm?raw";

// This JSON object acts as table of content for all available languages
// and their queries.
import manifest from "tree-sitter-wasm/manifest.json"

Each language directory includes a tree-sitter-<lang>.wasm file but may also include:

  • highlights.scm
  • injections.scm
  • locals.scm
  • tags.scm
  • folds.scm
  • indents.scm

Certain languages also contain special queries like: nova-symbols, please refer to the manifest.json or to the out dir in unpkg.

python/
├── tree-sitter-python.wasm
├── tree-sitter-python.wasm.sigstore.json
├── folds.scm
├── highlights.scm
├── indents.scm
├── injections.scm
├── locals.scm
└── tags.scm

Security

This project takes security seriously (a lot more so than other sources), all WASMs are compiled and distributed through Github actions with strict guardrails to prevent malicious code injection and tampered artifacts. You can read about wasm security features here

Build Security

  • Pinned Dependencies: All upstream grammar repositories are pinned to explicit, immutable git commit hashes.
  • Delayed Updates: A parser is only updated after at least 7 days have passed from the date of commit.
  • Manual Review: Before any commit is bumped, the diffs are manually checked by me and run on a VM.
  • Isolated CI: All binaries are compiled strictly within ephemeral, isolated Github action runner.

Cryptography

  • Cosign Signing: All compiled .wasm blobs are individually cryptographically signed using cosign.
  • Github Provenance: All artifacts published to npm are done with provenance.
  • SLSA 3: Releases are published with SLSA level 3.

Verifications of binaries

To verify the integrity of a .wasm file fetched from this package, you can verify its signature against the Github workflow.

Verifying the entire archive (GitHub CLI)

If you downloaded the release tarball, you can verify its SLSA provenance attestation:

gh attestation verify build.tar.gz -R Crysthamus/tree-sitter-wasm

Verifying individual files (Cosign)

Every .wasm file is distributed alongside a .sigstore.json bundle containing its signature and certificate. You can verify individual files locally like this:

cosign verify-blob \
  --bundle path/to/tree-sitter-python.wasm.sigstore.json \
  --certificate-identity-regexp "^https://github.com/Crysthamus/tree-sitter-wasm/\.github/workflows/publish\.yaml@" \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
  path/to/tree-sitter-python.wasm

Licenses

The licenses for the generated .wasm and .scm files belong to their respective upstream grammar authors and can be found on their Github repos.

The code in this repository is licensed under MIT. If you maintain an upstream grammar and have a problem with this licensing, please open an issue.