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

@termwright/run-history

v0.7.7

Published

Transactional native Termwright run manifests and explicit history health

Readme

@termwright/run-history

Transactional storage and strict reading for Termwright Native Host run manifests. The Runner and reporters consume these records; ordinary test suites use termwright and do not write manifests themselves.

Host and reporter integrations can install the storage API with pnpm add @termwright/run-history.

Each run starts in a private staging directory. Event batches append to an independently checksummed events.ndjson; no complete journal array is needed by the writer. Commit writes the bounded manifest, binds it to the event count, byte length, and SHA-256 digest, writes the commit marker, then atomically renames the directory into place and syncs its parent. A colliding RunId fails instead of overwriting history. The canonical journal, attempt index, result, runtime, resource profile, timeouts, and CI/Git provenance are verified by the reader. Manifest v5 also requires capability-aware resource telemetry. Coordinator CPU/RSS and bounded-journal metrics are numeric measurements. Metrics the host cannot yet observe authoritatively, such as whole-process-tree RSS on POSIX, are the literal unavailable, never a fabricated zero.

The canonical stream fails with an explicit capacity error above 1,000,000 events or 512 MiB. Authoritative evidence is never silently dropped, and an untrusted manifest cannot make the materializing reader allocate beyond those bounds.

Manifest status preserves passed-with-skips as a separate terminal verdict. Readers must not collapse it into passed: the Native Host evaluates the exact skip policy separately when deciding the command's certification result. The manifest verdict alone never proves that policy matched. Its canonical journal retains the applicable declarations, identity-bound skipped tests, policy issues, and aggregate policy result so an evidence reader can audit the decision without relying on attempt counters.

import { beginRunManifest, readRunHistory } from '@termwright/run-history';

const transaction = await beginRunManifest('.termwright/runs', start);
await transaction.appendEvents(eventBatch);
await transaction.commit(manifest);

const records = await readRunHistory('.termwright/runs');
for (const record of records) {
  if (record.state === 'complete') console.log(record.manifest.status);
  else if (record.state === 'unsupported-version') console.warn(record.state, record.version);
  else console.warn(record.state, record.reason);
}

Readers return explicit complete, incomplete, corrupt, or unsupported-version records. They never reinterpret a partial transaction or unknown format as a successful run. readRunManifest() addresses one typed RunId; readRunHistory() returns newest records first and accepts a result limit.

NODE_RUN_MANIFEST_WRITER is the durable filesystem implementation. Supplying a custom RunManifestWriter is intended for alternative stores and fault tests; it must preserve exclusive creation, append order, event-file and directory durability, and atomic rename semantics.

Node.js 22 and 24 are supported. The on-disk format is internal release data; consume it through this package rather than reading its files directly.