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

@bugsee/webworker

v0.1.0-beta.3

Published

DOM-less browser-family worker SDK: Web Workers + Service Workers (self error/unhandledrejection, console + network capture)

Readme

@bugsee/webworker

The Bugsee SDK for Web Workers (dedicated and shared) and Service Workers: console and network capture, and global error and unhandled-rejection reporting, in a worker context that has no DOM.

Part of the Bugsee JavaScript SDK (public beta, 0.1.0-beta.x).

Install this package directly, and call it from inside the worker script. Your page code keeps using @bugsee/bugsee; the worker needs its own launch because it is a separate JavaScript context.

Install

npm install @bugsee/webworker
# or
pnpm add @bugsee/webworker
# or
yarn add @bugsee/webworker

Usage

Web Worker. launch() returns the client directly (not a Promise):

// worker.ts
import { launch } from '@bugsee/webworker';

const bugsee = launch('YOUR_APP_TOKEN');

It captures console output, fetch and WebSocket traffic (also XMLHttpRequest in dedicated workers), and global error and unhandledrejection events on the worker.

Not captured, because a worker has no DOM: clicks, key presses, navigation, the view hierarchy and session replay.

Service Workers

Pass platformType: 'service-worker'. A Service Worker is stopped when idle, so wrap event handlers with withBugseeEvent. It hands the upload to event.waitUntil so the worker stays alive until a report is sent.

// sw.ts
import { launch, withBugseeEvent } from '@bugsee/webworker';

const bugsee = launch('YOUR_APP_TOKEN', { platformType: 'service-worker' });

self.addEventListener(
  'fetch',
  withBugseeEvent(bugsee, (event) => {
    event.respondWith(fetch(event.request));
  }),
);

withBugseeEvent never changes your handler's outcome: your own error is rethrown, and SDK failures go to an optional third argument, withBugseeEvent(bugsee, handler, (error) => console.debug(error)).

Options

  • platformType: 'web-worker' (default) or 'service-worker'.
  • persist: keep assembled report bundles in IndexedDB and re-upload any that a stopped worker left behind. Default true for Service Workers and false for Web Workers.
  • appVersion, appBuild, appId: identify your release in reports.
  • captureLogs, captureNetwork: capture streams, on by default.

Links

  • Repository: https://github.com/bugsee/bugsee-javascript/tree/main/packages/webworker
  • Bugsee: https://bugsee.com

License

MIT. See the LICENSE file.