Provides a cross-platform Web Worker implementation that works in both browser and Node, including support for module workers. Useful when you want the same Worker code to run in published npm modules, with browser-style Worker events and compatible Worker URL handling.
Project status
- Maintenance status: The latest reported upstream push and the newest documented updates (v1.5.0 and v1.4.x) are from 2025-01-31, which is over a year ago relative to 2026-08-11, so the source appears quiet, with no evidence of active maintenance right now.
- Update cadence: Updates are clustered on 2025-01-31 (v1.5.0 and v1.4.1, plus v1.4.0 earlier that day), but there is no evidence of ongoing cadence after that date.
AI summary generated
Recent updates
1.5.0
Release 1.5.0 adds support for `importScripts()`, defines `WorkerGlobalScope` in the Node worker context, and fixes data URL decoding. The code changes also adjust how workers are selected and how classic workers load scripts internally.
Features1.4.1
web-worker 1.4.1 makes targeted CI and runtime fixes. It updates the Node module-worker import logic to correctly handle data: URLs, and it trims the GitHub Actions Node version matrix.
Breaking1.4.0
Version 1.4.0 focuses on worker runtime fixes and improved module compatibility across CJS and ESM environments. The documented items address shared worker ReferenceErrors and consistent use of file:// URLs, especially on Windows.
1.3.0
Release 1.3.0 documents two changes: support for nesting workers and added Bun support. The code diff also shows a substantial rework of the package.json export map, plus a small runtime guard change in the Node worker entrypoint. CI and dev tooling were updated as well.
Features1.2.0
Release 1.2.0 introduces support for calling self.close() from within Node-based worker contexts. The code change adds a close() implementation to the Node worker global emulation and includes a new fixture and test to verify the behavior.
Features1.1.0
Web Worker library 1.1.0 focuses on packaging and developer experience improvements, including TypeScript typing fixes and module-related type support. It also updates relative path handling guidance, encouraging use of import.meta.url for more reliable module-relative workers.
Features