Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Dart
uses: dart-lang/setup-dart@v1
Expand Down Expand Up @@ -46,5 +48,13 @@ jobs:
mkdir -p "$HOME/.config/dart"
printf '%s' "$PUB_CREDENTIALS" > "$HOME/.config/dart/pub-credentials.json"

- name: Copy root CHANGELOG into all packages
run: |
for dir in packages/*; do
if [ -d "$dir" ] && [ -f "$dir/pubspec.yaml" ]; then
cp CHANGELOG.md "$dir/CHANGELOG.md"
fi
done

- name: Publish packages
run: melos publish --no-dry-run --yes
run: melos publish --no-private --no-dry-run --yes
74 changes: 74 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Changelog

All notable changes to this workspace will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this workspace adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

This is a lockstep workspace: all packages share the same version and release notes.

## [Unreleased]

### Changed

- Updated dependencies to use latest versions:
- `zooper_flutter_core: ^2.0.0`
- `bounded: ^1.0.0`

## [3.0.0] - 2026-01-10

### Changed

- **BREAKING**: `RaiserEvent` is now a pure `abstract interface class` instead of a base class with implementation.
- **Note: Using `RaiserEvent` is completely optional - `EventBus` works with ANY type.**
- If you choose to use `RaiserEvent`, you must explicitly implement all three required properties: `id`, `occurredOn`, and `metadata`.
- No more automatic property initialization - implement the interface explicitly.
- This change allows events to use composition and multiple interfaces without inheritance constraints.
- `RaiserEvent` now implements `ZooperDomainEvent` from `zooper_flutter_core` package.
- Event IDs in `RaiserEvent` now use `EventId` type (ULID-based) instead of `String`.
- IDs are generated via `EventId.fromUlid()` for better uniqueness guarantees.
- Access raw string value via `event.id.value` when needed.
- Renamed `RaiserEvent.timestamp` property to `occurredOn` for clarity and DDD alignment.
- Removed `aggregateId` as a direct property from `RaiserEvent`.
- Store aggregate identifiers in the `metadata` map instead: `metadata: {'aggregateId': 'user-123'}`.
- Access via `event.metadata['aggregateId'] as String?`.
- Removed helper mixins and convenience extensions.
- Updated generator dependency constraints to `raiser: ^3.0.0` and `raiser_annotation: ^3.0.0`.

### 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 `DomainEvent` to `RaiserEvent` to avoid naming conflicts with other packages.
- Updated documentation references from `DomainEvent` to `RaiserEvent`.
- Updated generator dependency constraints to `raiser: ^2.0.0` and `raiser_annotation: ^2.0.0`.

## [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<T>** — 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**.
- **AggregateException** — Collects multiple handler errors when using `continueOnError`.
- **@RaiserHandler** annotation for marking event handler classes.
- **@RaiserMiddleware** annotation for marking middleware classes.
- Support for dependency injection through annotation metadata.
- **Two-phase builder system** (`raiser_collecting` → `raiser_aggregating`).
- **Automatic handler discovery** and **middleware discovery**.
- Generated registration functions (`initRaiser()`, `initRaiserWithFactories()`, and named bus variants).
- Dependency injection factory parameter generation.
- Priority support and type-safe code generation.
63 changes: 0 additions & 63 deletions packages/raiser/CHANGELOG.md

This file was deleted.

4 changes: 3 additions & 1 deletion packages/raiser/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ environment:

dependencies:

zooper_flutter_core: ^1.0.2
bounded: ^1.0.0

zooper_flutter_core: ^2.0.0

raiser:
path: ../
Expand Down
5 changes: 3 additions & 2 deletions packages/raiser/lib/src/events/raiser_event.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:bounded/bounded.dart';
import 'package:zooper_flutter_core/zooper_flutter_core.dart';

/// A raiser event is a Zooper domain event with an [EventId] identifier.
/// A raiser event is a Bounded domain event with an [EventId] identifier.
///
/// This type is intentionally an interface so applications are not forced to
/// extend a specific base class (Dart supports only single inheritance).
abstract interface class RaiserEvent implements ZooperDomainEvent {}
abstract interface class RaiserEvent implements BoundedDomainEvent<EventId> {}
4 changes: 3 additions & 1 deletion packages/raiser/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ topics:
- pub-sub

dependencies:
zooper_flutter_core: ^1.0.3
zooper_flutter_core: ^2.0.0

bounded: ^1.0.0

dev_dependencies:
lints: ^6.0.0
Expand Down
31 changes: 0 additions & 31 deletions packages/raiser_annotation/CHANGELOG.md

This file was deleted.

41 changes: 0 additions & 41 deletions packages/raiser_generator/CHANGELOG.md

This file was deleted.

4 changes: 3 additions & 1 deletion packages/raiser_generator/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ environment:

dependencies:

zooper_flutter_core: ^1.0.2
bounded: ^1.0.0

zooper_flutter_core: ^2.0.0

raiser:
path: ../../raiser
Expand Down
9 changes: 9 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ melos:
- packages/**/example

scripts:
sync_changelog:
run: |
for dir in packages/*; do
if [ -d "$dir" ] && [ -f "$dir/pubspec.yaml" ]; then
cp CHANGELOG.md "$dir/CHANGELOG.md"
fi
done
description: Copy root CHANGELOG.md into each package.

analyze:
run: dart analyze .
description: Run static analysis in all packages.
Expand Down