raiser 3.0.0
raiser: ^3.0.0 copied to clipboard
A type-safe, async-first domain event library for Dart. Clean event bus implementation following clean architecture principles.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
3.0.0 - 2026-01-10 #
Changed #
- BREAKING:
RaiserEventis now a pureabstract interface classinstead of a base class with implementation- Note: Using
RaiserEventis completely optional -EventBusworks with ANY type - If you choose to use
RaiserEvent, you must explicitly implement all three required properties:id,occurredOn, andmetadata - No more automatic property initialization - implement the interface explicitly
- This change allows events to use composition and multiple interfaces without inheritance constraints
- Note: Using
RaiserEventnow implementsZooperDomainEventfromzooper_flutter_corepackage- Added
zooper_flutter_core: ^1.0.2as an optional dependency (only needed if you useRaiserEvent) - Ensures consistency across domain events in the Zooper ecosystem
- Added
- Event IDs in
RaiserEventnow useEventIdtype (ULID-based) instead ofString- IDs are generated via
EventId.fromUlid()for better uniqueness guarantees - Access raw string value via
event.id.valuewhen needed
- IDs are generated via
- Renamed
RaiserEvent.timestampproperty tooccurredOnfor clarity and DDD alignment - Removed
aggregateIdas a direct property fromRaiserEvent- Store aggregate identifiers in the
metadatamap instead:metadata: {'aggregateId': 'user-123'} - Access via
event.metadata['aggregateId'] as String?
- Store aggregate identifiers in the
- Removed all helper mixins and convenience extensions
- No more
StandardRaiserEventmixin - No more extension methods for
aggregateIdortimestampaccessors - Events implementing
RaiserEventmust be implemented explicitly following the interface pattern
- No more
Important Note #
EventBus is fully generic and does not require RaiserEvent! You can publish and subscribe to any type. The RaiserEvent interface is purely optional for users who want standardized domain event metadata.
2.0.1 - 2026-01-08 #
Changed #
- Migrated generator implementation away from deprecated analyzer element APIs to remove deprecation warnings.
2.0.0 - 2026-01-08 #
Changed #
- BREAKING: Renamed
DomainEventtoRaiserEventto avoid naming conflicts with other packages
1.0.0 - 2024-12-19 #
Added #
- EventBus — Central dispatcher for publishing and routing domain events
- DomainEvent — Base class with automatic ID generation, timestamps, and optional aggregate ID
- EventHandler — Type-safe interface for class-based event handlers
- Subscription — Handle for cancelling handler registrations
- Priority-based ordering — Higher priority handlers execute first
- Error handling strategies
ErrorStrategy.stop— Halt on first error (default)ErrorStrategy.continueOnError— Collect errors, throwAggregateExceptionErrorStrategy.swallow— Silent failures with optional callback
- AggregateException — Collects multiple handler errors when using
continueOnError - Comprehensive examples demonstrating basic and advanced usage patterns