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

@taprun/from-playwright

v1.0.0

Published

Convert Playwright scripts into Tap v2 plans. Compile .spec.ts / .test.ts files into deterministic v2 Plan JSON that runs at zero LLM tokens in Claude Code, Cursor, and any MCP host.

Readme

@taprun/from-playwright

Convert Playwright test scripts into Tap v2 Plan JSON.

npm install @taprun/from-playwright @taprun/spec

Take any Playwright .ts/.js script, get back a v2 Plan that tap doctor and tap heal understand. Reuse the script you already have; add monitoring + self-healing on top.

v1.0 — v2 schema

1.0 ships v2 plan output. Per ADR 2026-05-04 Ecosystem v2 Launch, the entire ecosystem moved off the v1 W3C Annotation envelope to a bare Plan shape with the 11-op closure. Output of v1.0 is not backwards compatible with v0.x — install @taprun/[email protected] alongside.

v0.x targets the legacy Tap v1 schema. It still compiles for users on existing lockfiles; new installs should use v1.0+.

Usage

import { readFile, writeFile } from "fs/promises";
import { playwrightToTap } from "@taprun/from-playwright";

const source = await readFile("tests/github.spec.ts", "utf8");
const { plan, warnings } = playwrightToTap(source, {
  site: "github",
  name: "search",
});

if (warnings.length) {
  console.warn("Conversion warnings:", warnings);
}

await writeFile("github/search.plan.json", JSON.stringify(plan, null, 2));

Mapping (v1.0)

| Playwright API | → v2 Op | Status | |---|---|---| | page.goto(url) | { op: "nav", url } | supported | | page.click(selector) | { op: "input", kind: "click", target } | supported | | page.fill(s, v) | { op: "input", kind: "fill", target, value } | supported | | page.type(s, v) | { op: "input", kind: "type", target, value } | supported | | page.press(s, k) | { op: "input", kind: "press", target, value } | supported | | page.waitForSelector(s) | { op: "wait", selector } | supported | | page.waitForTimeout(ms) | { op: "wait", ms } | supported | | page.context().cookies() | { op: "cookies" } | supported | | page.evaluate(fn) | { op: "eval", fn, returns: { type: "object" } } | supported (verify returns.type) | | page.locator(sel).<action>() | passthrough on target | supported | | page.getByRole/Text/TestId/Label/Placeholder/AltText/Title(...) | normalised selector | supported | | page.screenshot() | dropped (no v2 op); warning emitted | retired | | anything else | { op: "eval", ..., returns: { type: "object" } } placeholder + warning | escape hatch |

The 11-op v2 closure has no op:exec. The eval escape hatch must declare returns.type per ADR 2026-05-03 §11.5 #47, so AI / human review is required to finalise an eval-fallback plan.

Read vs write variant

The v2 Plan is a discriminated union. The adapter heuristically picks:

  • read (default) — output has observe: [...], no act, no key.
  • write — output has act: [...] plus a placeholder key: "TODO_DECLARE_KEY". Triggered when a click target matches a submit-like pattern ([type=submit], role=button + name~"submit|post|send|publish|save|...").

Override with options.variant: "read" | "write" if the heuristic guesses wrong. Hand-rolling a real CEL key (the dedup contract) is out of scope for this deterministic adapter; expect to fill it in manually after conversion.

Limitations

The v1.0 scanner is the same regex-then-string-literal walker as v0.x. Known gotchas:

  • Variable-bound selectors fall through to op:eval placeholder.
  • Template-string interpolation works only when the entire string is a literal.
  • Trailing line comments stay in the source visible to regex.

These will be addressed when the scanner upgrades to a TypeScript AST walk.

Out of scope (escaped via op:eval placeholder):

  • Custom test fixtures
  • expect() assertions (use authoritative-source verification in the v2 Plan instead)
  • Multi-context / multi-page setups
  • Playwright trace files (separate adapter)

Part of the Tap ecosystem

Tap is local-first browser automation — compile your scraper once, run it in your own browser forever, and diff the drift when sites change.

License

MIT.