-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
refactor: data cache release data #8216
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Pull Request Overview
This PR refactors the release data provider to use Next.js 15's new 'use cache'
directive instead of React's cache()
function, enabling better caching optimization for release data across the application.
- Replaces React's
cache()
with Next.js 15's'use cache'
directive in the release data provider - Updates all components to use async/await pattern when consuming release data
- Refactors table components to separate server and client concerns
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
apps/site/next.config.mjs | Enables the useCache experimental feature in Next.js config |
apps/site/next-data/providers/releaseData.ts | Refactors provider to use 'use cache' directive instead of React's cache |
apps/site/layouts/Download.tsx | Makes layout async and passes release data as props |
apps/site/components/withDownloadSection.tsx | Updates to receive releases as props instead of fetching internally |
apps/site/components/withNodeRelease.tsx | Makes component async to await release data |
apps/site/components/withDownloadArchive.tsx | Adds await to release data call |
apps/site/components/withReleaseSelect.tsx | Temporarily disables release data usage with hardcoded empty array |
apps/site/components/Releases/PreviousReleasesTable/index.tsx | New server component that fetches release data |
apps/site/components/Releases/PreviousReleasesTable/TableBody.tsx | New client component extracted from original table |
apps/site/components/Releases/PreviousReleasesTable.tsx | Removed original component (replaced by split server/client components) |
apps/site/components/EOL/EOLReleaseTable/index.tsx | New server component that fetches release data |
apps/site/components/EOL/EOLReleaseTable/TableBody.tsx | New client component extracted from original table |
apps/site/components/EOL/EOLReleaseTable.tsx | Removed original component (replaced by split server/client components) |
apps/site/app/[locale]/download/archive/[version]/page.tsx | Adds await to release data call |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
// const releaseData = provideReleaseData(); | ||
const { push } = useRouter(); | ||
const navigation = groupReleasesByStatus(releaseData); | ||
const navigation = groupReleasesByStatus([]); // fix later |
Copilot
AI
Oct 11, 2025
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.
The hardcoded empty array and 'fix later' comment indicate incomplete implementation. This will break the release selection functionality. Consider either properly implementing the async data fetching pattern or removing this component temporarily if it's not ready.
Copilot uses AI. Check for mistakes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8216 +/- ##
==========================================
+ Coverage 76.64% 76.66% +0.01%
==========================================
Files 115 115
Lines 9623 9623
Branches 322 322
==========================================
+ Hits 7376 7377 +1
+ Misses 2246 2245 -1
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Description
Refactor release data provider to use
use cache
directive.Validation
Related Issues
Related to #8207
Check List
pnpm format
to ensure the code follows the style guide.pnpm test
to check if all tests are passing.pnpm build
to check if the website builds without errors.