-
-
Notifications
You must be signed in to change notification settings - Fork 101
riverpod 3.0.0 support #425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
there were quite some issues...
Reviewer's GuideThis PR upgrades the package to Riverpod 3.0.0 by migrating the test suite to the new Notifier and ProviderContainer.test APIs, refactoring the observer and log classes to use the updated ProviderObserverContext signatures, and bumping dependency versions and imports across pubspecs and source files. Class diagram for ProviderObserverContext usage in observer methodsclassDiagram
class ProviderObserverContext {
+ ProviderBase<Object?> provider
// Other context fields (not shown)
}
class TalkerRiverpodObserver {
+ didAddProvider(ProviderObserverContext context, Object? value)
+ didUpdateProvider(ProviderObserverContext context, Object? previousValue, Object? newValue)
+ didDisposeProvider(ProviderObserverContext context)
+ providerDidFail(ProviderObserverContext context, Object error, StackTrace stackTrace)
}
TalkerRiverpodObserver --> ProviderObserverContext
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `packages/talker_riverpod_logger/lib/talker_riverpod_logger_observer.dart:35` </location>
<code_context>
+
+ if (!settings.enabled || !settings.printProviderAdded) return;
+
+ final accepted = settings.providerFilter?.call(context.provider) ?? true;
+ if (!accepted) return;
+
_talker.logCustom(
</code_context>
<issue_to_address>
Provider filter logic is duplicated across methods.
Extract the provider filter logic into a shared helper to avoid repetition and improve maintainability.
Suggested implementation:
```
bool _isProviderAccepted(ProviderBase provider) {
return settings.providerFilter?.call(provider) ?? true;
}
void didAddProvider(ProviderObserverContext context, Object? value) {
super.didAddProvider(context, value);
if (!settings.enabled || !settings.printProviderAdded) return;
if (!_isProviderAccepted(context.provider)) return;
_talker.logCustom(
RiverpodAddLog(
provider: context.provider,
value: value,
settings: settings,
),
```
You should also update other methods in this file (such as `didUpdateProvider`, `didDisposeProvider`, etc.) that use the provider filter logic to use the new `_isProviderAccepted` helper for consistency and maintainability.
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
packages/talker_riverpod_logger/lib/talker_riverpod_logger_observer.dart
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #425 +/- ##
===========================================
+ Coverage 98.63% 100.00% +1.36%
===========================================
Files 3 3
Lines 146 77 -69
===========================================
- Hits 144 77 -67
+ Misses 2 0 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
done! looks like this PR is ready to merged, whenever, unless you have something to say about it @Frezyx |
up |
Hello 👋🏼 @Frezyx sorry for pinging you, but I'd really love to see |
Looking forward for this one. |
down to `^1.15.0`
Hello @lucavenir ! Now 5.0.2 version is available for download on pub |
riverpod 3.0 is out!
this fixes #424
Summary by Sourcery
Migrate the package to Riverpod 3.0 by updating observer interfaces, provider APIs, imports, and test code, and bump dependency constraints accordingly.
New Features:
Enhancements:
Tests: