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

@ergenekon/replay

v0.4.1

Published

ERGENEKON deterministic replay engine — replay production bugs on your laptop

Readme

@ergenekon/replay

Deterministic replay engine — reproduce any production bug on your laptop, byte-for-byte identical

npm License

Takes a recording from @ergenekon/collector and re-executes it with all I/O mocked to return the exact same values as production. Every Date.now(), Math.random(), database result, and HTTP response is replayed in sequence — guaranteed byte-for-byte identical output.

Install

npm install @ergenekon/replay

Replay a Recording

import { ReplayEngine } from '@ergenekon/replay';

const engine = new ReplayEngine(session);

// Replay with mocked I/O — pass your handler function
const result = await engine.replay(async (mocks) => {
  // mocks.mockDateNow()     → returns recorded Date.now() value
  // mocks.mockMathRandom()  → returns recorded Math.random() value
  // mocks.mockFetch(url)    → returns recorded HTTP response
  // mocks.mockDbQuery(sql)  → returns recorded DB result
  return yourHandler();
});

Time-Travel Inspection

const engine = new ReplayEngine(session);

// Get the full event timeline
const timeline = engine.getTimeline();
// [{ sequence, type, operationName, durationMs, ... }, ...]

// Get system state at any point in time
const state = engine.getStateAt(42); // sequence 42
// { dateNowValues, randomValues, dbQueries, httpCalls }

// Diff between two points
const diff = engine.getDiff(10, 50);
// { added: [...], removed: [...], changed: [...] }

Proven Results

━━━ VERIFICATION ━━━━━━━━━━━━━━━━━━━━━━
  PERFECT REPLAY — BYTE-FOR-BYTE IDENTICAL

  Original requestId:  57wbkit6
  Replayed requestId:  57wbkit6  ✓
  Original score:      68
  Replayed score:      68        ✓

  Date.now()     → deterministic ✓
  Math.random()  → deterministic ✓
  Response body  → identical     ✓

Why It Works

Node.js is single-threaded — no thread scheduling non-determinism. By capturing all I/O boundary values and replaying them in the same order, execution is fully deterministic.

Non-determinism sources captured:

  • Date.now() — wall clock
  • Math.random() — PRNG
  • crypto.randomUUID() — random bytes
  • Database results — external state
  • HTTP responses — external services
  • Timer fire order — async scheduling

Part of ERGENEKON Engine

| Package | Description | |---------|-------------| | @ergenekon/core | Shared types, HLC clock, ULID | | @ergenekon/probe | Express middleware — records every request | | @ergenekon/collector | Ingestion server — stores recordings | | @ergenekon/replay | ← You are here | | @ergenekon/cli | CLI — inspect, export, watch recordings |

License

Business Source License 1.1 — free for non-production use.