npm / @nestjs/event-emitter
@nestjs/event-emitter
What changed in @nestjs/event-emitter 3 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
3 breaking5 new APIs and options1 behavior and defaults3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@nestjs/event-emitter 1210 changes
Breaking changes 3
Imports from build internals are no longer resolvable; import from the package root instead.
The minimum Node.js version is now 20.19.0; older runtimes cannot require the package from a CommonJS app.
Lifecycle hooks are now called by component hierarchy level, which can change execution order when providers or modules depend on one another.
New APIs and options 4
Adds a priority option to @OnEvent() for configuring event listener priority.
The package root exports the metadata key written by @OnEvent, allowing custom decorators to produce listener metadata the loader understands.
The package root now re-exports EventEmitter2; ESM consumers should import it from this package rather than eventemitter2.
This public interface is now exported from the package root instead of requiring a deep import.
Behavior and default changes 1
A plain CommonJS Nest app can continue to load the package with require() on supported Node.js runtimes.
Fixes and other changes 2
Fixed handling of request scoped listener instantiation errors.
Fixes EventEmitter2 being typed as any.
@nestjs/event-emitter 32 changes
New APIs and options 1
Durable support was added for event subscribers.
Fixes and other changes 1
Request-scoped listeners inherit the request context id.