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

@proseql/browser

v0.16.0

Published

Browser storage adapters and Rust/WASM database runtime for ProseQL

Readme

@proseql/browser

Browser-safe ProseQL entry points and persistence hosts for the Rust/WebAssembly engine.

The package re-exports the browser build of @proseql/effect, the Promise-first @proseql/engine/browser facade, and adapters for localStorage, sessionStorage, and IndexedDB. Queries and mutations run in Rust/WASM; storage remains at the browser boundary.

Install

npm install @proseql/browser [email protected]

This release is tested with exactly [email protected].

Promise-first WASM database

import { Schema } from "effect"
import {
  createLocalStorageEngineStorageHost,
  createPersistentEngineDatabase,
} from "@proseql/browser"

const config = {
  books: {
    schema: Schema.Struct({ id: Schema.String, title: Schema.String }),
    file: "books.json",
    relationships: {},
  },
} as const

const db = await createPersistentEngineDatabase(
  config,
  { books: [] },
  {
    storageHost: createLocalStorageEngineStorageHost({
      keyPrefix: "my-app:",
    }),
  },
)

await db.books.create({ id: "1", title: "Dune" })
await db.flush()
await db.close()

The browser loader resolves the .wasm asset included in @proseql/engine through the package's browser entry point. A normal ESM-aware bundler or browser serves that asset; no Rust build runs in the application.

Promise-first engine hosts are available for:

| Factory | Storage | | --- | --- | | createLocalStorageEngineStorageHost | Persistent web storage with cross-tab storage events | | createSessionStorageEngineStorageHost | Storage scoped to the current tab/session | | createIndexedDBEngineStorageHost | IndexedDB for larger browser datasets |

Effect APIs and compatibility layers

createEffectDatabase and createPersistentEffectDatabase expose the same WASM-backed engine through Effect and Stream values. Existing Effect storage layers are also exported:

  • LocalStorageLayer / BrowserStorageLayer
  • SessionStorageLayer
  • IndexedDBStorageLayer
  • makeLocalStorageLayer, makeSessionStorageLayer, and makeIndexedDBStorageLayer

Browser-safe JSON, JSON5, JSONC, Hjson, YAML, TOML, TOON, and Prose codecs are re-exported from the core surface.

Storage keys and quota failures

Browser storage uses flat keys. pathToKey("./data/books.yaml") returns "proseql:data/books.yaml"; pass a second argument to choose another prefix. localStorage and sessionStorage are usually limited to a few megabytes. Expected quota failures are reported as tagged StorageError values. Use IndexedDB for larger data.

Known async transaction limitation

Transaction-origin tracking is not reliable across asynchronous work yielded from inside a browser transaction. Avoid unrelated asynchronous work inside browser transactions when persistence or watch-driven updates may interleave. Keep transaction callbacks synchronous apart from the database operations they coordinate, and do not assume an external update can always be distinguished after an arbitrary await. This limitation is tracked separately and is not fixed by this release.

License

MIT