Skip to content
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

Release #3788

Merged
merged 1 commit into from
Oct 20, 2024
Merged

Release #3788

merged 1 commit into from
Oct 20, 2024

Conversation

rrousselGit
Copy link
Owner

@rrousselGit rrousselGit commented Oct 20, 2024

riverpod : 2.5.3 -> 2.6.0
riverpod_annotation : 2.5.3 -> 2.6.0
riverpod_generator : 2.4.4 -> 2.6.0
riverpod_lint : 2.3.14 -> 2.4.0
flutter_riverpod : 2.5.3 -> 2.6.0
hooks_riverpod : 2.5.4 -> 2.6.0

Related Issues

fixes #your-issue-number

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).

  • I have updated the CHANGELOG.md of the relevant packages.
    Changelog files must be edited under the form:

    ## Unreleased fix/major/minor
    
    - Description of your change. (thanks to @yourGithubId)
  • If this contains new features or behavior changes,
    I have updated the documentation to match those changes.

Summary by CodeRabbit

Release Notes for Version 2.6.0 (October 20, 2024)

  • New Features

    • Introduced Notifier.listenSelf as a replacement for deprecated methods.
    • Updated methods to accept auto-dispose providers for enhanced resource management.
  • Deprecations

    • Deprecated all Ref subclasses and their type arguments, encouraging direct use of Ref.
    • Deprecated Ref.state and Ref.listenSelf in favor of Notifier.
  • Bug Fixes & Improvements

    • Various improvements to provider lifecycle management and error handling across packages.
  • Version Updates

    • Incremented version numbers across multiple packages, including flutter_riverpod, hooks_riverpod, riverpod, and others.

riverpod_annotation : 2.5.3 -> 2.6.0
riverpod_generator  : 2.4.4 -> 2.6.0
riverpod_lint       : 2.3.14 -> 2.4.0
flutter_riverpod    : 2.5.3 -> 2.6.0
hooks_riverpod      : 2.5.4 -> 2.6.0
Copy link

coderabbitai bot commented Oct 20, 2024

Walkthrough

The pull request introduces version 2.6.0 updates across multiple packages in the Riverpod ecosystem, including flutter_riverpod, hooks_riverpod, riverpod, riverpod_annotation, riverpod_generator, and riverpod_lint. Key changes include the deprecation of all Ref subclasses and the type argument for Ref, with a shift towards using Notifier methods. Additionally, the version numbers for these packages have been incremented, and dependencies have been updated accordingly. The changelogs reflect these modifications, emphasizing a streamlined approach to state management.

Changes

File Change Summary
packages/flutter_riverpod/CHANGELOG.md Updated to version 2.6.0; deprecated Ref subclasses, type argument, and methods; added Notifier.listenSelf; updated Ref.watch.
packages/flutter_riverpod/pubspec.yaml Version updated from 2.5.3 to 2.6.0; riverpod dependency updated from 2.5.3 to 2.6.0.
packages/hooks_riverpod/CHANGELOG.md Updated to version 2.6.0; deprecated Ref subclasses, type argument, and methods; added Notifier.listenSelf; updated Ref.watch.
packages/hooks_riverpod/pubspec.yaml Version updated from 2.5.4 to 2.6.0; dependencies updated to 2.6.0.
packages/riverpod/CHANGELOG.md Updated to version 2.6.0; deprecated Ref subclasses, type argument, and methods; added Notifier.listenSelf; updated Ref.watch.
packages/riverpod/pubspec.yaml Version updated from 2.5.3 to 2.6.0.
packages/riverpod_annotation/CHANGELOG.md Updated to version 2.6.0; noted upgrade of riverpod dependency to 2.6.0.
packages/riverpod_annotation/pubspec.yaml Version updated from 2.5.3 to 2.6.0; riverpod dependency updated to 2.6.0.
packages/riverpod_generator/CHANGELOG.md Updated to version 2.6.0; deprecated generated Ref subclasses.
packages/riverpod_generator/pubspec.yaml Version updated from 2.4.4 to 2.6.0; dependencies updated to 2.6.0.
packages/riverpod_lint/CHANGELOG.md Updated to version 2.4.0; modified functional_ref lint to require FooRef instead of Ref.
packages/riverpod_lint/pubspec.yaml Version updated from 2.3.14 to 2.4.0; riverpod dependency updated to 2.6.0.

