Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(repo): Version packages #5047

Merged
merged 1 commit into from
Jan 31, 2025
Merged

ci(repo): Version packages #5047

merged 1 commit into from
Jan 31, 2025

Conversation

clerk-cookie
Copy link
Collaborator

@clerk-cookie clerk-cookie commented Jan 30, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@clerk/[email protected]

Minor Changes

  • Add createRouteMatcher() helper function that allows you to protect multiple pages or API routes. (#5050) by @wobsoriano

    For protecting pages (in a global route middleware):

    // createRouteMatcher is automatically imported
    const isProtectedRoute = createRouteMatcher(['/dashboard(.*)', '/forum(.*)']);
    
    export default defineNuxtRouteMiddleware(to => {
      const { userId } = useAuth();
    
      if (!userId.value && isProtectedRoute(to)) {
        // Add custom logic to run before redirecting
        return navigateTo('/sign-in');
      }
    });

    For protecting API routes:

    import { clerkMiddleware, createRouteMatcher } from '@clerk/nuxt/server';
    
    // Unlike pages, you need to import `createRouteMatcher` from `@clerk/nuxt/server`
    const isProtectedRoute = createRouteMatcher(['/api/user(.*)', '/api/projects(.*)']);
    
    export default clerkMiddleware(event => {
      const { userId } = event.context.auth;
    
      if (!userId && isProtectedRoute(event)) {
        setResponseStatus(event, 401);
        return 'You are not authorized to access this resource.';
      }
    });

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

  • Improve JSDoc comments to provide better IntelliSense in your IDE (#5053) by @LekoArts

@clerk/[email protected]

Patch Changes

@clerk/[email protected]

Patch Changes

Copy link

vercel bot commented Jan 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2025 3:31pm

@anagstef anagstef merged commit e6df88a into main Jan 31, 2025
31 checks passed
@anagstef anagstef deleted the changeset-release/main branch January 31, 2025 15:48
wobsoriano pushed a commit that referenced this pull request Feb 8, 2025
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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