From cad729670fb10082977a7f608c3aea400d18ad70 Mon Sep 17 00:00:00 2001 From: giancarlo Date: Tue, 16 Apr 2024 20:56:18 +0800 Subject: [PATCH] Update dependencies and import dynamic method This commit updates multiple dependencies in the pnpm-lock.yaml file and imports the dynamic method from 'next/dynamic' in the site-header-account-section.tsx file. These updates are part of routine maintenance and improvement of the codebase. The import allows for dynamic imports, which can enhance performance. --- .../[account]/_components/dashboard-demo.tsx | 64 +- .../site-header-account-section.tsx | 9 +- apps/web/app/layout.tsx | 7 +- apps/web/components/root-providers.tsx | 1 + apps/web/next.config.mjs | 3 + apps/web/package.json | 14 +- package.json | 4 +- packages/billing/core/package.json | 2 +- packages/billing/gateway/package.json | 2 +- packages/billing/stripe/package.json | 2 +- .../billing/stripe/src/services/stripe-sdk.ts | 2 +- packages/database-webhooks/package.json | 2 +- packages/email-templates/package.json | 2 +- packages/features/accounts/package.json | 4 +- .../src/components/account-selector.tsx | 2 +- packages/features/admin/package.json | 6 +- packages/features/auth/package.json | 4 +- packages/features/team-accounts/package.json | 4 +- packages/i18n/package.json | 2 +- packages/i18n/src/i18n.client.ts | 13 + packages/supabase/package.json | 2 +- packages/ui/package.json | 6 +- packages/ui/src/makerkit/page.tsx | 4 +- packages/ui/src/makerkit/sidebar.tsx | 4 +- pnpm-lock.yaml | 2537 ++++++----------- tooling/tailwind/package.json | 4 +- 26 files changed, 918 insertions(+), 1788 deletions(-) diff --git a/apps/web/app/(dashboard)/home/[account]/_components/dashboard-demo.tsx b/apps/web/app/(dashboard)/home/[account]/_components/dashboard-demo.tsx index ee313abf9..4afbc2aba 100644 --- a/apps/web/app/(dashboard)/home/[account]/_components/dashboard-demo.tsx +++ b/apps/web/app/(dashboard)/home/[account]/_components/dashboard-demo.tsx @@ -37,13 +37,15 @@ export default function DashboardDemo() { > - Monthly Recurring Revenue + + Monthly Recurring Revenue + 20% +
{`$${mrr[1]}`}
- 20%
@@ -52,13 +54,15 @@ export default function DashboardDemo() { - Revenue + + Revenue + 12% + -
+
{`$${netRevenue[1]}`}
- 12%
@@ -67,13 +71,15 @@ export default function DashboardDemo() { - Fees + + Fees + 9% +
{`$${fees[1]}`}
- 9%
@@ -82,13 +88,15 @@ export default function DashboardDemo() { - New Customers + + New Customers + -25% +
{`${newCustomers[1]}`}
- -25%
@@ -97,13 +105,15 @@ export default function DashboardDemo() { - Visitors + + Visitors + -4.3% +
{visitors[1]}
- -4.3%
@@ -112,13 +122,15 @@ export default function DashboardDemo() { - Returning Visitors + + Returning Visitors + 10% +
{returningVisitors[1]}
- 10%
@@ -127,13 +139,15 @@ export default function DashboardDemo() { - Churn + + Churn + -10% +
{churn[1]}%
- -10%
@@ -142,13 +156,15 @@ export default function DashboardDemo() { - Support Tickets + + Support Tickets + -30% +
{tickets[1]}
- -30%
@@ -159,13 +175,15 @@ export default function DashboardDemo() {
- Active Users + + Active Users + 10% +
{activeUsers[1]}
- 10%
@@ -217,7 +235,7 @@ function Chart( return (
@@ -333,7 +351,11 @@ function BadgeWithTrend(props: React.PropsWithChildren<{ trend: string }>) { } function Figure(props: React.PropsWithChildren) { - return
{props.children}
; + return ( +
+ {props.children} +
+ ); } function Trend( diff --git a/apps/web/app/(marketing)/_components/site-header-account-section.tsx b/apps/web/app/(marketing)/_components/site-header-account-section.tsx index e986cb47a..4cb3e23bb 100644 --- a/apps/web/app/(marketing)/_components/site-header-account-section.tsx +++ b/apps/web/app/(marketing)/_components/site-header-account-section.tsx @@ -1,5 +1,6 @@ 'use client'; +import dynamic from 'next/dynamic'; import Link from 'next/link'; import type { User } from '@supabase/supabase-js'; @@ -10,12 +11,18 @@ import { PersonalAccountDropdown } from '@kit/accounts/personal-account-dropdown import { useSignOut } from '@kit/supabase/hooks/use-sign-out'; import { useUser } from '@kit/supabase/hooks/use-user'; import { Button } from '@kit/ui/button'; -import { ModeToggle } from '@kit/ui/mode-toggle'; import { Trans } from '@kit/ui/trans'; import featuresFlagConfig from '~/config/feature-flags.config'; import pathsConfig from '~/config/paths.config'; +const ModeToggle = dynamic( + () => import('@kit/ui/mode-toggle').then((mod) => mod.ModeToggle), + { + ssr: false, + }, +); + const paths = { home: pathsConfig.app.home, }; diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index a967963bd..2cd75f400 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -1,4 +1,5 @@ import { Urbanist as HeadingFont, Inter as SansFont } from 'next/font/google'; +import Head from 'next/head'; import { cookies, headers } from 'next/headers'; import { Toaster } from '@kit/ui/sonner'; @@ -36,7 +37,9 @@ export default async function RootLayout({ return ( - + + + @@ -51,7 +54,7 @@ export default async function RootLayout({ function getClassName(theme?: string) { const dark = theme === 'dark'; - const light = theme === 'light'; + const light = !dark; return cn( 'min-h-screen bg-background antialiased', diff --git a/apps/web/components/root-providers.tsx b/apps/web/components/root-providers.tsx index 462627d77..60bb5e159 100644 --- a/apps/web/components/root-providers.tsx +++ b/apps/web/components/root-providers.tsx @@ -57,6 +57,7 @@ export function RootProviders({ enableSystem disableTransitionOnChange defaultTheme={theme} + enableColorScheme={false} > {children} diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index bfd5b58de..4968f6957 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -52,6 +52,9 @@ const config = { transform: 'lodash/{{member}}', }, }, + env: { + NEXT_PUBLIC_BUILD_ID: process.env.GIT_HASH ?? performance.now().toString(), + }, /** We already do linting and typechecking as separate tasks in CI */ eslint: { ignoreDuringBuilds: true }, typescript: { ignoreBuildErrors: true }, diff --git a/apps/web/package.json b/apps/web/package.json index deb04ce59..12a21e9ff 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -48,18 +48,18 @@ "@kit/team-accounts": "workspace:^", "@kit/ui": "workspace:^", "@makerkit/data-loader-supabase-core": "^0.0.7", - "@makerkit/data-loader-supabase-nextjs": "beta", + "@makerkit/data-loader-supabase-nextjs": "^1.1.0", "@marsidev/react-turnstile": "^0.5.4", "@radix-ui/react-icons": "^1.3.0", "@supabase/supabase-js": "^2.42.4", - "@tanstack/react-query": "5.29.0", + "@tanstack/react-query": "5.29.2", "@tanstack/react-query-next-experimental": "^5.29.2", "@tanstack/react-table": "^8.16.0", "date-fns": "^3.6.0", - "edge-csrf": "^1.0.11", + "edge-csrf": "1.0.12-sveltekit-1", "i18next": "^23.11.2", "i18next-resources-to-backend": "^1.2.1", - "lucide-react": "^0.367.0", + "lucide-react": "^0.368.0", "next": "14.2.1", "next-sitemap": "^4.2.3", "next-themes": "0.3.0", @@ -76,7 +76,7 @@ "@kit/prettier-config": "workspace:^", "@kit/tailwind-config": "workspace:^", "@kit/tsconfig": "workspace:^", - "@next/bundle-analyzer": "14.2.0", + "@next/bundle-analyzer": "14.2.1", "@types/mdx": "^2.0.13", "@types/node": "^20.12.7", "@types/react": "^18.2.79", @@ -85,8 +85,8 @@ "dotenv-cli": "^7.4.1", "eslint": "^8.57.0", "prettier": "^3.2.5", - "supabase": "^1.157.2", - "tailwindcss": "3.4.1", + "supabase": "^1.159.1", + "tailwindcss": "3.4.3", "typescript": "^5.4.5" }, "eslintConfig": { diff --git a/package.json b/package.json index 3522ded51..fe99ac991 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,9 @@ }, "pnpm": { "overrides": { - "next": "14.2.1" + "next": "14.2.1", + "react": "18.2.0", + "react-dom": "18.2.0" } } } diff --git a/packages/billing/core/package.json b/packages/billing/core/package.json index 433cb9eea..98cbad00c 100644 --- a/packages/billing/core/package.json +++ b/packages/billing/core/package.json @@ -28,7 +28,7 @@ "@kit/tailwind-config": "workspace:*", "@kit/tsconfig": "workspace:*", "@kit/ui": "workspace:*", - "lucide-react": "^0.367.0", + "lucide-react": "^0.368.0", "zod": "^3.22.4" }, "eslintConfig": { diff --git a/packages/billing/gateway/package.json b/packages/billing/gateway/package.json index 58313bfae..1d6265d79 100644 --- a/packages/billing/gateway/package.json +++ b/packages/billing/gateway/package.json @@ -45,7 +45,7 @@ "@supabase/supabase-js": "^2.42.4", "@types/react": "^18.2.79", "date-fns": "^3.6.0", - "lucide-react": "^0.367.0", + "lucide-react": "^0.368.0", "next": "14.2.1", "react": "18.2.0", "react-hook-form": "^7.51.3", diff --git a/packages/billing/stripe/package.json b/packages/billing/stripe/package.json index 56efe4ea9..93d4a1f84 100644 --- a/packages/billing/stripe/package.json +++ b/packages/billing/stripe/package.json @@ -26,7 +26,7 @@ "dependencies": { "@stripe/react-stripe-js": "^2.7.0", "@stripe/stripe-js": "^3.3.0", - "stripe": "^14.25.0" + "stripe": "^15.1.0" }, "devDependencies": { "@kit/billing": "workspace:^", diff --git a/packages/billing/stripe/src/services/stripe-sdk.ts b/packages/billing/stripe/src/services/stripe-sdk.ts index cd15ae250..9c0b88fc0 100644 --- a/packages/billing/stripe/src/services/stripe-sdk.ts +++ b/packages/billing/stripe/src/services/stripe-sdk.ts @@ -2,7 +2,7 @@ import 'server-only'; import { StripeServerEnvSchema } from '../schema/stripe-server-env.schema'; -const STRIPE_API_VERSION = '2023-10-16'; +const STRIPE_API_VERSION = '2024-04-10'; /** * @description returns a Stripe instance diff --git a/packages/database-webhooks/package.json b/packages/database-webhooks/package.json index e2fab52b7..8fa0f712c 100644 --- a/packages/database-webhooks/package.json +++ b/packages/database-webhooks/package.json @@ -31,7 +31,7 @@ "@kit/tsconfig": "workspace:*", "@kit/ui": "workspace:^", "@supabase/supabase-js": "^2.42.4", - "lucide-react": "^0.367.0", + "lucide-react": "^0.368.0", "zod": "^3.22.4" }, "eslintConfig": { diff --git a/packages/email-templates/package.json b/packages/email-templates/package.json index b2f8d195d..bf4fe50f2 100644 --- a/packages/email-templates/package.json +++ b/packages/email-templates/package.json @@ -13,7 +13,7 @@ ".": "./src/index.ts" }, "dependencies": { - "@react-email/components": "0.0.15" + "@react-email/components": "0.0.16" }, "devDependencies": { "@kit/eslint-config": "workspace:*", diff --git a/packages/features/accounts/package.json b/packages/features/accounts/package.json index 11d6f53a6..5d8ff04f2 100644 --- a/packages/features/accounts/package.json +++ b/packages/features/accounts/package.json @@ -32,10 +32,10 @@ "@kit/ui": "workspace:^", "@radix-ui/react-icons": "^1.3.0", "@supabase/supabase-js": "^2.42.4", - "@tanstack/react-query": "5.29.0", + "@tanstack/react-query": "5.29.2", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", - "lucide-react": "^0.367.0", + "lucide-react": "^0.368.0", "next": "14.2.1", "next-themes": "0.3.0", "react": "18.2.0", diff --git a/packages/features/accounts/src/components/account-selector.tsx b/packages/features/accounts/src/components/account-selector.tsx index 2e6b764e0..3954850ae 100644 --- a/packages/features/accounts/src/components/account-selector.tsx +++ b/packages/features/accounts/src/components/account-selector.tsx @@ -98,7 +98,7 @@ export function AccountSelector({ variant="ghost" role="combobox" aria-expanded={open} - className={cn('group w-full shadow', { + className={cn('dark:shadow-primary/10 group w-full border px-4', { 'justify-between': !collapsed, 'justify-center': collapsed, })} diff --git a/packages/features/admin/package.json b/packages/features/admin/package.json index 38a733b0e..00917acfe 100644 --- a/packages/features/admin/package.json +++ b/packages/features/admin/package.json @@ -34,12 +34,12 @@ "@kit/tsconfig": "workspace:*", "@kit/ui": "workspace:^", "@makerkit/data-loader-supabase-core": "^0.0.7", - "@makerkit/data-loader-supabase-nextjs": "^1.0.0", + "@makerkit/data-loader-supabase-nextjs": "^1.1.0", "@supabase/supabase-js": "^2.42.4", - "@tanstack/react-query": "5.29.0", + "@tanstack/react-query": "5.29.2", "@tanstack/react-table": "^8.16.0", "@types/react": "^18.2.79", - "lucide-react": "^0.367.0", + "lucide-react": "^0.368.0", "next": "14.2.1", "react": "18.2.0", "react-hook-form": "^7.51.3", diff --git a/packages/features/auth/package.json b/packages/features/auth/package.json index 24baaf371..c292e6bdb 100644 --- a/packages/features/auth/package.json +++ b/packages/features/auth/package.json @@ -29,9 +29,9 @@ "@marsidev/react-turnstile": "^0.5.4", "@radix-ui/react-icons": "^1.3.0", "@supabase/supabase-js": "^2.42.4", - "@tanstack/react-query": "5.29.0", + "@tanstack/react-query": "5.29.2", "@types/react": "^18.2.79", - "lucide-react": "^0.367.0", + "lucide-react": "^0.368.0", "next": "14.2.1", "react-hook-form": "^7.51.3", "react-i18next": "^14.1.0", diff --git a/packages/features/team-accounts/package.json b/packages/features/team-accounts/package.json index eecca797f..92509f76b 100644 --- a/packages/features/team-accounts/package.json +++ b/packages/features/team-accounts/package.json @@ -30,13 +30,13 @@ "@kit/tsconfig": "workspace:*", "@kit/ui": "workspace:^", "@supabase/supabase-js": "^2.42.4", - "@tanstack/react-query": "5.29.0", + "@tanstack/react-query": "5.29.2", "@tanstack/react-table": "^8.16.0", "@types/react": "^18.2.79", "@types/react-dom": "^18.2.25", "class-variance-authority": "^0.7.0", "date-fns": "^3.6.0", - "lucide-react": "^0.367.0", + "lucide-react": "^0.368.0", "next": "14.2.1", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/packages/i18n/package.json b/packages/i18n/package.json index f731a2fae..a101b3156 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -21,7 +21,7 @@ "@kit/tailwind-config": "workspace:*", "@kit/tsconfig": "workspace:*", "i18next": "^23.11.2", - "i18next-browser-languagedetector": "7.2.0", + "i18next-browser-languagedetector": "7.2.1", "i18next-resources-to-backend": "^1.2.1", "react-i18next": "^14.1.0" }, diff --git a/packages/i18n/src/i18n.client.ts b/packages/i18n/src/i18n.client.ts index 98d00c8f6..e436407e6 100644 --- a/packages/i18n/src/i18n.client.ts +++ b/packages/i18n/src/i18n.client.ts @@ -47,6 +47,19 @@ export function initializeI18nClient( return reject(err); } + console.log('i18n client initialized'); + console.log( + `initialized with ${i18next.languages.join(', ')} languages`, + clientInstance, + ); + + console.log( + 'resource', + i18next.getResource('en', 'billing', 'billingInterval.month'), + ); + + console.log(i18next.t('billing:billingInterval.month')); + clientInstance = i18next; resolve(clientInstance); diff --git a/packages/supabase/package.json b/packages/supabase/package.json index ea400e538..38db653e0 100644 --- a/packages/supabase/package.json +++ b/packages/supabase/package.json @@ -30,7 +30,7 @@ "@supabase/gotrue-js": "2.62.2", "@supabase/ssr": "^0.3.0", "@supabase/supabase-js": "^2.42.4", - "@tanstack/react-query": "5.29.0", + "@tanstack/react-query": "5.29.2", "@types/react": "^18.2.79", "next": "14.2.1", "react": "18.2.0", diff --git a/packages/ui/package.json b/packages/ui/package.json index d8f36bf27..1de929f72 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -29,7 +29,7 @@ "@radix-ui/react-tooltip": "1.0.7", "clsx": "^2.1.0", "cmdk": "1.0.0", - "input-otp": "1.2.3", + "input-otp": "1.2.4", "react-top-loading-bar": "2.3.1", "tailwind-merge": "^2.2.2" }, @@ -58,7 +58,7 @@ "class-variance-authority": "^0.7.0", "date-fns": "^3.6.0", "eslint": "^8.57.0", - "lucide-react": "^0.367.0", + "lucide-react": "^0.368.0", "next": "14.2.1", "next-themes": "0.3.0", "prettier": "^3.2.5", @@ -66,7 +66,7 @@ "react-hook-form": "^7.51.3", "react-i18next": "^14.1.0", "sonner": "^1.4.41", - "tailwindcss": "3.4.1", + "tailwindcss": "3.4.3", "tailwindcss-animate": "^1.0.7", "typescript": "^5.4.5", "zod": "^3.22.4" diff --git a/packages/ui/src/makerkit/page.tsx b/packages/ui/src/makerkit/page.tsx index 657566732..20b46c270 100644 --- a/packages/ui/src/makerkit/page.tsx +++ b/packages/ui/src/makerkit/page.tsx @@ -44,7 +44,9 @@ export function PageHeader({ mobileNavigation?: React.ReactNode; }>) { return ( -
+