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

@molecule/app-e2e-playwright

v1.0.4

Published

E2E bond that opens real Playwright browsers — the same specs that drive the live preview inside a molecule sandbox run here on your machine and in CI, with screenshots, traces and network interception.

Readme

@molecule/app-e2e-playwright

E2E bond that opens real Playwright browsers — Chromium, Firefox or WebKit with everything Playwright offers: screenshots, traces, videos, network interception. It is the bond a molecule sandbox uses too: every sandbox image bakes Playwright's Chromium (the headless shell, its system libraries and fonts), so npm run test:e2e runs there exactly as it does on your own machine and in CI, against the app's own dev server on localhost, with no IDE tab involved. @molecule/app-e2e-preview remains the way to drive the live preview the person is watching.

When the test runner picks the playwright provider, @molecule/app-e2e's test IS Playwright's test, so this bond is only reached by scripts that call connect() themselves (a measurement script, a smoke check outside the runner). Under npx playwright test, Playwright's own fixtures launch the browser as usual.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

// e2e/bonds.ts (scaffolded)
import { resolveE2EProviderName, setProvider } from '@molecule/app-e2e'
import { provider as playwright } from '@molecule/app-e2e-playwright'
import { provider as preview } from '@molecule/app-e2e-preview'

setProvider(resolveE2EProviderName() === 'preview' ? preview : playwright)

// a script
import { connectPlaywright } from '@molecule/app-e2e-playwright'
const page = await connectPlaywright({
  baseURL: 'http://localhost:3000',
  viewport: { width: 390, height: 844 },
})
await page.goto('/')
await page.screenshot({ path: 'home-phone.png' })
await page.close() // closes the context and the browser too

Type

provider

Installation

npm install @molecule/app-e2e-playwright @molecule/app-bond @molecule/app-e2e @playwright/test

API

Interfaces

PlaywrightConnectOptions

Options for provider.connect() beyond the core's.

interface PlaywrightConnectOptions extends E2EConnectOptions {
  /** Browser to launch; default `chromium` (also `MOL_E2E_BROWSER`). */
  browser?: PlaywrightBrowserName
  /** Show the browser window; default headless (also `MOL_E2E_HEADED=1`). */
  headed?: boolean
  /** Extra launch options passed through to Playwright. */
  launchOptions?: LaunchOptions
}

Types

PlaywrightBrowserName

Which Playwright browser to launch.

type PlaywrightBrowserName = 'chromium' | 'firefox' | 'webkit'

Functions

connectPlaywright(options?)

Open a real browser page from any script.

function connectPlaywright(options?: PlaywrightConnectOptions): Promise<Page>

Constants

provider

The bond: setProvider(provider) in your e2e/bonds.ts.

const provider: E2EProvider

Core Interface

Implements @molecule/app-e2e interface.

Bond Wiring

Setup function to register this provider with the core interface:

import { setProvider } from '@molecule/app-e2e'
import { provider } from '@molecule/app-e2e-playwright'

export function setupE2ePlaywright(): void {
  setProvider(provider)
}

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-bond ^1.0.1
  • @molecule/app-e2e ^1.0.0
  • @playwright/test ^1.40.0

Runtime Dependencies

  • @molecule/app-bond

  • @molecule/app-e2e

  • @playwright/test

  • On your own machine, browsers are installed once with npx playwright install chromium (@playwright/test never downloads them on npm install). The launch error says so when they are missing.

  • Inside a molecule sandbox nothing is installed by hand: the image ships Chromium where Playwright looks by default (~/.cache/ms-playwright of the sandbox user; PLAYWRIGHT_BROWSERS_PATH points there too), pinned to the same Playwright version the scaffold's @playwright/test uses. It is the headless shell, so headless: false has no display to open, and the firefox/webkit engines are not baked — Chromium is the sandbox engine. Chromium runs with Playwright's default chromiumSandbox: false (the container is the sandbox), and /tmp there is a 256 MB tmpfs, which is where its per-launch profile goes.

  • MOL_E2E_BROWSER=firefox|webkit picks the engine; MOL_E2E_HEADED=1 shows the window (both are for your own machine).

  • Budget, measured inside a sandbox at the free tier's cap (1 CPU, 1280 MB, 2026-09-22): the browser launches in 0.5–0.8 s; a spec file of four to seven tests takes 4–13 s including the runner's startup, 0.1–3 s per test; Chromium's peak RSS is ~170 MB and the runner's ~190 MB. Run ONE spec file per command so a run never meets the sandbox's per-command cap.