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

@spechive/playwright-reporter

v0.0.7

Published

Playwright reporter for SpecHive test reporting platform

Readme

@spechive/playwright-reporter

Playwright reporter for the SpecHive test reporting platform. Sends test results, retries, and artifacts (screenshots, traces, videos) to your SpecHive instance in real time.

Installation

pnpm add -D @spechive/playwright-reporter

Configuration

Cloud (spechive.dev)

Only a project token is needed — the reporter connects to https://api.spechive.dev by default:

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

export default defineConfig({
  reporter: [
    ['html'],
    [
      '@spechive/playwright-reporter',
      {
        projectToken: process.env.SPECHIVE_PROJECT_TOKEN,
      },
    ],
  ],
});

Self-hosted

Provide your instance URL via apiUrl:

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

export default defineConfig({
  reporter: [
    ['html'],
    [
      '@spechive/playwright-reporter',
      {
        apiUrl: 'https://api.your-spechive-instance.com',
        projectToken: process.env.SPECHIVE_PROJECT_TOKEN,
      },
    ],
  ],
});

Config Options

| Option | Type | Default | Description | | ----------------------- | ------------------------- | ---------------------------- | -------------------------------------------------------- | | apiUrl | string | https://api.spechive.dev | SpecHive API endpoint | | projectToken | string | SPECHIVE_PROJECT_TOKEN env | Project token for authentication | | timeout | number | 30000 | HTTP request timeout in milliseconds | | enabled | boolean | true | Enable or disable the reporter | | captureArtifacts | boolean | true | Upload test artifacts (screenshots, traces, videos) | | maxRetries | number | 3 | Max retries for failed API calls | | flushTimeout | number | 30000 | Max wait time for pending events on test completion (ms) | | failOnConnectionError | boolean | false | Throw if the API is unreachable instead of warning | | metadata | Record<string, unknown> | {} | Custom metadata to attach to the run |

Environment Variables

| Variable | Description | | ------------------------ | ------------------------------------------------------------------------------------- | | SPECHIVE_API_URL | Fallback for apiUrl when not set in config (defaults to https://api.spechive.dev) | | SPECHIVE_PROJECT_TOKEN | Fallback for projectToken when not set in config | | SPECHIVE_ENABLED | Set to "false" or "0" to disable the reporter |

Config values take precedence over environment variables.

CI Auto-Detection

The reporter automatically detects CI environments and attaches branch name, commit SHA, CI build URL, and provider name to each run. Supported providers:

  • GitHub Actions
  • GitLab CI
  • Jenkins
  • CircleCI
  • Azure DevOps
  • Generic CI (falls back to common environment variables like CI_COMMIT_SHA, BUILD_URL)

No configuration is needed -- CI metadata is collected automatically when running inside a supported CI environment.

CI Setup Examples

GitHub Actions

name: E2E Tests
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - run: npm ci
      - run: npx playwright install --with-deps
      - run: npx playwright test
        env:
          SPECHIVE_PROJECT_TOKEN: ${{ secrets.SPECHIVE_PROJECT_TOKEN }}

GitLab CI

e2e-tests:
  image: mcr.microsoft.com/playwright:v1.50.0-noble
  variables:
    SPECHIVE_PROJECT_TOKEN: $SPECHIVE_PROJECT_TOKEN
  script:
    - npm ci
    - npx playwright test

For self-hosted instances, also set SPECHIVE_API_URL in your CI environment.

Troubleshooting

Reporter disabled warning If you see [spechive] Reporter disabled: missing projectToken, ensure that the SPECHIVE_PROJECT_TOKEN environment variable is set, or pass projectToken directly in the reporter config.

Connection errors If the reporter cannot reach your SpecHive instance, verify the apiUrl is correct and the server is reachable. Set failOnConnectionError: true to make the test run fail immediately when the API is unreachable, instead of silently dropping events.

Missing artifacts Verify that captureArtifacts is not set to false. Artifacts larger than 10 MB are skipped automatically. Check the console output for [spechive] Skipping artifact warnings.

License

MIT