Possibly related PRs

  • Fix typo (#3762) #3763: This PR addresses a typo in the documentation related to the AutoDisposableAsyncNotifier, which is part of the Riverpod package.
  • Support flutter_hooks 0.21.x #3775: This PR updates the hooks_riverpod package to support flutter_hooks version 0.21.x, relevant to the provider system changes.

🐰 In a world of state and ref,
A rabbit hops, no time for rest.
With Notifiers bright, we leap and bound,
In Riverpod's flow, joy is found.
So here's to the changes, fresh and new,
A hop, skip, and jump, for me and you! 🌼✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@rrousselGit rrousselGit merged commit 1ca9fb8 into master Oct 20, 2024
26 of 27 checks passed
@rrousselGit rrousselGit deleted the release branch October 20, 2024 18:06
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (17)
packages/riverpod_generator/pubspec.yaml (1)

Line range hint 1-27: Consider reviewing other dependencies.

While the main updates look good, it might be worth reviewing the other dependencies in this file to ensure they are up-to-date and compatible with the new versions of Riverpod packages. This could help prevent potential conflicts or issues in the future.

packages/hooks_riverpod/pubspec.yaml (2)

21-21: Consider keeping version flexibility for flutter_riverpod.

The update to flutter_riverpod 2.6.0 is correct. However, consider keeping the caret (^) before the version number to allow for compatible updates:

flutter_riverpod: ^2.6.0

This allows for patch and minor updates within the 2.6.x range, which can include bug fixes and non-breaking changes.


22-22: Consider keeping version flexibility for riverpod.

The update to riverpod 2.6.0 is correct. However, as with flutter_riverpod, consider keeping the caret (^) before the version number:

riverpod: ^2.6.0

This allows for patch and minor updates within the 2.6.x range, providing flexibility for bug fixes and non-breaking changes.

packages/riverpod_annotation/CHANGELOG.md (1)

1-3: Expand the changelog entry with more details

While the entry correctly notes the upgrade of the riverpod dependency, it lacks information about potential new features, bug fixes, or breaking changes associated with this minor version update (2.5.3 to 2.6.0).

Consider adding more details to the changelog entry, such as:

  1. Any new features introduced in this version.
  2. Any bug fixes implemented.
  3. Any breaking changes, especially regarding the deprecation of Ref subclasses and the type argument for Ref as mentioned in the PR objectives.
  4. Any other significant changes that users of the package should be aware of.

This additional information will help users understand the impact of upgrading to this new version.

packages/riverpod_generator/CHANGELOG.md (1)

Line range hint 1-13: LGTM! Consider adding a deprecation notice.

The changelog entry for version 2.6.0 accurately reflects the changes mentioned in the PR objectives and AI-generated summary. The deprecation of generated Ref subclasses is clearly explained with a helpful example of the old and new usage.

To further assist users in transitioning, consider adding a deprecation notice:

 @riverpod
-Model foo(FooRef ref) => ..
+Model foo(Ref ref) => ..  // FooRef is deprecated, use Ref instead

This inline comment will help developers understand the change when they encounter it in their codebase.

packages/riverpod_lint/CHANGELOG.md (3)

Line range hint 1-11: Significant change in functional_ref lint behavior

The update to version 2.4.0 introduces a notable change in the functional_ref lint and its associated quick-fix. This change aligns with the broader deprecation of Ref subclasses across the Riverpod ecosystem.

Key points:

  1. The lint now expects FooRef instead of Ref in provider function signatures.
  2. This change affects how providers are defined and used throughout the codebase.

Consider the following actions:

  1. Update all existing providers in your codebase to use the new FooRef syntax.
  2. Review and update any documentation or team coding guidelines to reflect this change.
  3. Ensure that all team members are aware of this change to maintain consistency in new code.

Line range hint 13-232: Changelog demonstrates active maintenance and evolution

The changelog entries for previous versions show a consistent pattern of improvements and updates:

  1. Regular dependency upgrades, particularly for riverpod and analyzer.
  2. Introduction of new lints and refinement of existing ones, such as:
    • async_value_nullable_pattern (v2.3.0)
    • protected_notifier_state (v2.3.0)
    • avoid_build_context_in_providers (v2.2.0)
  3. Numerous bug fixes and performance improvements.

This pattern indicates active maintenance and evolution of the riverpod_lint package, which is crucial for keeping the linting rules up-to-date with best practices in the Riverpod ecosystem.

To leverage these improvements effectively:

  1. Regularly update your riverpod_lint dependency to benefit from the latest linting rules and bug fixes.
  2. Review the changelog for each update to understand new lints and behavior changes.
  3. Consider periodically running linter checks on your entire codebase to identify and address any new issues flagged by updated or new lints.

Line range hint 1-232: Changelog reflects robust package maintenance and evolution

The riverpod_lint changelog demonstrates a commitment to continuous improvement and adaptation to the evolving Riverpod ecosystem. Key observations:

  1. Regular updates: Frequent releases indicate active maintenance.
  2. Evolving linting rules: New lints are introduced, and existing ones are refined to catch more edge cases and promote best practices.
  3. Dependency management: Consistent updates to core dependencies like riverpod and analyzer ensure compatibility with the latest ecosystem changes.
  4. Responsive development: Bug fixes and improvements based on user feedback and real-world usage.

For package users and contributors:

  1. Stay informed: Regularly review the changelog when updating the package to understand new features and potential breaking changes.
  2. Gradual adoption: Consider phased adoption of new linting rules in large codebases to manage the impact of changes.
  3. Feedback loop: Report issues and contribute to discussions, as the changelog shows the package maintainers are responsive to user input.
  4. Documentation: Consider expanding the changelog entries with more context or examples for significant changes, especially for new linting rules or behavior modifications.
packages/riverpod/CHANGELOG.md (2)

Line range hint 1-7: LGTM! Consider updating the documentation.

The changes for version 2.6.0 look good. They simplify the API by deprecating Ref subclasses and introducing Notifier.listenSelf. This should improve the developer experience.

Consider updating the package documentation to reflect these changes, especially regarding the new usage of Notifier.listenSelf and the deprecations.


Line range hint 13-90: LGTM! Consider standardizing the changelog format.

The changelog shows a consistent pattern of improvements, bug fixes, and feature additions across versions. This indicates active maintenance and development of the package, which is excellent.

Consider standardizing the format of changelog entries across versions. For example, you could use consistent subsections like "Features", "Bug Fixes", and "Breaking Changes" for each version. This would make it easier for users to quickly understand the nature of changes in each release.

packages/flutter_riverpod/CHANGELOG.md (5)

Line range hint 1-7: Consider providing migration guides for deprecated features.

The deprecation of all Ref subclasses and the Ref type argument is a significant change that might affect many existing codebases. It would be helpful to provide more detailed migration guides or examples to help users update their code.

Would you like me to draft a brief migration guide for these deprecations?


Line range hint 8-8: Clarify the purpose and usage of the new Notifier.listenSelf method.

The addition of Notifier.listenSelf as a replacement for Ref.listenSelf is mentioned, but it would be beneficial to provide a brief explanation of its purpose and how it differs from the previous method.

Consider adding a short example or use case for Notifier.listenSelf.


Line range hint 9-9: Elaborate on the implications of Ref.watch accepting auto-dispose providers.

The change to Ref.watch and other methods to accept auto-dispose providers is significant. It would be helpful to explain the benefits of this change and any potential pitfalls or considerations when using this new functionality.

Consider adding a brief explanation of how this change impacts provider usage and lifecycle management.


Line range hint 1-1000: Consider grouping related changes and improving consistency in descriptions.

The changelog provides a good overview of changes, but its readability could be improved by:

  1. Grouping related changes together (e.g., all deprecations, all new features, etc.).
  2. Using consistent language and formatting for similar types of changes across different versions.
  3. Providing more context or examples for significant changes, especially in major version updates.

These improvements would make it easier for users to understand the evolution of the package and the impact of each update.

Would you like assistance in restructuring a section of the changelog as an example?


Line range hint 1-1000: Consider adding change categories for better organization.

While the changelog is generally well-structured, it could be improved by categorizing changes within each version. Common categories could include:

  • Breaking Changes
  • New Features
  • Deprecations
  • Bug Fixes
  • Performance Improvements

This categorization would make it easier for users to quickly identify the types of changes in each release and assess their potential impact.

Here's an example of how you could structure the 2.6.0 entry:

## 2.6.0 - 2024-10-20

### Breaking Changes
- None

### Deprecations
- Deprecated all `Ref` subclasses. Instead, use `Ref` itself.
- Deprecated `Ref`'s type argument. Use `Ref` without its generic parameter instead.
- Deprecated any `Ref` member that used `Ref`'s generic (such as `Ref.state` or `Ref.listenSelf`).
  Instead, use a `Notifier`.

### New Features
- Added `Notifier.listenSelf`, as a replacement to `Ref.listenSelf`.

### Improvements
- `Ref.watch` and other methods now accept auto-dispose providers too.
packages/hooks_riverpod/CHANGELOG.md (2)

Line range hint 1-8: LGTM! Consider adding migration guidelines.

The changes in version 2.6.0 are well-documented and seem to improve the API's usability and type safety. The deprecations and new features are clearly explained.

Consider adding a brief migration guide or linking to one for users updating from the previous version, as these changes might require significant code updates.


Line range hint 1-1024: Consider standardizing the changelog structure.

The changelog is informative and generally follows good practices. To further improve its readability and consistency:

Consider adopting a standardized structure for each version entry, using categories like "Added", "Changed", "Deprecated", and "Removed". This would make it easier for users to quickly identify the nature of each change across all versions.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9219c0f and cccabe3.

📒 Files selected for processing (12)
  • packages/flutter_riverpod/CHANGELOG.md (1 hunks)
  • packages/flutter_riverpod/pubspec.yaml (2 hunks)
  • packages/hooks_riverpod/CHANGELOG.md (1 hunks)
  • packages/hooks_riverpod/pubspec.yaml (2 hunks)
  • packages/riverpod/CHANGELOG.md (1 hunks)
  • packages/riverpod/pubspec.yaml (1 hunks)
  • packages/riverpod_annotation/CHANGELOG.md (1 hunks)
  • packages/riverpod_annotation/pubspec.yaml (2 hunks)
  • packages/riverpod_generator/CHANGELOG.md (1 hunks)
  • packages/riverpod_generator/pubspec.yaml (2 hunks)
  • packages/riverpod_lint/CHANGELOG.md (1 hunks)
  • packages/riverpod_lint/pubspec.yaml (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/riverpod/pubspec.yaml
  • packages/riverpod_annotation/pubspec.yaml
🧰 Additional context used
🔇 Additional comments (11)
packages/flutter_riverpod/pubspec.yaml (1)

5-5: LGTM! Version and dependency updated correctly.

The changes in this file are consistent with the PR objectives:

  1. The package version has been updated to 2.6.0.
  2. The riverpod dependency has been updated to match the new version.

These updates are correct and align with the overall release strategy.

Let's verify if the CHANGELOG.md has been updated for this package:

Also applies to: 21-21

✅ Verification successful

CHANGELOG.md Verified

CHANGELOG.md exists and contains an entry for version 2.6.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if CHANGELOG.md exists and contains an entry for version 2.6.0

changelog_path="packages/flutter_riverpod/CHANGELOG.md"

if [ -f "$changelog_path" ]; then
  if grep -q "## 2.6.0" "$changelog_path"; then
    echo "CHANGELOG.md exists and contains an entry for version 2.6.0"
  else
    echo "CHANGELOG.md exists but does not contain an entry for version 2.6.0"
  fi
else
  echo "CHANGELOG.md does not exist in the expected location"
fi

Length of output: 296

packages/riverpod_generator/pubspec.yaml (3)

3-3: Version update looks good.

The version bump from 2.4.4 to 2.6.0 is consistent with the PR objectives and aligns with the updates of other packages in the Riverpod ecosystem.


20-20: Verify the intention behind the riverpod_analyzer_utils dependency change.

The dependency for riverpod_analyzer_utils has been changed from ^0.5.5 to 0.5.5, removing the caret (^). This makes the dependency more strict, allowing only version 0.5.5 exactly. Was this change intentional? If so, could you provide the reasoning behind it?


21-21: Dependency updates for riverpod_annotation and riverpod look good.

The updates of riverpod_annotation and riverpod dependencies to version 2.6.0 are consistent with the PR objectives and align with the package version update. This ensures compatibility with the latest versions of the core Riverpod packages.

Also applies to: 27-27

packages/hooks_riverpod/pubspec.yaml (2)

5-5: Version update looks good.

The version bump from 2.5.4 to 2.6.0 is consistent with the PR objectives and suggests a minor release with new features or improvements.


Line range hint 1-32: Overall changes look good. Don't forget to update CHANGELOG.md.

The version updates in this file are consistent with the PR objectives. Remember to update the CHANGELOG.md file for hooks_riverpod to reflect the changes in version 2.6.0 if you haven't already done so.

To ensure the CHANGELOG.md has been updated, you can run the following command:

✅ Verification successful

CHANGELOG.md has been updated for version 2.6.0.

The CHANGELOG.md file for hooks_riverpod has been successfully updated to reflect the changes in version 2.6.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if CHANGELOG.md for hooks_riverpod has been updated
if grep -q "## 2.6.0" packages/hooks_riverpod/CHANGELOG.md; then
  echo "CHANGELOG.md has been updated for version 2.6.0"
else
  echo "CHANGELOG.md may need to be updated for version 2.6.0"
fi

Length of output: 162

packages/riverpod_lint/pubspec.yaml (3)

3-3: Version update looks good.

The version bump from 2.3.14 to 2.4.0 is consistent with the PR objectives and follows semantic versioning principles for a minor update.


21-21: Riverpod analyzer utils dependency constraint updated.

The change from ^0.5.5 to 0.5.5 for riverpod_analyzer_utils makes the version constraint more strict. This can help prevent unexpected issues from future minor updates.

To ensure this change is intentional and necessary, please verify the rationale behind this stricter version constraint. Run the following script to check the changelog of riverpod_analyzer_utils for any recent changes that might have prompted this:

#!/bin/bash
# Description: Check recent changes in riverpod_analyzer_utils

# Fetch the changelog of riverpod_analyzer_utils
echo "Fetching changelog of riverpod_analyzer_utils:"
gh repo view --json url -q .url.owner/riverpod_analyzer_utils
gh repo view --json defaultBranchRef -q .defaultBranchRef.name owner/riverpod_analyzer_utils | xargs -I {} gh api /repos/owner/riverpod_analyzer_utils/contents/CHANGELOG.md?ref={} --jq .content | base64 -d | tail -n 20

20-20: Riverpod dependency update is correct.

The update to riverpod 2.6.0 aligns with the PR objectives. The removal of the caret (^) ensures a fixed version, which can help prevent unexpected issues from future minor updates.

To ensure compatibility, please verify that all features used in riverpod_lint are compatible with riverpod 2.6.0. Run the following script to check for any potential incompatibilities:

packages/riverpod/CHANGELOG.md (2)

Line range hint 9-11: LGTM! Good attention to detail.

It's great to see that even minor documentation improvements are being made. This contributes to a better overall developer experience.


Line range hint 1-1170: Well-maintained changelog with clear version history.

The changelog is comprehensive and well-maintained, providing clear information about changes, deprecations, and new features across multiple versions. It effectively communicates the evolution of the package and helps users understand what to expect when upgrading.

Keep up the good work in maintaining this detailed changelog. It's a valuable resource for users of the Riverpod package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant