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

@pieceful/ravel-js-live

v0.2.0

Published

QuickJS/Wasm live JavaScript provider for Ravel.

Readme

@pieceful/ravel-js-live

The QuickJS/WebAssembly execution provider for Ravel 0.2. It analyzes ordinary js and javascript chunks marked .run, resolves their declared ch("...") and load("...") inputs through Ravel core, and evaluates them without Node, filesystem, network, console, or output capabilities.

npm install @pieceful/ravel-core @pieceful/ravel-js-live

Register the provider with core after ordinary Ravel composition:

import { executeLiveProgram } from "@pieceful/ravel-core";
import { javascriptLiveProvider } from "@pieceful/ravel-js-live";

const result = await executeLiveProgram(program, {
  providers: [javascriptLiveProvider],
  resources: { "cool.csv": "name,value\nalpha,1\n" },
});

Live modules must end with exactly one export default. The value may be any JSON-compatible value, including an empty string, empty collection, false, 0, or null. Inputs are copied and deeply frozen before evaluation.

QuickJS runs in a persistent Node or browser worker so its compiled Wasm module stays warm. Every evaluation still creates a fresh QuickJS runtime. Timeout, cancellation, worker failure, or an unresponsive interrupt terminates the outer worker; the provider creates a replacement for a later run. Call provider.dispose() when a provider is no longer needed.

Approved modules

Live code cannot resolve npm packages, paths, or URLs. A host may instead register immutable, QuickJS-compatible ES module source:

import { createJavaScriptLiveProvider } from "@pieceful/ravel-js-live";

const provider = createJavaScriptLiveProvider({
  modules: {
    "@ravel/csv": `
      export const parseCsv = (text) =>
        text.trim().split(/\\r?\\n/).map((line) => line.split(","));
    `,
  },
});

The live block can then use a normal static import:

import { parseCsv } from "@ravel/csv";
export default parseCsv(load("cool.csv"));

For an npm CSV parser, the host must first bundle its pure-JavaScript dependency graph into one ESM source string and register that string under an approved specifier. Native addons, Node built-ins, dynamic imports, package resolution, and filesystem loading remain unavailable.

Node hosts can bundle explicitly allowlisted, already-installed package exports without executing them:

import { prepareJavaScriptModules } from "@pieceful/ravel-js-live/node";

const modules = await prepareJavaScriptModules(
  [{ specifier: "@ravel/csv", from: "csv-parse/browser/esm/sync" }],
  { rootDirectory: projectDirectory },
);

The node subpath is deliberately separate from the browser-safe provider entry. Ravel does not install packages or run package lifecycle scripts.

Browser builds should emit @pieceful/ravel-js-live/worker-browser as a separate module-worker entry and place the release-sync emscripten-module.wasm asset beside that worker bundle. Supply the emitted worker through workerFactory when a bundler cannot preserve the package's default new URL(..., import.meta.url) worker location.

The worker boundary, memory/stack/time/output limits, immutable data boundary, and closed module registry provide layered isolation. Pending-job quotas, broader adversarial review, transform modules, and a virtual filesystem are deferred to 0.3, so this package does not claim a complete hostile-code sandbox.

MIT © James Taylor