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

locator-heal

v0.1.1

Published

Offline self-healing Playwright locators with actionable reports.

Downloads

346

Readme

locator-heal

Offline self-healing + actionable heal reports for Playwright locators.

locator-heal wraps Playwright locators and records element fingerprints so that repaired selectors can be used automatically when the DOM changes. Every heal is logged and surfaced in a report so selector rot is visible, not hidden.

Install

npm install --save-dev locator-heal

Quickstart

import { test } from '@playwright/test';
import { createHealer } from 'locator-heal';

test('checkout flow', async ({ page }) => {
  const heal = createHealer(page, { store: './.heal/fingerprints.json' });

  await heal.getByTestId('checkout-btn').click();
  await heal.getByRole('button', { name: 'Checkout' }).click();
  await heal.getByText('Submit').click();
  await heal.locator('#promo').fill('SAVE10');
});

How healing works

locator-heal captures stable signals from resolved elements, including data-testid, id, role, aria-label, visible text, labels, and a DOM path. When a locator fails, it searches the live DOM for candidates, scores them with stable signals weighted highest, and chooses the best match above the configured confidence threshold.

Reporters

  • console — logs every heal immediately and prints a summary at flush time.
  • json — writes ./.heal/report.json after flush.
  • none — disables output but keeps events available from healer.report().

Modes

  • heal — default; try the locator and heal on failure.
  • record-only — only capture fingerprints, do not heal.
  • off — pure Playwright passthrough.

Config

| option | type | default | meaning | | --- | --- | --- | --- | | store | string | ./.heal/fingerprints.json | fingerprint JSON file path | | confidenceThreshold | number | 0.6 | minimum score to accept a heal | | mode | 'heal' | 'record-only' | 'off' | 'heal' | behavior switch | | onHeal | (event) => void | undefined | callback fired for each heal | | reporter | 'console' | 'json' | 'none' | 'console' | end-of-run report sink |

What it does NOT do (yet)

  • no LLM fallback
  • no visual/screenshot-based matching
  • no framework support beyond Playwright

Example

Run the demo spec with Playwright:

npx playwright test examples/demo.spec.ts

Notes

The fingerprint store is human-readable JSON. Commit it if you want repeatable heals, or add it to .gitignore if you prefer recording per branch.

Readme toggle

If you want to make the project easier to discover on GitHub, enable the repository README preview toggle in the GitHub UI so the quickstart and install instructions show prominently on the landing page.