Skip to content

Commit

Permalink
Upgrading all dependencies of sync-org-with-url (#15)
Browse files Browse the repository at this point in the history
* Upgrading everything

To satisfy dependabot

* Removing unnecessary requirements
  • Loading branch information
izaaklauer authored Oct 31, 2024
1 parent 216badf commit 2c50f66
Show file tree
Hide file tree
Showing 8 changed files with 1,140 additions and 749 deletions.
1,819 changes: 1,100 additions & 719 deletions examples/sync-org-with-url/package-lock.json

Large diffs are not rendered by default.

22 changes: 10 additions & 12 deletions examples/sync-org-with-url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,27 @@
"lint": "next lint"
},
"dependencies": {
"@clerk/backend": "^1.13.9",
"@clerk/clerk-react": "^5.11.0",
"@clerk/nextjs": "^5.7.2",
"@clerk/types": "^4.25.0",
"@clerk/nextjs": "^6.1.0",
"@clerk/types": "^4.29.0",
"@radix-ui/react-slot": "^1.1.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.417.0",
"next": "14.2.5",
"lucide-react": "^0.454.0",
"next": "15.0.2",
"react": "^18",
"react-dom": "^18",
"tailwind-merge": "^2.4.0",
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@types/node": "^20",
"@types/node": "^22",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.5",
"eslint": "^9",
"eslint-config-next": "15.0.2",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"tailwindcss": "^3.4.14",
"typescript": "^5"
},
"packageManager": "pnpm@6.32.4"
"packageManager": "pnpm@9.12.3"
}
6 changes: 2 additions & 4 deletions examples/sync-org-with-url/src/app/me/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { auth } from '@clerk/nextjs/server';
import {notFound} from "next/navigation";
import {OrganizationProfile} from "@clerk/nextjs";

export default function Home():{} {
const authObject = auth();
const orgId = authObject.orgId
export default async function Home():Promise<{}> {
const { orgId } = await auth();

if (orgId != null ) {
console.log("Some org other than the personal account is active!")
Expand Down
4 changes: 2 additions & 2 deletions examples/sync-org-with-url/src/app/me/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { auth } from '@clerk/nextjs/server';
import {notFound} from "next/navigation";

export default function Home():{} {
const authObject = auth();
export default async function Home() {
const authObject = await auth();

if (authObject.orgId != null ) {
console.log("Some org other than the personal account is active!")
Expand Down
4 changes: 2 additions & 2 deletions examples/sync-org-with-url/src/app/orgs/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { auth } from '@clerk/nextjs/server';
import {OrganizationList} from "@clerk/nextjs";

export default function Home({params}:{
export default async function Home({params}:{
params: { slug: string }
}) {
const authObject = auth();
const authObject = await auth();
const orgSlug = authObject.orgSlug

if (params.slug != orgSlug ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"use client";

import {OrganizationList, OrganizationProfile, useOrganization} from "@clerk/nextjs";
import {useParams} from "next/navigation";

export default function Home({params}:{
params: { slug: string }
}) {
export default function Home() {
const {organization, isLoaded} = useOrganization()
const params = useParams()

if (!isLoaded) {
return <>Loading...</>
Expand Down
4 changes: 2 additions & 2 deletions examples/sync-org-with-url/src/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(["(.*)"]);

export default clerkMiddleware((auth, req) => {
if (isProtectedRoute(req)) auth().protect();
export default clerkMiddleware(async (auth, req) => {
if (isProtectedRoute(req)) await auth.protect();
},
{
organizationSyncOptions: {
Expand Down
24 changes: 19 additions & 5 deletions examples/sync-org-with-url/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -18,9 +22,19 @@
}
],
"paths": {
"@/*": ["./src/*"]
}
"@/*": [
"./src/*"
]
},
"target": "ES2017"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 2c50f66

Please sign in to comment.