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

chore(deps): update nextjs monorepo to v15 #541

Merged
merged 6 commits into from
Oct 30, 2024
Merged

chore(deps): update nextjs monorepo to v15 #541

merged 6 commits into from
Oct 30, 2024

Conversation

duyet
Copy link
Owner

@duyet duyet commented Oct 30, 2024

Summary by Sourcery

Update the Next.js monorepo to version 15 and refactor various components across the CV and blog apps for improved data handling and performance. Enhance the insights app by adding suppressHydrationWarning to HTML elements. Remove unnecessary configuration options from the blog app.

Enhancements:

  • Refactor the responsibilities list in the CV app to use an array of objects with unique IDs for better data handling.
  • Update the blog app to use asynchronous parameter handling for improved performance and code clarity.
  • Add suppressHydrationWarning attribute to HTML elements in the insights and CV apps to prevent hydration warnings.

Chores:

  • Remove the swcMinify option from the blog app's Next.js configuration as it is no longer necessary.

Copy link
Contributor

sourcery-ai bot commented Oct 30, 2024

Reviewer's Guide by Sourcery

This PR updates the Next.js monorepo to version 15, which includes several TypeScript interface updates, component restructuring, and configuration changes. The main changes involve updating the params handling in page components to use Promise-based params and improving the type safety of various components.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Updated page components to handle Promise-based params
  • Changed params type from direct object to Promise
  • Added await for params resolution in page components
  • Updated type definitions for better type safety
apps/blog/app/category/[category]/page.tsx
apps/blog/app/tag/[tag]/page.tsx
apps/blog/app/[year]/[month]/[slug]/page.tsx
apps/blog/app/[year]/page.tsx
apps/blog/app/series/[slug]/page.tsx
Enhanced experience component structure with typed responsibilities
  • Added id property to responsibility items
  • Updated responsibility type from array of strings/nodes to array of objects with id and item properties
apps/cv/app/page.tsx
apps/cv/components/experience.tsx
Improved hydration handling and configuration
  • Added suppressHydrationWarning to html elements
  • Removed deprecated swcMinify configuration
  • Moved revalidate configuration to appropriate locations
apps/insights/app/layout.tsx
apps/cv/app/layout.tsx
apps/blog/next.config.js
apps/insights/app/blog/page.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

vercel bot commented Oct 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2024 4:59pm
cv ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2024 4:59pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2024 4:59pm

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @duyet - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

</span>,
'Enhanced ClickHouse for 300% better data compression and 2x-100x faster queries, compared with Trino + Iceberg',
'Automated operations with Airflow: data replication, data processing, healthchecks, etc.',
{
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (complexity): Consider simplifying the responsibilities array by removing unnecessary object wrappers.

The responsibilities array can be simplified by removing the {id, item} wrapper while maintaining all functionality. This reduces nesting and improves readability without losing any features:

responsibilities={[
  'Deprecated old stack (Spark, Iceberg, Trino) replaced by ClickHouse.',
  <span key="migrate-iceberg-to-clickhouse">
    Migrated 350TB+ Iceberg Data Lake to{' '}
    <HoverLinks
      text="ClickHouse on Kubernetes"
      links={[/* ... */]}
    />
    .
  </span>,
  'Enhanced ClickHouse for 300% better data compression and 2x-100x faster queries, compared with Trino + Iceberg',
  'Automated operations with Airflow: data replication, data processing, healthchecks, etc.'
]}

The ID fields aren't being used for any purpose (sorting, filtering, etc.) and React's key props already handle unique identification where needed. This change reduces code verbosity while preserving all functionality.

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.

1 participant