From 2fc8060ed02179aad4b5c4b77743e983c128a56c Mon Sep 17 00:00:00 2001 From: Anilcan Cakir Date: Sun, 27 Sep 2026 13:50:23 +0300 Subject: [PATCH] chore(release): 0.0.1 --- CHANGELOG.md | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e6c201..6720839 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,25 +4,16 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -### Added - -- `EventBreadcrumbs.breadcrumbFor`: maps any dispatched event that implements magic's `ReportsBreadcrumb` (`breadcrumbCategory`, `breadcrumbMessage`, `breadcrumbData`) to a Sentry breadcrumb, null for every other event. `SentryServiceProvider.boot` wires it through `Event.listenAny`, gated on `Sentry.isEnabled` like the provider's other hooks, so any package or app event that opts in (`magic_deeplink`'s `DeeplinkOpened` and `DeeplinkNavigating`, for example) shows up in the breadcrumb trail with no extra wiring. (`lib/src/event_breadcrumbs.dart`) - -### Changed - -- `magic` floor moves `^0.0.21` to `^0.0.22`: `Event.listenAny` and `ReportsBreadcrumb`, which the event breadcrumbs call, first ship in magic 0.0.22. (`pubspec.yaml`) - -### Fixed +## [0.0.1] - 2026-09-27 -- `SentryServiceProvider._registerEventBreadcrumbs()` now keeps the remover callback returned by `Event.listenAny()` and calls it before registering a new listener. A second boot in the same isolate (a test suite) no longer registers the listener multiple times, which used to double-record breadcrumbs from the same event. -- The barrel (`lib/magic_sentry.dart`) no longer exports `config/sentry.dart`. The published install stub puts the same top-level names (`configureSentry`, `sentryDsn`, `sentryEnabled`, the env key constants) into a consumer app's own `lib/config/sentry.dart`; exporting a package copy alongside that made the documented `main()` an ambiguous import that never compiled. The package no longer carries its own copy of that file; `assets/stubs/install/sentry_config.stub` is now the single source. -- `SentryServiceProvider._registerNetworkInterceptor` no longer swallows a wiring failure when no `log` binding exists. It now always reports: `Log.warning` (with the stack trace) when `log` is bound, `debugPrint` otherwise. -- `SentryUserContext.install()` is now idempotent: a second call on the same instance no longer adds a second listener to `Auth.stateNotifier`, which used to run `apply()` twice per auth-state bump. +Initial release. ### Added -- Initial release: `MagicSentry.run` (zone-wrapped `SentryFlutter.init` boot, web-safe per flutter/flutter#100277) and `MagicSentry.installErrorWidgetBreadcrumb` (tags a build error that replaced the interface). -- `SentryServiceProvider`: wires `SentryNetworkInterceptor` into magic's `Http` driver (with `sentry_dio`'s own failed-request capture disabled to avoid double reporting), installs `SentryUserContext` on `Auth.stateNotifier` when a host app supplies `userId`/`userEmail`, and registers `SentryNavigatorObserver` on `MagicRouter`. +- `MagicSentry.run`: a zone-wrapped `SentryFlutter.init` boot, web-safe per flutter/flutter#100277, and `MagicSentry.installErrorWidgetBreadcrumb`, which tags a build error that replaced the interface. +- `SentryServiceProvider`: wires `SentryNetworkInterceptor` into magic's `Http` driver (with `sentry_dio`'s own failed-request capture disabled to avoid double reporting), installs `SentryUserContext` on `Auth.stateNotifier` when a host app supplies `userId`/`userEmail`, and registers `SentryNavigatorObserver` on `MagicRouter`. A failure wiring the interceptor is reported, through `Log.warning` with its stack trace when `log` is bound and `debugPrint` otherwise, never swallowed. - `SentryNetworkInterceptor`: reports a 5xx or a dead connection as an event fingerprinted by the normalised endpoint, a 4xx as a breadcrumb, and deduplicates repeats within a session. -- `SentryUserContext`: keeps Sentry's scope user (id + email) and optional extra tags in step with the host app's own `Authenticatable` model. -- `lib/config/sentry.dart` default `configureSentry`, reading `SENTRY_DSN`, `SENTRY_ENVIRONMENT`, `SENTRY_RELEASE` and `SENTRY_TRACES_SAMPLE_RATE` from `.env`; published to a consumer project via `install.yaml` as an editable starting point. +- `SentryUserContext`: keeps Sentry's scope user (id and email) and optional extra tags in step with the host app's own `Authenticatable` model. `install()` is idempotent: a second call adds no second listener. +- `EventBreadcrumbs.breadcrumbFor`: maps any dispatched event that implements magic's `ReportsBreadcrumb` (`breadcrumbCategory`, `breadcrumbMessage`, `breadcrumbData`) to a Sentry breadcrumb, and answers null for every other event. `SentryServiceProvider.boot` wires it through `Event.listenAny`, gated on `Sentry.isEnabled` like the provider's other hooks, and registers it once however many times it boots in one isolate. Any package or app event that opts in (`magic_deeplink`'s `DeeplinkOpened` and `DeeplinkNavigating`, for example) shows up in the breadcrumb trail with no extra wiring. (`lib/src/event_breadcrumbs.dart`) +- `assets/stubs/install/sentry_config.stub`, published by `install.yaml` into a consumer's `lib/config/sentry.dart` as an editable starting point: a `configureSentry` reading `SENTRY_DSN`, `SENTRY_ENVIRONMENT`, `SENTRY_RELEASE` and `SENTRY_TRACES_SAMPLE_RATE` from `.env`. The barrel does not export a package copy of those names, so the documented `main()` imports them unambiguously from the app. +- Requires `magic ^0.0.22`, the first release with `Event.listenAny` and `ReportsBreadcrumb`, and `sentry_flutter` / `sentry_dio` `^9.27.0`.