Skip to content

Conversation

avivkeller
Copy link
Member

Follow-up #8216.

Enables the use cache directive on:

  • provideVulnerabilities
  • provideReleaseVersion
  • provideSupporters

@avivkeller avivkeller requested a review from a team as a code owner October 18, 2025 18:47
@Copilot Copilot AI review requested due to automatic review settings October 18, 2025 18:47
Copy link

vercel bot commented Oct 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nodejs-org Ready Ready Preview Oct 18, 2025 8:27pm

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends the use cache directive implementation to additional data providers as a follow-up to PR #8216, modernizing the caching approach for performance optimization.

  • Replaces React's cache function with Next.js use cache directive for three providers
  • Simplifies provider modules by moving cache logic to generators and importing directly
  • Updates consuming components to handle async provider functions

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/site/next.dynamic.constants.mjs Adds await to provideReleaseVersions call
apps/site/next-data/providers/vulnerabilities.ts Converts to use cache directive and direct import
apps/site/next-data/providers/supportersData.ts New file with use cache directive
apps/site/next-data/providers/supportersData.mjs Deleted file (moved to .ts)
apps/site/next-data/providers/releaseVersions.ts Converts to use cache directive and direct import
apps/site/next-data/providers/releaseData.ts Simplified to direct import
apps/site/next-data/generators/supportersData.mjs Changed export to default export
apps/site/components/withSupporters.tsx Updated to async component with await call
apps/site/components/EOL/EOLReleaseTable/index.tsx Added await to provideVulnerabilities call

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@avivkeller
Copy link
Member Author

Since these three providers are all simple, I did this in a single PR. provideBlogData (and related) are a bit more complex, and they should be done seperately

Copy link

codecov bot commented Oct 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.44%. Comparing base (843297a) to head (4d824c4).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8238   +/-   ##
=======================================
  Coverage   76.44%   76.44%           
=======================================
  Files         115      115           
  Lines        9643     9643           
  Branches      317      317           
=======================================
  Hits         7372     7372           
  Misses       2270     2270           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

SGTM!

@ovflowd
Copy link
Member

ovflowd commented Oct 18, 2025

I assume that's all usages/imports of the server data?

@avivkeller
Copy link
Member Author

I assume that's all usages/imports of the server data?

No (see #8238 (comment)). There is also the blog data and snippet data, but that's a bit different (since it's not a simple re-export), so I figured I'd break it up.

@avivkeller
Copy link
Member Author

I figured we'd group them into:

  • The first provider / setup
  • The other simple providers (this PR)
  • The slightly more complex providers (next PR)

@ovflowd
Copy link
Member

ovflowd commented Oct 18, 2025

Let's merge this now (fast-track) and go to the next ones!

@ovflowd ovflowd added this pull request to the merge queue Oct 18, 2025
@ovflowd ovflowd added the fast-track Fast Tracking PRs label Oct 18, 2025
Merged via the queue into main with commit 7015095 Oct 18, 2025
17 of 18 checks passed
@ovflowd ovflowd deleted the followup-8216 branch October 18, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track Fast Tracking PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants