-
Notifications
You must be signed in to change notification settings - Fork 589
Description
Description:
Our project currently runs on Next.js version 14. With the release of Next.js version 15—featuring performance improvements, enhanced routing, and updated image optimization—it's time to upgrade our starter project. Note: This migration also requires updating Auth.js/NextAuth to version 5.0.0-beta.25 or higher to ensure authentication functionality works as expected. Additionally, make sure to complete the Shiki update as detailed in Issue #71 before starting this migration.
Migration Goals:
- Upgrade Next.js: Update the project to use Next.js v15.
- Authentication Update: Upgrade Auth.js/NextAuth to version 5.0.0-beta.25 or higher.
- Pre-Requisite: Ensure Shiki has been migrated as per Issue Migrate Starter to Shiki Version 3 from Version 1 #71.
- Code Refactoring: Address breaking changes, deprecated APIs, and configuration adjustments.
- Testing & Documentation: Validate functionality across development and production environments, and update documentation accordingly.
Tasks:
-
Pre-Requisite: Shiki Migration
- Confirm that Shiki has been updated as per Issue Migrate Starter to Shiki Version 3 from Version 1 #71 . This update must be completed prior to migrating Next.js.
-
Update Next.js Dependency:
- Modify the Next.js version in
package.jsonfrom 14.x to 15.x. - Run your package manager (e.g.,
pnpm installoryarn install) to update dependencies.
- Modify the Next.js version in
-
Update Auth.js/NextAuth:
- Upgrade the Auth.js/NextAuth dependency to version 5.0.0-beta.25 or higher.
- Review and update any authentication-related code to ensure compatibility with the new version.
- Run npx @next/codemod@canary upgrade latest
- Run npm i next@latest react@latest react-dom@latest eslint-config-next@latest
- https://nextjs.org/docs/app/building-your-application/upgrading/version-15
-
Review Breaking Changes:
- Consult the Next.js 15 release notes for any breaking changes.
- Update routing, image optimization configurations, and any custom server or middleware logic as required.
-
Testing and Verification:
- Run the development server to identify any immediate issues.
- Execute the full test suite to catch regressions.
- Manually verify that both the updated Next.js features and authentication flows work correctly in development and production builds.
-
Documentation Updates:
- Revise the README and other project documentation to reflect the migration steps.
- Include notes on updating Auth.js/NextAuth and the dependency on the Shiki update (Issue Migrate Starter to Shiki Version 3 from Version 1 #71).
Additional Context:
Migrating to Next.js version 15 and upgrading Auth.js/NextAuth are essential for keeping our starter project modern and fully functional. The authentication update is necessary due to compatibility requirements with Next.js 15, and ensuring that the Shiki migration (Issue #71) is complete beforehand will help prevent potential integration issues.