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

@webstir-io/testing-contract

v0.1.7

Published

Public contract definitions for Webstir test manifests and runner events.

Readme

@webstir-io/testing-contract

TypeScript types and JSON schema defining Webstir’s test manifests, runner events, and summaries. Downstream tooling (CLI, dashboards, custom reporters) consume this package to stay aligned with the official testing contract.

Status

  • Experimental testing contract for the Webstir ecosystem — event and manifest schemas may evolve alongside the runner and host.
  • Use pinned versions and expect breaking changes while the testing story stabilizes.

Install

npm install @webstir-io/testing-contract

Exported Types

import type {
  TestRuntime,
  TestModule,
  TestManifest,
  TestRunResult,
  RunnerSummary,
  RunnerStartEvent,
  RunnerResultEvent,
  RunnerSummaryEvent,
  RunnerLogEvent,
  RunnerErrorEvent,
  RunnerWatchIterationEvent,
  RunnerEvent,
} from '@webstir-io/testing-contract';
  • TestManifest documents discovered tests (workspace root, timestamp, modules).
  • RunnerEvent unions all structured events emitted by @webstir-io/webstir-testing.
  • RunnerSummary aggregates totals and individual TestRunResults.

Schema artifacts are published under schema/:

  • TestManifest.schema.json
  • RunnerEvent.schema.json

The schemas are also hosted at https://webstir.dev/schema/testing-contract/*.json for tooling that prefers remote references.

Usage Examples

Handling Runner Events

import type { RunnerEvent } from '@webstir-io/testing-contract';

function onEvent(payload: string) {
  const event = JSON.parse(payload) as RunnerEvent;
  if (event.type === 'summary') {
    console.log(`${event.runtime} passed ${event.summary.passed}`);
  }
}

Validating With JSON Schema

import Ajv from 'ajv';
import schema from '@webstir-io/testing-contract/schema/RunnerEvent.schema.json';

const ajv = new Ajv();
const validate = ajv.compile(schema);

function assertEvent(payload: string) {
  const event = JSON.parse(payload);
  if (!validate(event)) {
    throw new Error(`Invalid runner event: ${ajv.errorsText(validate.errors)}`);
  }
}

Community & Support

  • Code of Conduct: https://github.com/webstir-io/.github/blob/main/CODE_OF_CONDUCT.md
  • Contributing guidelines: https://github.com/webstir-io/.github/blob/main/CONTRIBUTING.md
  • Security policy and disclosure process: https://github.com/webstir-io/.github/blob/main/SECURITY.md
  • Support expectations and contact channels: https://github.com/webstir-io/.github/blob/main/SUPPORT.md

Maintainer Workflow

npm install
npm run clean          # remove dist artifacts
npm run build          # emits dist/index.js, dist/index.d.ts, refreshed schema/
npm run test
npm run smoke
# Release helper (bumps version and pushes a package-scoped release tag)
npm run release -- patch
  • Regenerate schema files whenever TypeScript interfaces change.
  • Ensure CI runs npm ci, npm run clean, npm run build, npm run test, and npm run smoke before publishing.
  • Publishing targets npm and is triggered by the monorepo release workflow.

License

MIT © Webstir