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(nextjs): Warn for deprecated nextjs versions #4657

Merged
merged 5 commits into from
Nov 27, 2024

Conversation

panteliselef
Copy link
Member

@panteliselef panteliselef commented Nov 26, 2024

Description

We have found a few issues in the Next.js from version 13.5 to 14.0.4. We should advices our customers to upgrade. Also warn them about those versions becoming deprecated in the future.

how it looks on terminal

Screenshot 2024-11-27 at 5 44 45 PM

how it looks on chrome

image

how it looks on safari

image

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Copy link

vercel bot commented Nov 26, 2024

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ⬜️ Skipped (Inspect) Nov 27, 2024 3:46pm

Copy link

changeset-bot bot commented Nov 26, 2024

🦋 Changeset detected

Latest commit: 431c808

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

This PR includes changesets to release 1 package
Name Type
@clerk/nextjs Patch

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

@@ -24,6 +26,12 @@ declare global {
}

export const ClientClerkProvider = (props: NextClerkProviderProps) => {
if (nextPackage.version.startsWith('13.') || nextPackage.version.startsWith('14.0')) {
logger.warnOnce(
`\n\x1b[43m----------\n[Clerk]: Your current nextjs version (${nextPackage.version}) will be deprecated in the next major release of "@clerk/nextjs". Please upgrade to >= next@14.2 .\n----------\x1b[0m\n`,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`\n\x1b[43m----------\n[Clerk]: Your current nextjs version (${nextPackage.version}) will be deprecated in the next major release of "@clerk/nextjs". Please upgrade to >= next@14.2 .\n----------\x1b[0m\n`,
`\n\x1b[43m----------\n[Clerk]: Your current Next.js version (${nextPackage.version}) will be deprecated in the next major release of "@clerk/nextjs". Please upgrade to next@14.2.0 or later.\n----------\x1b[0m\n`,

packages/nextjs/src/app-router/client/ClerkProvider.tsx Outdated Show resolved Hide resolved
Co-authored-by: Stefanos Anagnostou <anagstef@users.noreply.github.com>
@panteliselef panteliselef merged commit a18d45e into main Nov 27, 2024
27 checks passed
@panteliselef panteliselef deleted the elef/deprecate-sdk-versions branch November 27, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants