chore(shared): Deprecate createPathMatcher#9094
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: b5f6aed The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
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 |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@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: |
📝 WalkthroughWalkthroughThis PR adds a changeset and JSDoc updates marking ChangesDeprecation Notice
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/shared/src/pathMatcher.ts (1)
19-31: 📐 Maintainability & Code Quality | 🔵 TrivialLoop in Docs for the generated reference text.
These exported JSDoc updates will surface in Clerk Docs, so the deprecation wording should get a quick docs pass to make sure the generated reference pages still read correctly.
Also applies to: 81-84
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/shared/src/pathMatcher.ts` around lines 19 - 31, The exported deprecation JSDoc on the path matcher types will be published into Clerk Docs, so review and adjust the wording in pathMatcher’s type declarations and related generated reference text to keep the docs readable and accurate. Update the comments around WithPathSegmentWildcard, PathPattern, and the other deprecated exports so the generated reference pages render cleanly with consistent deprecation messaging, then verify the docs output for those symbols.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/shared/src/pathMatcher.ts`:
- Around line 19-31: The exported deprecation JSDoc on the path matcher types
will be published into Clerk Docs, so review and adjust the wording in
pathMatcher’s type declarations and related generated reference text to keep the
docs readable and accurate. Update the comments around WithPathSegmentWildcard,
PathPattern, and the other deprecated exports so the generated reference pages
render cleanly with consistent deprecation messaging, then verify the docs
output for those symbols.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Repository UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 0a734fd1-7979-4df3-ba4a-5afca642ab21
📒 Files selected for processing (2)
.changeset/shared-deprecate-path-matcher.mdpackages/shared/src/pathMatcher.ts
With
createRouteMatchernow deprecated in Next.js (#8994), Astro (#8981), and Nuxt (#9092), this marks the underlyingcreatePathMatcher()and its pattern types in@clerk/sharedas@deprecatedso they can be removed in the next major.JSDoc only, no runtime warning on purpose:
@clerk/sharedresolves via^ranges under framework SDK versions already published, and those callcreatePathMatcherinside their owncreateRouteMatcher. A runtime warning would show up in apps that never import it directly, and double-warn users who already get the wrapper's warning. The malformed-URL helpers in the same module (isMalformedURLErrorand friends) stay as-is since the liveclerkMiddlewareimplementations depend on them.Summary by CodeRabbit