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

playwright-zed-language-server

v0.8.0

Published

Language server for the Playwright Runner Zed extension: discovers and runs Playwright tests in your workspace (community project, not affiliated with Microsoft)

Readme

playwright-zed-language-server

Language server behind the Playwright Runner Zed extension. The Zed extension installs this package from npm at runtime; you do not need to install it yourself.

It detects Playwright workspaces, discovers tests through playwright test --list, and runs tests with the @playwright/test package installed in your project, reporting results back to the editor over the Language Server Protocol.

Usage: playwright-zed-language-server --stdio.

Test discovery executes the workspace's Playwright configuration and test files. Started by Zed 0.218 or newer (identified by clientInfo), the server relies on Zed's worktree trust: Zed starts it only in folders the user trusted, so discovery runs without a further question (revoke with workspace: clear trusted worktrees). With older Zed releases and other editors it asks once per workspace folder and session before running anything.

This is an independent community project, not affiliated with, endorsed by, or maintained by Microsoft or the Playwright team. "Playwright" is a trademark of Microsoft Corporation. The package contains no Playwright code and does not bundle Playwright.

Project selection: in a configuration with two or more projects the server offers one code action per project (Playwright: [x] chromium, Playwright: [ ] firefox, ...) backed by the command playwright.toggleProject ([{ uri, project }]), plus Playwright: Select all projects (playwright.selectAllProjects, [{ uri }]). Runs pass --project <name> per selected project unless every project is selected. The choice is stored per configuration file in project-selection.json under the user's state directory ($XDG_STATE_HOME or ~/.local/state, ~/Library/Application Support, %LOCALAPPDATA%, subdirectory playwright-zed-language-server; override with PLAYWRIGHT_ZED_STATE_DIR). Clients that support workspace/configuration may answer with { "projects": ["chromium", "firefox"] } as a default for configurations without a stored choice; workspace/didChangeConfiguration with the same shape applies live.

Step marks and run output (feature 006): the server declares inlayHintProvider and answers textDocument/inlayHint with one hint per marked line, ⌛ waiting… while a step executes and <n>ms (or <n>ms (ran <k>×)) once it finished, refreshed through workspace/inlayHint/refresh. The data comes from a small Playwright reporter shipped in this package, dist/step-reporter.js, which the server appends to the run as --reporter=list,json,<path>; Playwright loads it inside the user's test run and it appends one JSON line per step event to the file named by PLAYWRIGHT_ZED_STEP_FILE (a temporary, owner-only file the server polls every 200 ms). The complete output of the latest run is written to runs/<workspace key>.log under the state directory (10 MB cap, one file per workspace) and the code action Playwright: Show last run output (command playwright.showLastRunOutput, [{ uri }]) opens it with window/showDocument. Clients without inlay hints or showDocument support get the same runs without these extras and one log line saying so.

Trace viewer (feature 008): the code action Playwright: [x] Show trace viewer / Playwright: [ ] Show trace viewer (command playwright.toggleTraceViewer, [{ uri }]) flips a per-user preference stored in trace-viewer.json under the state directory; a client may also answer workspace/configuration with { "showTrace": true } as a default. While it is on, runs carry --trace on, the step reporter adds the predicted live trace path to testBegin and the trace attachment path to testEnd, and a single-test run feeds both to one playwright show-trace --stdin process per configuration (started in the workspace root on the first trace, kept across runs, closed when the option is turned off or the server exits). Playwright: Show trace (playwright.showTrace, [{ uri, line }]) shows the trace of the test at the cursor from the last run, taken from the JSON report's attachments. Paths are written one per line, spaced so the viewer never reads two in one chunk. The full automated suite starts that window once, so it needs a display (xvfb-run -a npm test on a headless machine; the test skips itself without one).

Show browser (feature 009): the code action Playwright: [x] Show browser / Playwright: [ ] Show browser (command playwright.toggleShowBrowser, [{ uri }]) flips a per-user preference stored in show-browser.json under the state directory; a client may also answer workspace/configuration with { "reuseBrowser": true } as a default (upstream's setting name). While it is on, the first run of a configuration starts one playwright run-server --path=/<random> --host 127.0.0.1 process with PW_EXTENSION_MODE=1 in the configuration's directory, waits for its Listening on ws://... line (15 s), and every run carries --headed --workers 1 --trace off plus PW_TEST_CONNECT_WS_ENDPOINT and PW_TEST_REUSE_CONTEXT=1 in its environment, so Playwright connects to the kept browser and reuses its context. Turning the option on turns the trace viewer off (and writes trace-viewer.json), turning the trace viewer on turns this option off and stops the servers (and writes show-browser.json); a shown run never records a trace. Playwright: Close all browsers (playwright.closeAllBrowsers, [{ uri }]) stops the workspace's servers (refused while a run is in progress); turning the option off stops them after the current run; shutdown, exit and workspace removal stop them too. A stop is SIGINT (the server closes its browser and exits) with SIGKILL five seconds later if needed. The automated suite keeps the kept browser headless by setting PW_DEBUG_CONTROLLER_HEADLESS=1 in the server's environment, so it needs no display.

Work in progress. This is the first slice of the extension (detection, run at cursor, run file, re-run last, project selection, step marks, run output, the trace viewer and show browser). Expect breaking changes between minor versions; the extension pins the exact server version it was built against.

Built with AI assistance. The server, like the rest of the extension, is developed with AI assistance throughout, using GitHub Spec Kit driven by Claude Code with the Claude models Fable and Opus, with maintainer review and recorded verification for every feature.

License: MIT.