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

@effectstream/binary-checksum

v0.200.2

Published

Shared fail-closed SHA-256 verification for the EffectStream binary wrappers

Readme

@effectstream/binary-checksum

Shared fail-closed SHA-256 verification for the packages/binaries/* wrappers.

Those packages download a prebuilt binary and then execute it. bin-wrapper has no integrity support and discards the archive after extracting, so the only thing left to check is the extracted file. This module is that check.

import { verifyBinaryChecksum } from '@effectstream/binary-checksum';
import { CHECKSUMS } from './checksums.js';

const flavour = verifyBinaryChecksum({
  binaryPath: bin.path(),
  checksums: CHECKSUMS,
  packageName: 'grafana-loki',
  skipEnvVar: 'GRAFANA_LOKI_SKIP_CHECKSUM',
  version: '3.5.8',
});

Throws if the digest is not pinned. Returns the matched platform key, or undefined when the skip variable is set to exactly 1.

Verify before you exec

bin.run() resolves the binary and executes it, so calling it before verifying defeats the point. Download explicitly, verify, then run:

if (!fs.existsSync(bin.path())) await bin.download();
verifyBinaryChecksum({ /* ... */ });
await bin.run(['--version']);

Watch for anything that mutates the binary between extraction and execution. bitcoin-core ad-hoc signs on Apple Silicon, which changes the hash, so there verification has to happen first and cannot be repeated afterwards.

Digests are matched as a set

Not looked up by the running platform. Asset selection in bin-wrapper goes through os-filter-obj and the arch package, whose reported architecture has not always agreed with os.arch(): [email protected] had no notion of arm64 at all, so every Mac silently ran the x86_64 build under Rosetta. Set membership is immune to that whole class of mismatch, including deliberate emulation, while still proving the file is one of the pinned builds. The matched key is returned for logging rather than enforced.

An empty table is an error

Passing {} throws rather than accepting anything. A forgotten regeneration after a version bump would otherwise turn a fail-closed guard into a silent no-op, which is the failure this module exists to prevent.

What a pinned digest does and does not prove

Digests are generated by scripts/generate-binary-checksums.ts, which records provenance per entry:

  • upstream-verified means the archive was matched against a checksum the vendor publishes before the binary inside it was hashed. The digest traces to the vendor.
  • self-recorded means no upstream manifest was available. The digest pins the artifact against later mutation and says nothing about whether it was good in the first place. Worth having, but do not mistake it for the stronger claim.