Installation
Postboy ships as two npm packages. Install the one you need — the bus itself, and (optionally, for tests) the testing toolkit.
Requirements
TypeScript 5.x is recommended (the package is plain typed TypeScript with no compiler plugins).
RxJS
^7as a peer dependency — install it yourself if it is not in the project yet.
Install the bus
The package is dual-format: ESM (lib/index.mjs) and CommonJS (lib/index.cjs) with types (lib/index.d.ts), resolvable through the exports map. Named exports only — there is no default export.
The service takes no configuration: new PostboyService() is the complete setup.
Install the testing toolkit
Peer dependencies: rxjs ^7 and @artstesh/postboy ^3.4.1. Both peers must be installed — the toolkit does not bring the bus in by itself. It works against postboy 3.4.x and 3.5.x.
Pick the right major line
The major version encodes the RxJS generation:
Line | RxJS | Example | Notes |
|---|---|---|---|
3.x |
| 3.5.2 | Current line: staged middleware, message-driven bus mutations |
1.x |
| 1.4.2 | Legacy line for RxJS 6 projects |
See Versions for the versioning policy and release notes.
What's next
Quick Start — your first message end-to-end.
Concepts — the mental model behind the bus.