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

fix: pagination #328

Merged
merged 1 commit into from
Jan 24, 2025
Merged

fix: pagination #328

merged 1 commit into from
Jan 24, 2025

Conversation

rodrigopavezi
Copy link
Member

@rodrigopavezi rodrigopavezi commented Jan 24, 2025

Problem

Previous version of the SDK had an syntax issue with hinkal. Also, there was a problem with the caching of the queries.

Changes

  • Bump version of the SDK with the syntax hinkal issue fixed
  • Fix query invalidation

Summary by CodeRabbit

  • Dependencies

    • Updated @requestnetwork/currency to version 0.26.0
    • Updated @requestnetwork/data-format to version 0.19.8
    • Updated @requestnetwork/request-client.js to version 0.57.0
    • Updated @requestnetwork/payment-detection to version 0.52.0
    • Updated @requestnetwork/payment-processor to version 0.55.0
    • Updated @requestnetwork/web3-signature to version 0.8.8
  • Package Versions

    • Incremented versions for multiple packages, including create-invoice-form, invoice-dashboard, payment-widget, and single-invoice

Copy link
Contributor

coderabbitai bot commented Jan 24, 2025

Walkthrough

This pull request involves version updates across multiple packages within the Request Network ecosystem. The changes primarily focus on incrementing dependency versions and package versions for several packages, including create-invoice-form, invoice-dashboard, payment-widget, and single-invoice. Additionally, there's a modification in the view-requests.svelte file related to decryption query invalidation logic. The updates suggest maintenance and potential minor improvements across the project's packages.

Changes

File Change Summary
package.json Updated @requestnetwork/currency dependency from 0.22.0 to 0.26.0
packages/create-invoice-form/package.json - Package version updated from 0.12.2 to 0.12.3
- @requestnetwork/data-format updated to 0.19.8
- @requestnetwork/request-client.js updated to 0.57.0
packages/invoice-dashboard/package.json - Package version updated from 0.14.0 to 0.15.0
- @requestnetwork/payment-detection updated to 0.52.0
- @requestnetwork/payment-processor updated to 0.55.0
- @requestnetwork/request-client.js updated to 0.57.0
packages/invoice-dashboard/src/lib/view-requests.svelte Added conditional checks for localStorage item "isDecryptionEnabled" in loadRequests function to conditionally invalidate queries
packages/payment-widget/package.json - Package version updated from 0.3.8 to 0.3.9
- @requestnetwork/payment-processor updated to 0.55.0
- @requestnetwork/request-client.js updated to 0.57.0
- @requestnetwork/web3-signature updated to 0.8.8
packages/single-invoice/package.json - Package version updated from 0.1.1 to 0.1.2
- @requestnetwork/payment-detection updated to 0.52.0
- @requestnetwork/payment-processor updated to 0.55.0
- @requestnetwork/request-client.js updated to 0.57.0

Possibly Related PRs

Suggested Reviewers

  • MantisClone
  • sstefdev
  • aimensahnoun

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

Copy link
Contributor

@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

🧹 Nitpick comments (2)
packages/invoice-dashboard/src/lib/view-requests.svelte (2)

499-501: Consider partial query invalidation instead of invalidating all queries
Invalidating all queries can be expensive if the app has multiple queries that don’t need to be refreshed. In most cases, you only need to invalidate and refetch a limited set of encryption-related queries.

Here’s a sample diff showing how you might invalidate only “encryptedRequests” queries:

- queryClient.invalidateQueries()
+ queryClient.invalidateQueries(['encryptedRequests'])

524-526: Optimize query invalidation on decryption disable toggle
Similar to the “enable” side, using a targeted query key is more efficient than refetching everything. Confirm if other queries are truly impacted by disabling decryption.

