Files
2026-05-27 23:29:53 +01:00

27 lines
1.3 KiB
Markdown

# Tasks — events v1.1.0 port
## Core (`@suaveplan/events`)
- [x] Add `bufferSize` option to `EventBusOptions` — replay buffered events to late subscribers
- [x] Add `wildcard` option to `EventBusOptions` — pattern matching on event names
- [x] Add `iter(type, signal?)` — async iteration over events
- [x] Add `prepend(type, listener)` — prepend listener to dispatch queue
- [x] Add `listeners(type)` — return copy of exact-match listeners
- [x] Add `listenerCount(type)` — return exact-match listener count
- [x] Add `offAll(type?)` — remove all listeners for a type or everything
- [x] Fix `once()` → `off()` round-trip via WeakMap tracking
- [x] Add `concurrency` option to `EmitAsyncOptions` (`sequential` / `parallel` / `allSettled`)
- [x] Add `maxListeners` + `errorSink` to `EventBusOptions`
- [x] Add `EVENTS.LISTENER.MAX_EXCEEDED` error code
- [x] Implement `Symbol.dispose` on `EventBus` and `Unsubscribe`
- [x] Update `event-bus.md` documentation
- [x] Add tests for all new capabilities
- [x] Type-check and test downstream dependents
- [x] Update `openspec/specs/events/spec.md`
## Acceptance
- [x] 100% test coverage maintained on `@suaveplan/events`
- [x] All downstream packages that import `@suaveplan/events` compile and test green
- [x] No breaking changes to existing public API