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 wording.
  • Bug Fixes

    • Improved middleware location checks and user-facing messages, including proxy wording for Next.js 16+.
    • Updated auth-related guidance to reflect detected Next.js version.
  • Tests

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

    • Added a changeset entry.

✏️ Tip: You can customize this high-level summary in your review settings.

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

changeset-bot bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: 6ea99af

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.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jan 29, 2026 10:12pm

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: 6ea99af

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

Adds Next.js version detection and a new sdk-versions module exposing isNext13, isNextWithUnstableServerActions, isNext16OrHigher, and middlewareFileReference. Refactors middleware location checks and error messages to account for proxy.(ts|js) in Next.js 16+ while preserving prior middleware behavior for earlier versions. Updates auth error helpers to accept a parameterized file reference. Tests updated to detect Next.js major version and assert version-appropriate messages; new unit tests cover sdk-versions logic.

Possibly related PRs

Related changes add proxy.(ts|js) support alongside middleware.(ts|js) for Next.js 16+.

🚥 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 describes the main change: updating the Next.js middleware check to support proxy usage, which aligns with the changeset additions of proxy file detection logic.

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

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • PR-7269: Entity not found: Issue - Could not find referenced Issue.

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

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