Skip to content

Conversation

@cybervoid0
Copy link
Owner

Upgrade to Next.js 15.4 and React 19

What

This PR upgrades the application from Next.js 14 to Next.js 15.4 with React 19, implementing all necessary breaking changes and modernizing the codebase.

Key Changes:

  • Framework Upgrade: Next.js 14.2.31 → 15.4.6
  • React Upgrade: React 18.3.1 → 19.1.1
  • Turbopack Integration: Migrated from Webpack to stable Turbopack
  • API Route Updates: Fixed async params handling in dynamic routes
  • Middleware Modernization: Updated next-auth middleware to withAuth
  • Accessibility Improvements: Enhanced Dialog components with automatic title generation
  • TypeScript Updates: Added missing type definitions and replaced deprecated ElementRef

Files Modified:

  • API Routes: Updated async parameter handling in [slug] and [...category] routes
  • Middleware: Migrated from deprecated authMiddleware to withAuth
  • UI Components: Enhanced Dialog accessibility and fixed React 19 deprecations
  • Configuration: Updated Next.js config for Turbopack support
  • Dependencies: Added missing TypeScript definitions

Why

Performance & Developer Experience:

  • Next.js 15 provides significant performance improvements with Turbopack
  • React 19 offers better concurrent features and improved DevTools
  • Turbopack delivers faster hot reloads and build times

Compatibility & Security:

  • Ensures compatibility with latest ecosystem packages
  • Addresses security vulnerabilities in older dependencies
  • Prevents future breaking changes by staying current

Accessibility & Standards:

  • Improved accessibility compliance with automatic Dialog titles
  • Better TypeScript support with React 19 type definitions
  • Modern middleware patterns for authentication

Future-Proofing:

  • Positions codebase for upcoming React and Next.js features
  • Eliminates deprecated APIs before they're removed
  • Maintains deployment compatibility across environments

Deployment Impact:

Production Tested: All changes verified on production environment
Backward Compatible: No breaking changes for end users
Performance Neutral: No regression in build or runtime performance

- Updated various dependencies in package.json and bun.lock to their latest versions for better compatibility and performance.
- Refactored middleware to use `withAuth` for enhanced route protection and added custom authorization logic.
- Adjusted Next.js configuration to enable React strict mode and added turbopack support for improved development experience.
- Updated TypeScript definitions and API route handling to utilize promises for better async handling.
- Enhanced image loader to trim source paths for cleaner URLs.
@cybervoid0 cybervoid0 merged commit b438b08 into master Aug 11, 2025
1 check failed
@cybervoid0 cybervoid0 deleted the nextjs-update branch September 14, 2025 05:26
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