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

@vigneshplre4/autoreport

v0.7.3

Published

AI-powered HTML reporter for Playwright with failure analysis, flamecharts, historical trends, and webhook/bug-tracker integrations.

Readme

autoreport

An AI-powered HTML reporter for Playwright — failure analysis, locator auto-healing, flamecharts, historical trends, bug-tracker integration, and webhook alerts, in a single self-contained report.html.

Features

  • Self-contained HTML — dark theme default, zero external CDN dependencies, works offline
  • AI failure analysis — OpenAI + Anthropic, with automatic caching to cut duplicate-failure costs
  • Locator auto-healing — detects brittle CSS/XPath and suggests getByRole / getByText / getByTestId alternatives
  • Flamechart timelines — see which test steps are actually slow
  • Historical sparklines — the last 5 runs per test at a glance (stored in SQLite)
  • Bug tracker integration — auto-file Jira / GitHub issues for failures
  • Slack / Teams webhooks — fire a formatted summary when the quality gate fails
  • Quality gate — fail your CI build when pass-rate drops below a configurable threshold
  • TypeScript-first with strict types and zero runtime dependencies

Requirements

  • Node.js >= 22.5.0 (uses the built-in node:sqlite module — no native compilation needed)
  • Playwright >= 1.40

Installation

npm install --save-dev @vigneshplre4/autoreport

Quick Start

1. Add the reporter to playwright.config.ts

import { defineConfig } from '@playwright/test';

export default defineConfig({
  reporter: [
    ['list'],
    ['@vigneshplre4/autoreport', {
      outputDir: './autoreport-output',
      qualityGatePassRate: 90,
      failOnQualityGate: true,
    }],
  ],
});

See examples/playwright.config.ts for a more complete example.

2. Set environment variables

Copy .env.example to .env and fill in:

AI_PROVIDER=openai
OPENAI_API_KEY=sk-...

3. Run your tests

npx playwright test

Your HTML report appears at autoreport-output/report.html.

Reporter Options

| Option | Default | Description | |---|---|---| | outputDir | ./autoreport-output | Directory for report.html and the SQLite history DB | | reportFileName | report.html | Name of the HTML file | | enableAI | auto | AI analysis. Auto-enabled when OPENAI_API_KEY or ANTHROPIC_API_KEY is set | | qualityGatePassRate | 90 | Fail CI when pass-rate (excluding skipped) drops below this % | | failOnQualityGate | true | Set process.exitCode = 1 on gate failure | | sparklineRunCount | 5 | History slots per test | | maxConcurrentAIRequests | 3 | Cap on parallel AI calls to avoid rate limits | | logLevel | info | debug | info | warn | error | silent |

Environment Variables

See .env.example for the complete list. Highlights:

AI

  • AI_PROVIDERopenai (default) or anthropic
  • OPENAI_API_KEY, OPENAI_MODEL (default gpt-4o-mini)
  • ANTHROPIC_API_KEY, ANTHROPIC_MODEL (default claude-sonnet-4-6)

Bug tracker (optional)

  • BUG_TRACKER=jira + JIRA_HOST, JIRA_EMAIL, JIRA_API_TOKEN, JIRA_PROJECT_KEY
  • BUG_TRACKER=github + GITHUB_TOKEN, GITHUB_REPO (owner/repo)

Notifications (optional)

  • NOTIFIER=slack + SLACK_WEBHOOK_URL
  • NOTIFIER=teams + TEAMS_WEBHOOK_URL

Architecture

src/
├── core/          Registry, ConfigLoader, Cache, RetryPolicy, Logger
├── interfaces/    IAIProvider, IDatabaseProvider, IBugTracker, INotification
├── factories/     One factory per provider family
├── providers/
│   ├── ai/        BaseAIProvider + OpenAI + Anthropic
│   ├── database/  SqliteProvider (node:sqlite)
│   ├── bug-tracker/  Jira, GitHub
│   └── notification/ Slack, Teams
├── analysis/      LocatorHealer, PromptBuilder, FailureAnalyzer, QualityGate
├── html/          HtmlGenerator + inline CSS/JS + components
└── reporter.ts    The Playwright Reporter entry point

Adding a new provider (say, Gemini for AI):

  1. Create src/providers/ai/GeminiProvider.ts extending BaseAIProvider
  2. Wire it into src/factories/AIProviderFactory.ts
  3. Done — all shared logic (caching, retries, JSON parsing) already works

Development

npm install
npm run typecheck
npm test
npm run build

License

MIT