You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- ALWAYS write code that is easy to refactor and reason about.
8
+
- NEVER assume context or generate code that I did not explicitly request.
9
+
- ALWAYS name files after the primary class or functionality they contain.
10
+
11
+
# Documentation
12
+
- WHEN a CHANGELOG.md file is present in the project root, ALWAYS add a changelog entry for any non-trivial change.Minimal flat vector icon. Multiple small dots flowing left-to-right into one larger dot in a single line. Clean geometric style, blue palette, no text, transparent background.
13
+
14
+
- ALWAYS place a `///` library-level documentation block (before imports) ONLY on:
15
+
- lib/<package>.dart (the main public entrypoint)
16
+
- a small number of intentionally exposed public sub-libraries
17
+
- NEVER add library file-docs on internal files inside `src/`
18
+
- ALWAYS keep package-surface documentation concise, stable, and user-facing
19
+
- ALWAYS write Dart-doc (`///`) for:
20
+
- every class
21
+
- every constructor
22
+
- every public and private method
23
+
- every important field/property
24
+
- ALWAYS add inline comments INSIDE methods explaining **why** something is done (preferred) or **what** it does if unclear.
Copy file name to clipboardExpand all lines: packages/raiser/CHANGELOG.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## Unreleased
9
+
10
+
### Changed
11
+
12
+
-**BREAKING**: `RaiserEvent` is now a pure `abstract interface class` instead of a base class with implementation
13
+
-**Note: Using `RaiserEvent` is completely optional - `EventBus` works with ANY type**
14
+
- If you choose to use `RaiserEvent`, you must explicitly implement all three required properties: `id`, `occurredOn`, and `metadata`
15
+
- No more automatic property initialization - implement the interface explicitly
16
+
- This change allows events to use composition and multiple interfaces without inheritance constraints
17
+
-`RaiserEvent` now implements `ZooperDomainEvent` from `zooper_flutter_core` package
18
+
- Added `zooper_flutter_core: ^1.0.2` as an optional dependency (only needed if you use `RaiserEvent`)
19
+
- Ensures consistency across domain events in the Zooper ecosystem
20
+
- Event IDs in `RaiserEvent` now use `EventId` type (ULID-based) instead of `String`
21
+
- IDs are generated via `EventId.fromUlid()` for better uniqueness guarantees
22
+
- Access raw string value via `event.id.value` when needed
23
+
- Renamed `RaiserEvent.timestamp` property to `occurredOn` for clarity and DDD alignment
24
+
- Removed `aggregateId` as a direct property from `RaiserEvent`
25
+
- Store aggregate identifiers in the `metadata` map instead: `metadata: {'aggregateId': 'user-123'}`
26
+
- Access via `event.metadata['aggregateId'] as String?`
27
+
- Removed all helper mixins and convenience extensions
28
+
- No more `StandardRaiserEvent` mixin
29
+
- No more extension methods for `aggregateId` or `timestamp` accessors
30
+
- Events implementing `RaiserEvent` must be implemented explicitly following the interface pattern
31
+
32
+
### Important Note
33
+
34
+
**`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.
**You don't have to use `RaiserEvent`!** The `EventBus` is fully generic and works with any type.
61
+
62
+
However, if you want standardized domain event metadata, you can optionally implement `RaiserEvent`, which is an interface extending `ZooperDomainEvent` from [zooper_flutter_core](https://pub.dev/packages/zooper_flutter_core). This provides:
61
63
62
-
All events extend `RaiserEvent`, which provides automatic metadata:
|`aggregateId`| Optional link to a domain aggregate |
70
+
`RaiserEvent` is intentionally an **interface** (not a base class) to avoid forcing single inheritance. If you choose to use it, implement it explicitly:
0 commit comments