- queryClient.invalidateQueries()
+ queryClient.invalidateQueries(['encryptedRequests'])
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4014447 and 746bf68.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • package.json (1 hunks)
  • packages/create-invoice-form/package.json (2 hunks)
  • packages/invoice-dashboard/package.json (2 hunks)
  • packages/invoice-dashboard/src/lib/view-requests.svelte (2 hunks)
  • packages/payment-widget/package.json (2 hunks)
  • packages/single-invoice/package.json (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/invoice-dashboard/package.json
  • packages/create-invoice-form/package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (5)
package.json (1)

33-33: Verify compatibility of updated currency library
Upgrading @requestnetwork/currency to 0.26.0 looks fine, but confirm it doesn’t introduce breaking changes for your current usage.

✅ Verification successful

Currency library update is compatible
The upgrade to @requestnetwork/[email protected] is safe based on consistent usage patterns and aligned dependencies with other Request Network packages.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check references to the updated library and gather approximate usage context
rg -A 5 "@requestnetwork/currency"

Length of output: 7727


Script:

#!/bin/bash
# Check for changelog or release information
curl -s "https://registry.npmjs.org/@requestnetwork%2Fcurrency/0.26.0" | jq '.description,.time["0.26.0"]'

# Check dependencies alignment
rg "\"@requestnetwork/types\":|\"@requestnetwork/utils\":" package.json

Length of output: 228


Script:

#!/bin/bash
# Check dependencies and their versions
rg -A 3 '"dependencies": {' package-lock.json | rg "@requestnetwork"

# Check actual usage patterns of CurrencyManager
ast-grep --pattern 'new CurrencyManager($$$)'

Length of output: 948

packages/single-invoice/package.json (2)

3-3: Patch version bump for your package
No issues observed. It follows semantic versioning for a patch.


36-38: Check for breaking changes in updated dependencies
Multiple dependencies (payment-detection, payment-processor, request-client.js) have bumped versions. Ensure functionality is tested to avoid regressions.

✅ Verification successful

Minor version updates follow semantic versioning - no breaking changes expected

The version updates are all minor (0.x.0) which, according to semantic versioning, guarantee backward compatibility:

  • @requestnetwork/payment-detection: 0.52.0
  • @requestnetwork/payment-processor: 0.55.0
  • @requestnetwork/request-client.js: 0.57.0

Code analysis confirms consistent API usage patterns across the codebase with no deprecated method calls.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify new dep versions usage
rg -A 5 "@requestnetwork/payment-detection"
rg -A 5 "@requestnetwork/payment-processor"
rg -A 5 "@requestnetwork/request-client.js"

Length of output: 24721


Script:

#!/bin/bash
# Search for changelog files
fd -i changelog
fd -i release

# Check package.json files for repository URLs to find GitHub locations
rg -A 5 "repository.*:.*" package.json

Length of output: 136


Script:

#!/bin/bash
# Check root package.json
cat package.json

# Search for docs
fd -t f -e md

# Check recent commits for breaking changes
git log --oneline -n 20

Length of output: 1823


Script:

#!/bin/bash
# Check READMEs for any upgrade-related content
cat README.md
cat CONTRIBUTING.md
cat packages/*/README.md | grep -i -A 5 -B 5 "upgrad\|migrat\|breaking\|change"

Length of output: 6649

packages/payment-widget/package.json (2)

3-3: Minor version bump
Version increment from 0.3.8 to 0.3.9 appears consistent.


59-61: Validate newly updated dependencies
Check whether these updated versions introduce any breaking changes or deprecations.

✅ Verification successful

Dependencies verified - no breaking changes detected

The updated dependencies are being used consistently across multiple packages in the codebase, and there are no signs of version conflicts or breaking changes. The version updates appear to be minor bumps within the Request Network ecosystem, maintaining compatibility between the packages.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Searching references to newly updated dependencies
rg -A 5 "@requestnetwork/payment-processor"
rg -A 5 "@requestnetwork/request-client.js"
rg -A 5 "@requestnetwork/web3-signature"

Length of output: 22637


Script:

#!/bin/bash
# Fetch package details and changelogs from npm
echo "Checking @requestnetwork/[email protected]"
curl -s https://registry.npmjs.org/@requestnetwork%2Fpayment-processor/0.55.0 | jq -r '.description, .time["0.55.0"]'

echo -e "\nChecking @requestnetwork/[email protected]"
curl -s https://registry.npmjs.org/@requestnetwork%2Frequest-client.js/0.57.0 | jq -r '.description, .time["0.57.0"]'

echo -e "\nChecking @requestnetwork/[email protected]"
curl -s https://registry.npmjs.org/@requestnetwork%2Fweb3-signature/0.8.8 | jq -r '.description, .time["0.8.8"]'

# Check for README files that might contain version compatibility info
echo -e "\nChecking for version compatibility documentation"
fd -t f "README.md" | xargs rg -i "version|compatibility" -A 3

Length of output: 6250


Script:

#!/bin/bash
# Try to fetch release notes and changelogs from GitHub
echo "Checking Request Network repository for release information"
gh release view v0.55.0 -R RequestNetwork/requestNetwork 2>/dev/null || true
gh release view v0.57.0 -R RequestNetwork/requestNetwork 2>/dev/null || true

echo -e "\nSearching for CHANGELOG.md files"
fd -t f "CHANGELOG.md" | xargs cat

echo -e "\nChecking package dependencies for version constraints"
fd -t f "package.json" -x jq -r '.dependencies | select(. != null) | to_entries[] | select(.key | startswith("@requestnetwork")) | "\(.key): \(.value)"'

Length of output: 1137

@rodrigopavezi rodrigopavezi merged commit 022f883 into main Jan 24, 2025
2 checks passed
@rodrigopavezi rodrigopavezi deleted the fix/pagination branch January 24, 2025 14:12
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.

2 participants