Skip to content

Conversation

@alexcarpenter
Copy link
Member

@alexcarpenter alexcarpenter commented Jan 29, 2026

Description

Backports #7269

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:

Summary by CodeRabbit

  • New Features

    • Version-aware Next.js detection to tailor middleware guidance and messaging.
  • Bug Fixes

    • Improved middleware location checks and user-facing guidance, including "proxy" wording for Next.js 16+ and updated auth/middleware messages.
  • Tests

    • Added tests covering Next.js version detection and conditional messaging across versions.
  • Chores

    • Added a changeset entry.

Co-authored-by: Robert Soriano <sorianorobertc@gmail.com>
@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: cb99641

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
clerk-js-sandbox Skipped Skipped Feb 4, 2026 8:27pm

Request Review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 29, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7706

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7706

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7706

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7706

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7706

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7706

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7706

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7706

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7706

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7706

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7706

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7706

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7706

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7706

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7706

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7706

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7706

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7706

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7706

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7706

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7706

commit: cb99641

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

Adds a new SDK version utility that detects the installed Next.js major version and exports isNext16OrHigher and middlewareFileReference. Refactors middleware-location detection and error messaging to conditionally include proxy.(ts|js) for Next.js 16+, and threads the parameterized file reference through auth error helpers. Tests were updated to detect Next.js at runtime and assert version-specific messages; a new unit test suite validates the sdk-versions logic. A changelog/changeset file was added.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: updating the Next.js middleware check to support proxy usage, which aligns with the PR's objective of adding runtime detection for Next.js 16+ middleware/proxy file references.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Remove isNext13 and isNextWithUnstableServerActions exports that were
carried over but are no longer used after Next 13/14 support was dropped.
@alexcarpenter alexcarpenter merged commit ed150f0 into main Feb 4, 2026
41 checks passed
@alexcarpenter alexcarpenter deleted the backport/pr-7269-middleware-proxy-check branch February 4, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants