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: Not actively maintained as of 2026-08-13. The last upstream push was 2025-01-31, and the most recent published update shown is 1.5.0 on 2025-01-31, so there is a gap of over a year with no newer updates.
- Update cadence: Updates were comparatively clustered around 2025-01-31 (1.5.0, 1.4.1, 1.4.0 same day), but earlier activity shows much larger gaps (notably between 2021, 2024, and 2025), suggesting an intermittent cadence rather than regular releases.
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