@dmop/puru 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # puru — Guide for AI Assistants
2
2
 
3
- puru is a thread pool library for JavaScript with Go-style concurrency primitives (channels, WaitGroup, ErrGroup, select, context, Mutex, RWMutex, Cond, Timer). It runs functions off the main thread with no worker files and no boilerplate.
3
+ puru is a zero-dependency thread pool library for JavaScript with Go-style concurrency primitives (channels, WaitGroup, ErrGroup, select, context, Mutex, RWMutex, Cond, Timer). It runs functions off the main thread with no worker files and no boilerplate.
4
4
 
5
5
  Full API reference: https://raw.githubusercontent.com/dmop/puru/main/llms-full.txt
6
6
 
@@ -117,7 +117,7 @@ const eg = new ErrGroup()
117
117
  eg.spawn(() => fetch('https://api.example.com/users/1').then((r) => r.json()), { concurrent: true })
118
118
  eg.spawn(() => fetch('https://api.example.com/users/1/orders').then((r) => r.json()), { concurrent: true })
119
119
 
120
- const [user, orders] = await eg.wait() // throws on first error, cancels the rest
120
+ const [user, orders] = await eg.wait() // throws on first error, terminates remaining workers
121
121
  ```
122
122
 
123
123
  ### ErrGroup with concurrency limit
package/README.md CHANGED
@@ -3,9 +3,10 @@
3
3
  [![npm version](https://img.shields.io/npm/v/@dmop/puru)](https://www.npmjs.com/package/@dmop/puru)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/@dmop/puru)](https://www.npmjs.com/package/@dmop/puru)
5
5
  [![bundle size](https://img.shields.io/bundlephobia/minzip/@dmop/puru)](https://bundlephobia.com/package/@dmop/puru)
6
+ [![zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)](https://www.npmjs.com/package/@dmop/puru?activeTab=dependencies)
6
7
  [![license](https://img.shields.io/npm/l/@dmop/puru)](LICENSE)
7
8
 
8
- **Go-style concurrency for JavaScript.** Worker threads with channels, WaitGroup, select, and context — no worker files, no boilerplate.
9
+ **Go-style concurrency for JavaScript.** Worker threads with channels, WaitGroup, select, and context — zero dependencies, no worker files, no boilerplate.
9
10
 
10
11
  ```ts
11
12
  import { spawn } from '@dmop/puru'
@@ -68,8 +69,12 @@ One file. No message plumbing. Automatic pooling.
68
69
 
69
70
  ## Install
70
71
 
72
+ Zero runtime dependencies — just the library itself.
73
+
71
74
  ```bash
72
75
  npm install @dmop/puru
76
+ # or
77
+ bun add @dmop/puru
73
78
  ```
74
79
 
75
80
  ## Quick Start