-
Notifications
You must be signed in to change notification settings - Fork 425
feat(upgrade): Add codemod to move ClerkProvider inside body #7596
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
base: main
Are you sure you want to change the base?
Conversation
Add jscodeshift codemod that transforms ClerkProvider from wrapping <html> to being inside <body> for Next.js 16 cache components support. This codemod handles: - Moving ClerkProvider inside body element - Preserving all ClerkProvider props - Handling layouts with multiple body children - Handling layouts with head elements
🦋 Changeset detectedLatest commit: 90ee456 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
- Add transform-clerk-provider-inside-body to core-3 codemods list - Add change document explaining the ClerkProvider positioning for Next.js 16 cache components support
📝 WalkthroughWalkthroughAdds a jscodeshift codemod 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (27)
✏️ Tip: You can disable this entire section by setting Comment |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Codemods can now specify which SDKs they apply to using the packages
property. This matches the existing pattern used for change documents.
Example:
codemods: [
'transform-all', // runs for all SDKs
{ name: 'transform-nextjs-only', packages: ['nextjs'] },
]
The ClerkProvider codemod now only runs for nextjs upgrades.
Summary
ClerkProviderfrom wrapping<html>to being inside<body>cacheComponentsis enabled,ClerkProvidermust be positioned inside<body>to avoid "Uncached data was accessed outside of<Suspense>" errorsWhat it does
Transforms layouts from:
To:
Test plan
npx @clerk/upgradeon a sample Next.js projectRelated
Summary by CodeRabbit
New Features
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.