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

feat(up-next): switch to nitro endpoint #412

Merged
merged 2 commits into from
Feb 8, 2025
Merged

Conversation

vladjerca
Copy link
Collaborator

@vladjerca vladjerca commented Feb 6, 2025

Up Next Performance Boost: Introducing the Nitro Endpoint

This pull request introduces a new, optimized "nitro" version of the "up next" endpoint and updates the client to utilize this enhanced functionality.

API Changes

  • Added standard and nitro endpoints to the upNext router in the API. This provides two versions of the "up next" endpoint: the standard version and the optimized "nitro" version.

Client Changes

  • Updated the upNextRequest function to use the standard endpoint and exported the mapUpNextResponse function for reusability.
  • Created a new query file, upNextQueryNitro.ts, for the nitro endpoint, including the request function and query definition.
  • Modified the UpNextList.svelte component to dynamically determine the type of endpoint to use based on a URL parameter, ensuring the appropriate query is used for fetching data.
  • Updated the useUpNextEpisodes store to accept a type parameter and use the corresponding query for either the standard or nitro endpoint, providing flexibility in data fetching.

(This change, like a skilled mechanic souping up a classic car, introduces a "nitro" version of the "up next" endpoint, significantly boosting performance and efficiency. The updated client components seamlessly integrate with the new endpoint, providing users with a faster and more responsive experience when accessing their upcoming media.)

Test: http://localhost:5173/?up-next=nitro

@vladjerca vladjerca requested a review from seferturan February 6, 2025 21:15
Copy link

deepsource-io bot commented Feb 6, 2025

Here's the code health analysis summary for commits 0b00886..8e7d6e3. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗
DeepSource Test coverage LogoTest coverage✅ SuccessView Check ↗

Code Coverage Report

MetricAggregateJavascript
Branch Coverage27% (down 0.1% from main)27% (down 0.1% from main)
Composite Coverage61.6% (down 0.1% from main)61.6% (down 0.1% from main)
Line Coverage73.5% (down 0.1% from main)73.5% (down 0.1% from main)

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@vladjerca vladjerca marked this pull request as ready for review February 7, 2025 17:47
@seferturan seferturan merged commit 10f6a5a into main Feb 8, 2025
13 checks passed
@seferturan seferturan deleted the feat/up_next_nitro branch February 8, 2025 14:19
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