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

@temporal-git/core

v2.1.1

Published

Core git bisect engine for temporal-git (shared by CLI and VS Code extension).

Downloads

36

Readme

@temporal-git/core

Core git bisect engine for temporal-git.

Shared by the temporal-git CLI and the VS Code extension so behavior can't drift between surfaces. Wraps git bisect with typed, tested plumbing.

Install

npm install @temporal-git/core

Requires Node ≥ 18.

Usage

import { BisectEngine } from '@temporal-git/core';

const engine = new BisectEngine(process.cwd());

await engine.start({ good: 'v1.0.0', bad: 'HEAD' });

const result = await engine.run({
  command: ['npm', 'test'],
  cwd: process.cwd(),
  onStep(step, total) {
    console.log(`Step ${step}/${total}`);
  },
  onOutput(output) {
    console.log(output);
  },
});

console.log(`Culprit: ${result.hash} — ${result.message}`);

await engine.reset();

API

class BisectEngine

| Method | Returns | Description | |--------|---------|-------------| | new BisectEngine(cwd) | BisectEngine | Construct for a git repo at cwd | | start({ good, bad, paths? }) | Promise<void> | git bisect start + mark good/bad bounds | | run({ command, cwd, onStep?, onOutput? }) | Promise<BisectResult> | git bisect run with progress callbacks; resolves to culprit | | mark('good' \| 'bad' \| 'skip', commit?) | Promise<string> | Mark current (or specified) commit | | reset(commit?) | Promise<void> | End session, return to original HEAD | | log() | Promise<string> | Raw git bisect log output | | isActive() | Promise<boolean> | Is a bisect session currently running? | | isInsideRepo() | Promise<boolean> | Is cwd inside a git repo? | | getCommitInfo(hash) | Promise<BisectResult> | Author, date, message, full metadata | | getCurrentCommit() | Promise<{ shortHash, hash, message }> | The commit currently checked out | | getGitHubRemote() | Promise<string \| null> | "owner/repo" if origin is GitHub, else null |

Types

interface BisectOptions {
  good: string;           // tag, branch, or SHA
  bad: string;            // tag, branch, or SHA
  paths?: string[];       // limit to commits touching these paths
}

interface BisectResult {
  hash: string;
  shortHash: string;
  author: { name: string; email: string; date: string };
  message: string;        // commit subject
  body?: string;          // extended message body
}

interface RunOptions {
  command: string[];      // e.g. ['npm', 'test']
  cwd: string;
  onStep?: (step: number, total: number) => void;
  onOutput?: (output: string) => void;
}

Helpers

  • parseGitHubOwnerRepo(remoteUrl) — extract "owner/repo" from a git remote URL, or null
  • shellQuote(s) — quote a single arg for shell transport
  • reduceBisectStep(state) — pure reducer for bisect step state

How it works

  • run() uses git bisect run <argv>, which interprets exit codes: 0 = good, non-zero = bad, 125 = skip (e.g. won't build)
  • Step counts come from observing git bisect's actual output — we don't extrapolate percentages from "revisions left" because git's count can exceed the estimate and naïve math produces negative progress
  • The engine ships with an integration test that builds a real temp git repo and verifies run() finds the known first-bad commit

License

MIT — see LICENSE.