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

🚩 Upgrade to NextJS v15 #375

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

shubhamkhan
Copy link

Application NextJS Upgrade to v15

This pull request upgrades the Next.js framework from the previous version to v15.
Please review the changes, and let me know if you have any questions or feedback.

Application NextJS Upgrade to v15
Copy link

changeset-bot bot commented Oct 25, 2024

🦋 Changeset detected

Latest commit: d1292c8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
socialify Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Oct 25, 2024

👷 Deploy request for github-socialify pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d1292c8

Copy link
Owner

@wei wei left a comment

Choose a reason for hiding this comment

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

Thanks for opening the PR! Please follow the full NextJS 15 upgrade guide which includes upgrading to React 19.

Please review all the framework features and make adjustments to the app as needed.

Please recommend future improvements that can be adopted for NextJS after the initial upgrade.

@wei wei linked an issue Oct 25, 2024 that may be closed by this pull request
Upgrade to React Js v19
@shubhamkhan
Copy link
Author

Hi @wei, I have upgrade to React v19 with dependencies.

Copy link
Owner

@wei wei left a comment

Choose a reason for hiding this comment

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

hello we're still missing these two items from the last review:

  • Please review all the framework features and make adjustments to the app as needed.

  • Please recommend future improvements that can be adopted for NextJS after the initial upgrade.

Could you comment on any new features or changes nextjs and react 19 brings that we should adopt or could benefit from in the project? Thank you!

btw also missing changeset file as seen in the first comment by changeset bot.

@@ -6,7 +6,7 @@
"license": "MIT",
"repository": "https://github.com/wei/socialify.git",
"scripts": {
"dev": "next dev",
"dev": "next dev --turbopack",
Copy link
Owner

Choose a reason for hiding this comment

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

can you explain this change or link to the source?

Copy link
Author

Choose a reason for hiding this comment

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

Turbopack I have used for incremental bundler optimized for JavaScript and TypeScript in Next.js and faster local development

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks I see the blogpost at https://nextjs.org/blog/turbopack-for-development-stable is using --turbo but your change is --turbopack. Do you have documentation on the difference?

Copy link
Author

Choose a reason for hiding this comment

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

Hi @wei, the --turbo flag was initially used when Turbopack was in its experimental phase. Now, --turbopack is stable and recommended for activating Turbopack in Next.js.

Main article: Turbopack for Development -> Turbo Engine: Core Concepts -> Getting Started: Turbo Documentation

Thank you!

Copy link
Owner

Choose a reason for hiding this comment

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

@shubhamkhan could you respond to my comment above?

@@ -71,5 +71,5 @@
"last 1 firefox version",
"last 1 safari version"
]
}
}
Copy link
Owner

Choose a reason for hiding this comment

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

Please run linter before committing.

Copy link
Author

Choose a reason for hiding this comment

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

Sure, I will do.

Copy link
Owner

Choose a reason for hiding this comment

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

Hey @shubhamkhan This is not yet resolved ^

@shubhamkhan
Copy link
Author

Hi @wei,

  • Added a changeset to document the updates.
  • Ensured code consistency with linting and ran tests successfully.

@wei
Copy link
Owner

wei commented Oct 27, 2024

Hello, thanks for the update, however, we're still missing these items from the last review:

Please review all the framework features and make adjustments to the app as needed.

Please recommend future improvements that can be adopted for NextJS after the initial upgrade.

Could you comment on any new features or changes nextjs and react 19 brings that we should adopt or could benefit from in the project? Thank you!

Please click re-request review once these points have been addressed.

@shubhamkhan shubhamkhan requested a review from wei October 27, 2024 07:53
Copy link
Owner

@wei wei left a comment

Choose a reason for hiding this comment

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

Please address previous outstanding comments. Thank you!

Review and implement NextJS and React features
Review and Implement NextJS and React features
@shubhamkhan
Copy link
Author

Hi @wei, Please check Review and implement of Next.js and React features. Thanks you!

@shubhamkhan shubhamkhan requested a review from wei October 29, 2024 20:40
@wei
Copy link
Owner

wei commented Oct 30, 2024

Great! Please check outstanding comments above (I tagged you again in case you missed it)

Please list out all the changes you have implemented with source links so we can get them fully reviewed and approved.

Thank you!

if (!response || !response.repository) {
if (!response) {
return
}
Copy link
Owner

Choose a reason for hiding this comment

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

Any reason to no longer redirect when response is falsy?

className={`alert ${className} w-fit shadow-lg`}
role="alert"
aria-live="polite"
aria-atomic="true"
Copy link
Owner

Choose a reason for hiding this comment

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

What are these for? Could you link me the sources?

<>
<Repo />
</>
)
Copy link
Owner

Choose a reason for hiding this comment

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

Any reason for this change?

Copy link
Author

Choose a reason for hiding this comment

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

For maintaining coding structure

@@ -20,6 +20,7 @@ const graphQLEndpoint = async (req: NextRequest) => {
'content-type': 'application/json',
},
body: req.body,
cache: 'force-cache',
Copy link
Owner

Choose a reason for hiding this comment

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

How does cache behave with POST requests? Could you help me understand? TY!

Review change to remove code
Copy link
Author

@shubhamkhan shubhamkhan left a comment

Choose a reason for hiding this comment

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

Hi @wei, Can you review the updated code and validate, I run lint and test before commit. Thank You!

@@ -71,5 +71,5 @@
"last 1 firefox version",
"last 1 safari version"
]
}
}
Copy link
Author

Choose a reason for hiding this comment

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

Sure, I will do.

@@ -6,7 +6,7 @@
"license": "MIT",
"repository": "https://github.com/wei/socialify.git",
"scripts": {
"dev": "next dev",
"dev": "next dev --turbopack",
Copy link
Author

Choose a reason for hiding this comment

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

Hi @wei, the --turbo flag was initially used when Turbopack was in its experimental phase. Now, --turbopack is stable and recommended for activating Turbopack in Next.js.

Main article: Turbopack for Development -> Turbo Engine: Core Concepts -> Getting Started: Turbo Documentation

Thank you!

<>
<Repo />
</>
)
Copy link
Author

Choose a reason for hiding this comment

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

For maintaining coding structure

@shubhamkhan shubhamkhan requested a review from wei October 30, 2024 13:19
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.

Upgrade to Next.js 15
2 participants