andywer / andywer/threads.js

Maintained fork for Node 20+ / ESM / webpack 5: threadsx

Open
#497 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.5k
Forks
173
PR merge metrics
No merged PRs in 30d

Description

First, thanks for threads.js — it's a great API and has been hugely useful.

Since the project hasn't seen active maintenance recently, I've published a maintained fork, **[threadsx](https://github.com/jmaleonard/threadsx)** (`npm install threadsx`), for anyone currently blocked. The public API is unchanged. It addresses several open issues here:

- Native ESM support (#496, #452, #434)
- TypeScript + webpack 5 / Vite worker bundling via the standard `new Worker(new URL("./worker", import.meta.url))` form — no `threads-plugin` (#387, #466, #483)
- Process not exiting after `Thread.terminate()` — fixed a worker/timer leak (#345)
- Node 20+ floor with native `worker_threads` (drops the `tiny-worker` fallback)

Docs: https://threadsx.jmaleonard.com · Changelog: v2.0.0

Happy to send fixes back upstream too if you'd ever like to pick maintenance back up. Not trying to step on the project — just want to help folks who are stuck. 🙏

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.