-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix weaverseData
being cached when url search queries changes
#375
Conversation
Important Review skippedReview was skipped due to path filters Files ignored due to path filters (1)
You can disable this status message by setting the WalkthroughThe recent changes across the Changes
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (10)
- packages/core/CHANGELOG.md (1 hunks)
- packages/core/package.json (1 hunks)
- packages/hydrogen/CHANGELOG.md (1 hunks)
- packages/hydrogen/package.json (2 hunks)
- packages/hydrogen/src/context.ts (1 hunks)
- packages/react/CHANGELOG.md (1 hunks)
- packages/react/package.json (2 hunks)
- packages/shopify/CHANGELOG.md (1 hunks)
- packages/shopify/package.json (2 hunks)
- templates/pilot (1 hunks)
Files skipped from review due to trivial changes (9)
- packages/core/CHANGELOG.md
- packages/core/package.json
- packages/hydrogen/CHANGELOG.md
- packages/hydrogen/package.json
- packages/react/CHANGELOG.md
- packages/react/package.json
- packages/shopify/CHANGELOG.md
- packages/shopify/package.json
- templates/pilot
Additional comments not posted (1)
packages/hydrogen/src/context.ts (1)
30-34
: Enhance caching logic with additional conditions.The updated logic in
createCachedWeaverseInstance
now checks if thepathname
andsearch
properties ofrequestInfo
have changed. This ensures that a newWeaverseHydrogen
instance is created when these properties differ, improving the accuracy of cached data retrieval based on URL changes. This change aligns with the PR objective to fix caching issues when the URL search query changes.
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.
I remember doing this before, create new weaverse
instance whenever the url changes (handle or request queries changes..). Then we update to just create 1 instance for each page data, and now looks like we're back. Don't know if any issues could occurs, lets just merged to test 😂🤟
weaverseData
being cached when url search query changes
weaverseData
being cached when url search query changesweaverseData
being cached when url search queries changes
# Conflicts: # pnpm-lock.yaml
Summary by CodeRabbit
New Features
Bug Fixes
weaverseData
, ensuring it updates correctly with URL changes.Chores
@weaverse/core
,@weaverse/hydrogen
,@weaverse/react
, and@weaverse/shopify
packages to 3.4.1 for better version management.