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

@realuptime/errors

v0.6.0

Published

Zero-dependency error tracking SDK for JavaScript and Node (RealUptime Errors).

Readme

@realuptime/errors

Zero-dependency error tracking SDK for JavaScript and Node: part of RealUptime Errors.

This is a mirror. It is published from errors-js in the realuptime monorepo by scripts/publish-sdk-mirrors.mjs and is not edited directly; open issues and PRs against this repo, but expect source changes to land here after they merge upstream.

Install

Installable from the package registry (primary) or straight from this mirror's git history (e.g. to pin an exact commit).

npm install @realuptime/errors
# or, straight from this mirror
npm install github:RealUptimeHQ/realuptime-errors-js

Usage

import * as realuptimeErrors from "@realuptime/errors";

realuptimeErrors.init({
  dsn: "https://realuptime.io/api/errors/v1/ingest/rue_...", // from your project's dashboard
  release: "v2.4.1",
  environment: "production",
});

realuptimeErrors.captureException(someError);

WSGI/ASGI equivalents live in the Python SDK, realuptime-errors-py.

Source maps (Vite / webpack plugins)

Upload the .map files a production build writes, for the release your app reports at runtime, so minified JS frames symbolicate on the issue page. Both plugins read the maps the bundler already wrote and POST them to your project's source-map endpoint (authenticated by the DSN, the one secret CI already has). They change nothing in the build output.

// vite.config.js
import { realuptimeSourcemaps } from "@realuptime/errors/vite";
export default {
  build: { sourcemap: true },
  plugins: [realuptimeSourcemaps({ release: process.env.GITHUB_SHA, dsn: process.env.REALUPTIME_ERRORS_DSN })],
};

// webpack.config.js
const { RealuptimeSourcemapsPlugin } = require("@realuptime/errors/webpack");
module.exports = { devtool: "source-map", plugins: [new RealuptimeSourcemapsPlugin({ release: process.env.GITHUB_SHA })] };

An upload failure is logged with the server's own message and the build still succeeds; pass failOnError: true to fail the build instead. With no DSN set (local builds) the plugin logs one line and uploads nothing. Limits: 2MB per map, 50 maps per release, 10 files per request (batched for you).

What this SDK actually does

  • Never crashes your app. Every public function catches everything; a broken SDK logs once (prefixed [realuptime-errors]) and goes quiet. An error tracker that crashes the app it watches is worse than none.
  • Scrubs PII by default, client-side, before anything serializes: Authorization/Proxy-Authorization/Cookie/Set-Cookie headers are replaced whole; card-shaped digit runs (Luhn-checked), JWTs, prefixed API keys, and long hex/base64 runs are pattern-scrubbed anywhere they appear in the message, request context, breadcrumbs, or captured source lines. Opt one field back in with allowFields: ["x-request-id"]; there is no global "disable scrubbing" switch, by design, and an allowed field's value still passes the pattern rules.
  • Never silently drops. The in-memory buffer (200 events) evicts the oldest event when full, counts every eviction, and reports the count on the next successful batch, so drops show up on your dashboard instead of disappearing.
  • Zero runtime dependencies. dependencies in package.json is always {}, enforced by wire-contract.test.ts in this repo, not just claimed in prose.

Config (init)

| Option | Type | Default | Notes | | --- | --- | --- | --- | | dsn | string | required | Your project's ingest URL, shown once at creation. Safe in client-side code: it can only submit events to that one project. | | release | string? | none | e.g. a git SHA or version tag. | | environment | string? | none | e.g. "production". | | allowFields | string[]? | [] | Lower-cased header/field names to opt back into capture. | | captureUnhandled | boolean | true | Installs process/window handlers for uncaught exceptions and rejections. |

Source and build

index.ts, client.ts, buffer.ts, scrub.ts, custom-scrub.ts, and types.ts are the real, tested source (see the .test.ts files beside them). dist/ is a plain compile of that source (TypeScript's own compiler, no bundler, ES2022 modules, declarations included) and is what package.json actually points import/types at, so a plain npm install plus import works with no extra build step or type-stripping flag on the consumer's side.

Version

This mirror tracks SDK_VERSION 0.6.0 in index.ts, the string every event actually carries on the wire.

Running the tests

The suite sits beside the code in this repository (Node.js 22 or newer):

npm install
npm test

License

MIT, see LICENSE.