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

@satakedev/yatagarasu

v0.1.0

Published

Yatagarasu — fire-and-forget log collector SDK that batches and ships logs without ever blocking or crashing your app.

Readme

@satakedev/yatagarasu

Yatagarasu (八咫烏) — the three-legged crow of Japanese myth, a guide and messenger. This SDK is the crow that gathers your app's logs and carries them home, without ever getting in your way.

A tiny, dependency-free log collector SDK. It batches log records in memory and ships them to a Yatagarasu ingestion endpoint in the background — fire-and-forget, safe by design: logging never blocks your code and never throws into it.

Install

npm install @satakedev/yatagarasu
# or: pnpm add @satakedev/yatagarasu

Requires Node.js >= 18 (uses the global fetch and AbortController). Ships dual ESM + CJS builds with type definitions.

Usage

import { createLogger } from '@satakedev/yatagarasu'

const log = createLogger({
  apiKey: process.env.YATAGARASU_KEY!,
  project: 'my-app',
})

log.info('user logged in', { userId: 42 })
log.warn('payment retry', { attempt: 1 })
log.error('payment failed', { orderId, trace_id: 'abc-123' })
log.debug('received payload', { body })

// Before shutting down (also runs automatically on beforeExit/SIGTERM/SIGINT):
await log.flush()
await log.close()

trace_id can be passed inside meta — it is lifted to the top-level field expected by the ingestion API; the rest of meta is sent as-is.

Options

| Option | Default | Description | | ----------------- | --------------------------------------------- | -------------------------------------------- | | apiKey | — | Project API key (Authorization: Bearer). | | project | — | Project identifier. | | endpoint | https://yatagarasu.satake.dev/api/ingest | Ingestion URL. | | flushIntervalMs | 5000 | Flush at least this often. | | flushSize | 50 | Flush as soon as this many records buffer. | | maxBufferSize | 1000 | Hard cap; oldest records dropped past it. | | requestTimeoutMs| 10000 | Per-request timeout (via AbortController). | | maxRetries | 5 | Retry attempts for a failing batch. | | fetch | global fetch | Injectable fetch (tests / custom transport). | | onError | — | Observability hook; errors never reach you. |

Robustness contract

| Aspect | Behavior | | --------------- | -------------------------------------------------------------------- | | Logging methods | Never block, never throw — they only enqueue. | | Flush | By time (flushIntervalMs) or size (flushSize). | | Transport | POST { logs: [...] } with Authorization: Bearer <apiKey>. | | Network / 5xx | Exponential backoff with jitter, up to maxRetries. | | 429 | Honors Retry-After when present. | | 4xx (not 429) | Not retried (bad payload / auth); batch is dropped, onError fired. | | Buffer full | Drops the oldest records (FIFO) — never grows unbounded. | | Failed batch | Returned to the buffer (respecting the cap) for a later retry. | | Shutdown | Auto-flush on beforeExit / SIGTERM / SIGINT (Node only). | | Errors | Routed to onError; never propagated to the caller. |

License

MIT