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

@treecrdt/wa-sqlite

v0.3.1

Published

Loader + thin helpers to use the TreeCRDT SQLite extension with wa-sqlite in the browser and Node (in-memory WASM).

Readme

@treecrdt/wa-sqlite

Loader + thin helpers to use the TreeCRDT SQLite extension with wa-sqlite in the browser and Node (in-memory WASM).

Build wa-sqlite (extension baked in)

The vendor package builds upstream wa-sqlite with TreeCRDT baked in via Makefile overrides.

pnpm --filter @treecrdt/wa-sqlite-vendor build
pnpm --filter @treecrdt/wa-sqlite build

The build copies wa-sqlite WASM/JS assets into dist/wa-sqlite/ for Node and packages them for browser apps via the Vite plugin.

Browser usage

Use createTreecrdtClient() with OPFS or in-memory storage. Browser apps should use @treecrdt/wa-sqlite/vite-plugin to copy assets into public/wa-sqlite/.

import { createTreecrdtClient } from '@treecrdt/wa-sqlite';

const client = await createTreecrdtClient({
  storage: { type: 'auto' },
  docId: 'my-doc',
});

See the playground for a full browser demo.

Node usage (in-memory WASM)

On Node, createTreecrdtClient() runs wa-sqlite in-process with an in-memory database. OPFS and worker runtimes are not supported.

import { createTreecrdtClient } from '@treecrdt/wa-sqlite';

const client = await createTreecrdtClient({
  storage: { type: 'memory' },
  runtime: { type: 'direct' },
  docId: 'my-doc',
});

// ... use client.ops, client.tree, client.local, etc.

await client.close();

WASM assets are resolved automatically from dist/wa-sqlite/ (or @treecrdt/wa-sqlite-vendor in the monorepo). Override with assets.baseUrl pointing at a filesystem directory containing the wa-sqlite artifacts.

For file-backed persistence on Node, use @treecrdt/sqlite-node (native SQLite + TreeCRDT extension) instead.

Tests

  • Browser e2e: pnpm --filter @treecrdt/wa-sqlite-demo test:e2e
  • Node unit + conformance: pnpm --filter @treecrdt/wa-sqlite test

Benchmarks

pnpm --filter @treecrdt/wa-sqlite benchmark

Runs in-memory workloads in Node via the shared WASM loader.