Skip to content

chore(nuxt): Deprecate createRouteMatcher#9092

Merged
jacekradko merged 2 commits into
mainfrom
jacek/nuxt-deprecate-create-route-matcher
Jul 6, 2026
Merged

chore(nuxt): Deprecate createRouteMatcher#9092
jacekradko merged 2 commits into
mainfrom
jacek/nuxt-deprecate-create-route-matcher

Conversation

@jacekradko

@jacekradko jacekradko commented Jul 6, 2026

Copy link
Copy Markdown
Member

Description

Deprecates createRouteMatcher() in @clerk/nuxt, following the same pattern as Astro (#8981) and Next.js (#8994). Both the server and client variants get a @deprecated JSDoc notice and a one-time dev-only runtime warning via @clerk/shared/deprecated; behavior is unchanged.

The two variants point at different replacements, matching what the updated docs (clerk/clerk-docs#3426) recommend: the server matcher points to native event.path / getRequestURL(event).pathname checks inside clerkMiddleware(), and the client matcher points to Nuxt's built-in route middleware with definePageMeta().

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
    • Added deprecation notices for createRouteMatcher() with clear replacement guidance for handling API route paths in clerkMiddleware() and protecting pages via Nuxt route middleware.
  • Bug Fixes
    • Improved runtime feedback by emitting the expected deprecation warnings in both client and server usage.
  • Tests
    • Added/updated test coverage to confirm the deprecation warnings fire with the correct guidance and messaging.

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jul 6, 2026 3:44pm
swingset Ready Ready Preview, Comment Jul 6, 2026 3:44pm

Request Review

@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6f1ee33

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

This PR includes changesets to release 1 package
Name Type
@clerk/nuxt 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

@pkg-pr-new

pkg-pr-new Bot commented Jul 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9092

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9092

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9092

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9092

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 6f1ee33

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-06T15:45:15.049Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 6f1ee33.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: e7739b9c-c984-4eb9-bbad-75277d1c574a

📥 Commits

Reviewing files that changed from the base of the PR and between 12decde and 6f1ee33.

📒 Files selected for processing (1)
  • .changeset/nuxt-deprecate-route-matcher.md

📝 Walkthrough

Walkthrough

This PR deprecates createRouteMatcher() in @clerk/nuxt client and server runtime code, adds runtime warnings and tests for both paths, and documents the migration guidance in a changeset.

Changes

Deprecate createRouteMatcher

Layer / File(s) Summary
Client routeMatcher deprecation
packages/nuxt/src/runtime/client/routeMatcher.ts, packages/nuxt/src/runtime/client/__tests__/routeMatcher.test.ts
createRouteMatcher in the client runtime now imports and calls deprecated(...), updates its JSDoc, and a new test asserts the warning message.
Server routeMatcher deprecation
packages/nuxt/src/runtime/server/routeMatcher.ts, packages/nuxt/src/runtime/server/__tests__/routeMatcher.test.ts
createRouteMatcher in the server runtime now imports and calls deprecated(...), updates its JSDoc, and a new test mocks getRequestURL and asserts the warning message.
Changeset documentation
.changeset/nuxt-deprecate-route-matcher.md
A patch changeset documents the deprecation and shows replacement guidance for API routes and pages.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: alexcarpenter

Poem

A little rabbit hopped by the lane,
and softly warned of route-matching fame. 🐇
“Use middleware now,”
the helpers show how,
then off to the burrow I came.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: deprecating createRouteMatcher in Nuxt.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@wobsoriano wobsoriano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks, this looks good!

@jacekradko jacekradko merged commit caf5860 into main Jul 6, 2026
53 checks passed
@jacekradko jacekradko deleted the jacek/nuxt-deprecate-create-route-matcher branch July 6, 2026 16:04
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.

2 participants