Postboy Help

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 ^7 as a peer dependency — install it yourself if it is not in the project yet.

Install the bus

npm install @artstesh/postboy rxjs

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.

import { PostboyService, PostboyGenericMessage } from '@artstesh/postboy';

The service takes no configuration: new PostboyService() is the complete setup.

Install the testing toolkit

npm install -D @artstesh/postboy-testing

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

^7

3.5.2

Current line: staged middleware, message-driven bus mutations

1.x

^6

1.4.2

Legacy line for RxJS 6 projects

See Versions for the versioning policy and release notes.

What's next

07 September 2026