Skip to content

Commit

Permalink
chore: upgrade @clerk/nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekradko committed Oct 31, 2024
1 parent 2ec5d7b commit 26ddc3c
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 34 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
4 changes: 2 additions & 2 deletions middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { clerkMiddleware, createRouteMatcher } from "@clerk/nextjs/server";

const isProtectedRoute = createRouteMatcher(["/dashboard(.*)"]);

export default clerkMiddleware((auth, req) => {
if (isProtectedRoute(req)) auth().protect();
export default clerkMiddleware(async (auth, req) => {
if (isProtectedRoute(req)) await auth.protect();
});

export const config = {
Expand Down
81 changes: 50 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@clerk/nextjs": "^5.1.5",
"@clerk/nextjs": "6.0.2",
"@types/node": "^20.11.0",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
Expand Down

0 comments on commit 26ddc3c

Please sign in to comment.