Exports transports and helpers classes
Breaking
We renamed the exports drivers
to transports
.
Instead of importing from the drivers
subpath, use transports
.
-import { redis } from '@rlanz/bus/drivers/redis'
-import { memory } from '@rlanz/bus/drivers/memory'
+import { redis } from '@rlanz/bus/transports/redis'
+import { memory } from '@rlanz/bus/transports/memory'
Features
You can now use the ChaosTransport
helpers to test the resilience of your code.
import { Bus } from '@rlanz/bus'
import { ChaosTransport } from '@rlanz/bus/test_helpers'
const buggyTransport = new ChaosTransport(new MemoryTransport())
const bus = new Bus(buggyTransport)
/**
* Now, every time you will try to publish a message, the transport
* will throw an error.
*/
buggyTransport.alwaysThrow()
Commits
- refactor: re-export transport classes + rename "drivers" to "transports" (#2) (f9ab6cb)
- chore: update the readme (7c345f0)
- ci: remove windows test (1213316)
- ci: update test version (7e4d4dc)
- ci: update test version (2a3966d)
- ci: add test workflow (c09d8b9)
Full Changelog: v0.2.0...v0.3.0
New Contributors
- @Julien-R44 made their first contribution in #2