Update @clerk/nextjs compatibility: unsupported → partial#803
Update @clerk/nextjs compatibility: unsupported → partial#803james-elicx merged 1 commit intocloudflare:mainfrom
Conversation
Tested against @clerk/nextjs v7.0.12 with vinext 0.0.40. Runtime-verified that clerkMiddleware, auth.protect, frontendApiProxy, ClerkProvider, and client hooks all work through vinext's middleware runtime. What works: - clerkMiddleware() — runs correctly, authenticates requests - auth.protect() — redirects unauthenticated page requests to sign-in - frontendApiProxy — proxies Clerk Frontend API through the app domain - ClerkProvider — renders with Clerk JS SDK and publishable key - x-clerk-auth-* headers — propagated correctly on responses - Clerk handshake flow — 307 redirect with correct handshake URL What's still WIP: - auth() in Server Components (requires next/headers shim) Closes cloudflare#800 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
/bigbonk review |
commit: |
There was a problem hiding this comment.
Clean change, LGTM. The status upgrade is well-justified by the runtime evidence in the PR description, and the test updates are correct.
Two minor observations (non-blocking):
-
Test fix is sound. The existing "detects unsupported libraries" test was asserting that all returned items are
unsupported. Swapping@clerk/nextjs→@auth/nextjskeeps that assertion valid since@auth/nextjsis stillunsupportedinLIBRARY_SUPPORT. Good catch. -
Detail string. The new detail text is informative and actionable — it tells users exactly what works and what's WIP. One thing to consider for a follow-up: once
auth()in Server Components is verified (the remaining gap), this should be promoted tosupportedand the detail updated accordingly.
|
Review submitted. Here's my assessment: Approved. This is a clean, well-scoped change:
The PR description provides thorough runtime evidence for the status change (tested against Clerk's live API with specific features verified). The "partial" designation is appropriate given the remaining |
Summary
@clerk/nextjsstatus inLIBRARY_SUPPORTfromunsupportedtopartial@auth/nextjsfor the unsupported-libraries assertionContext
Closes #800.
@clerk/nextjswas marked as unsupported with "deep Next.js middleware integration not compatible," but runtime testing shows this is overly conservative — Clerk's middleware works through vinext's existing shims.What was tested
Built and ran a Next.js 16 App Router app with
@clerk/nextjsv7.0.12 on vinext 0.0.40. Verified against Clerk's live API:Why it works
Clerk's `clerkMiddleware()` uses standard Next.js middleware patterns that vinext already shims:
What's still WIP (why "partial" not "supported")
`auth()` in Server Components and Route Handlers uses `next/headers`'s `headers()` and `cookies()` functions to read the auth state that middleware injected. This path hasn't been verified — it depends on vinext's `next/headers` shim correctly exposing the middleware-decorated request headers.
Test plan