Update dependencies and refactor loading components
- Removed `react-is` and `require-in-the-middle` overrides from `package.json` and `pnpm-lock.yaml`. - Updated various dependencies across multiple packages, including `@types/node` to `^24.5.2`, `react-hook-form` to `^7.63.0`, and `@ai-sdk/openai` to `^2.0.32`. - Deleted the `loading.tsx` component from the admin accounts directory, streamlining the codebase. - Adjusted `playwright.config.ts` to use a configurable number of workers for CI environments, enhancing test performance. - Improved error handling in user ban and reactivation dialogs to provide clearer feedback to the admin user.
This commit is contained in:
@@ -8,11 +8,11 @@
|
|||||||
"format": "prettier --check --write \"**/*.{js,cjs,mjs,ts,tsx,md,json}\""
|
"format": "prettier --check --write \"**/*.{js,cjs,mjs,ts,tsx,md,json}\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ai-sdk/openai": "^2.0.30",
|
"@ai-sdk/openai": "^2.0.32",
|
||||||
"@faker-js/faker": "^10.0.0",
|
"@faker-js/faker": "^10.0.0",
|
||||||
"@hookform/resolvers": "^5.2.2",
|
"@hookform/resolvers": "^5.2.2",
|
||||||
"@tanstack/react-query": "5.89.0",
|
"@tanstack/react-query": "5.89.0",
|
||||||
"ai": "5.0.44",
|
"ai": "5.0.48",
|
||||||
"lucide-react": "^0.544.0",
|
"lucide-react": "^0.544.0",
|
||||||
"next": "15.5.3",
|
"next": "15.5.3",
|
||||||
"nodemailer": "^7.0.6",
|
"nodemailer": "^7.0.6",
|
||||||
@@ -28,13 +28,13 @@
|
|||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@kit/ui": "workspace:*",
|
"@kit/ui": "workspace:*",
|
||||||
"@tailwindcss/postcss": "^4.1.13",
|
"@tailwindcss/postcss": "^4.1.13",
|
||||||
"@types/node": "^24.5.0",
|
"@types/node": "^24.5.2",
|
||||||
"@types/nodemailer": "7.0.1",
|
"@types/nodemailer": "7.0.1",
|
||||||
"@types/react": "19.1.13",
|
"@types/react": "19.1.13",
|
||||||
"@types/react-dom": "19.1.9",
|
"@types/react-dom": "19.1.9",
|
||||||
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
||||||
"pino-pretty": "13.0.0",
|
"pino-pretty": "13.0.0",
|
||||||
"react-hook-form": "^7.62.0",
|
"react-hook-form": "^7.63.0",
|
||||||
"recharts": "2.15.3",
|
"recharts": "2.15.3",
|
||||||
"tailwindcss": "4.1.13",
|
"tailwindcss": "4.1.13",
|
||||||
"tailwindcss-animate": "^1.0.7",
|
"tailwindcss-animate": "^1.0.7",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "^1.55.0",
|
"@playwright/test": "^1.55.0",
|
||||||
"@types/node": "^24.5.0",
|
"@types/node": "^24.5.2",
|
||||||
"dotenv": "17.2.2",
|
"dotenv": "17.2.2",
|
||||||
"node-html-parser": "^7.0.1",
|
"node-html-parser": "^7.0.1",
|
||||||
"totp-generator": "^2.0.0"
|
"totp-generator": "^2.0.0"
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ import { config as dotenvConfig } from 'dotenv';
|
|||||||
dotenvConfig();
|
dotenvConfig();
|
||||||
dotenvConfig({ path: '.env.local' });
|
dotenvConfig({ path: '.env.local' });
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of workers to use in CI. Tweak based on your CI provider's resources.
|
||||||
|
*/
|
||||||
|
const CI_WORKERS = 3;
|
||||||
|
|
||||||
const enableBillingTests = process.env.ENABLE_BILLING_TESTS === 'true';
|
const enableBillingTests = process.env.ENABLE_BILLING_TESTS === 'true';
|
||||||
const enableTeamAccountTests =
|
const enableTeamAccountTests =
|
||||||
(process.env.ENABLE_TEAM_ACCOUNT_TESTS ?? 'true') === 'true';
|
(process.env.ENABLE_TEAM_ACCOUNT_TESTS ?? 'true') === 'true';
|
||||||
@@ -47,7 +52,7 @@ export default defineConfig({
|
|||||||
forbidOnly: !!process.env.CI,
|
forbidOnly: !!process.env.CI,
|
||||||
retries: 3,
|
retries: 3,
|
||||||
/* Limit parallel tests on CI. */
|
/* Limit parallel tests on CI. */
|
||||||
workers: process.env.CI ? 1 : undefined,
|
workers: process.env.CI ? CI_WORKERS : undefined,
|
||||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||||
reporter: 'html',
|
reporter: 'html',
|
||||||
/* Ignore billing tests if the environment variable is not set. */
|
/* Ignore billing tests if the environment variable is not set. */
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
import { GlobalLoader } from '@kit/ui/global-loader';
|
|
||||||
|
|
||||||
export default GlobalLoader;
|
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
"next-themes": "0.4.6",
|
"next-themes": "0.4.6",
|
||||||
"react": "19.1.1",
|
"react": "19.1.1",
|
||||||
"react-dom": "19.1.1",
|
"react-dom": "19.1.1",
|
||||||
"react-hook-form": "^7.62.0",
|
"react-hook-form": "^7.63.0",
|
||||||
"react-i18next": "^15.7.3",
|
"react-i18next": "^15.7.3",
|
||||||
"recharts": "2.15.3",
|
"recharts": "2.15.3",
|
||||||
"tailwind-merge": "^3.3.1",
|
"tailwind-merge": "^3.3.1",
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@next/bundle-analyzer": "15.5.3",
|
"@next/bundle-analyzer": "15.5.3",
|
||||||
"@tailwindcss/postcss": "^4.1.13",
|
"@tailwindcss/postcss": "^4.1.13",
|
||||||
"@types/node": "^24.5.0",
|
"@types/node": "^24.5.2",
|
||||||
"@types/react": "19.1.13",
|
"@types/react": "19.1.13",
|
||||||
"@types/react-dom": "19.1.9",
|
"@types/react-dom": "19.1.9",
|
||||||
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
||||||
|
|||||||
@@ -38,12 +38,6 @@
|
|||||||
},
|
},
|
||||||
"prettier": "@kit/prettier-config",
|
"prettier": "@kit/prettier-config",
|
||||||
"packageManager": "pnpm@10.14.0",
|
"packageManager": "pnpm@10.14.0",
|
||||||
"pnpm": {
|
|
||||||
"overrides": {
|
|
||||||
"react-is": "19.0.0",
|
|
||||||
"require-in-the-middle": "7.5.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@manypkg/cli": "^0.25.1",
|
"@manypkg/cli": "^0.25.1",
|
||||||
"@turbo/gen": "^2.5.6",
|
"@turbo/gen": "^2.5.6",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"@kit/eslint-config": "workspace:*",
|
"@kit/eslint-config": "workspace:*",
|
||||||
"@kit/prettier-config": "workspace:*",
|
"@kit/prettier-config": "workspace:*",
|
||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@types/node": "^24.5.0"
|
"@types/node": "^24.5.2"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
"*": {
|
"*": {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
"lucide-react": "^0.544.0",
|
"lucide-react": "^0.544.0",
|
||||||
"next": "15.5.3",
|
"next": "15.5.3",
|
||||||
"react": "19.1.1",
|
"react": "19.1.1",
|
||||||
"react-hook-form": "^7.62.0",
|
"react-hook-form": "^7.63.0",
|
||||||
"react-i18next": "^15.7.3",
|
"react-i18next": "^15.7.3",
|
||||||
"zod": "^3.25.74"
|
"zod": "^3.25.74"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"@kit/shared": "workspace:*",
|
"@kit/shared": "workspace:*",
|
||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@kit/wordpress": "workspace:*",
|
"@kit/wordpress": "workspace:*",
|
||||||
"@types/node": "^24.5.0"
|
"@types/node": "^24.5.2"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
"*": {
|
"*": {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
"@kit/prettier-config": "workspace:*",
|
"@kit/prettier-config": "workspace:*",
|
||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@kit/ui": "workspace:*",
|
"@kit/ui": "workspace:*",
|
||||||
"@types/node": "^24.5.0",
|
"@types/node": "^24.5.2",
|
||||||
"@types/react": "19.1.13",
|
"@types/react": "19.1.13",
|
||||||
"react": "19.1.1",
|
"react": "19.1.1",
|
||||||
"zod": "^3.25.74"
|
"zod": "^3.25.74"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"@kit/prettier-config": "workspace:*",
|
"@kit/prettier-config": "workspace:*",
|
||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@kit/ui": "workspace:*",
|
"@kit/ui": "workspace:*",
|
||||||
"@types/node": "^24.5.0",
|
"@types/node": "^24.5.2",
|
||||||
"@types/react": "19.1.13",
|
"@types/react": "19.1.13",
|
||||||
"wp-types": "^4.68.1"
|
"wp-types": "^4.68.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
"next-themes": "0.4.6",
|
"next-themes": "0.4.6",
|
||||||
"react": "19.1.1",
|
"react": "19.1.1",
|
||||||
"react-dom": "19.1.1",
|
"react-dom": "19.1.1",
|
||||||
"react-hook-form": "^7.62.0",
|
"react-hook-form": "^7.63.0",
|
||||||
"react-i18next": "^15.7.3",
|
"react-i18next": "^15.7.3",
|
||||||
"zod": "^3.25.74"
|
"zod": "^3.25.74"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
"next": "15.5.3",
|
"next": "15.5.3",
|
||||||
"react": "19.1.1",
|
"react": "19.1.1",
|
||||||
"react-dom": "19.1.1",
|
"react-dom": "19.1.1",
|
||||||
"react-hook-form": "^7.62.0",
|
"react-hook-form": "^7.63.0",
|
||||||
"zod": "^3.25.74"
|
"zod": "^3.25.74"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
import { useState, useTransition } from 'react';
|
import { useState, useTransition } from 'react';
|
||||||
|
|
||||||
import { isRedirectError } from 'next/dist/client/components/redirect-error';
|
|
||||||
|
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
|
|
||||||
@@ -80,8 +78,8 @@ function BanUserForm(props: { userId: string }) {
|
|||||||
startTransition(async () => {
|
startTransition(async () => {
|
||||||
try {
|
try {
|
||||||
await banUserAction(data);
|
await banUserAction(data);
|
||||||
} catch (error) {
|
} catch {
|
||||||
setError(!isRedirectError(error));
|
setError(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
import { useState, useTransition } from 'react';
|
import { useState, useTransition } from 'react';
|
||||||
|
|
||||||
import { isRedirectError } from 'next/dist/client/components/redirect-error';
|
|
||||||
|
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
|
|
||||||
@@ -79,8 +77,8 @@ function ReactivateUserForm(props: { userId: string }) {
|
|||||||
startTransition(async () => {
|
startTransition(async () => {
|
||||||
try {
|
try {
|
||||||
await reactivateUserAction(data);
|
await reactivateUserAction(data);
|
||||||
} catch (error) {
|
} catch {
|
||||||
setError(!isRedirectError(error));
|
setError(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -43,11 +43,9 @@ export const banUserAction = adminAction(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info({ userId }, `Super Admin has successfully banned user`);
|
|
||||||
|
|
||||||
revalidateAdmin();
|
revalidateAdmin();
|
||||||
|
|
||||||
return redirect(`/admin/accounts/${userId}`);
|
logger.info({ userId }, `Super Admin has successfully banned user`);
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
schema: BanUserSchema,
|
schema: BanUserSchema,
|
||||||
@@ -80,8 +78,6 @@ export const reactivateUserAction = adminAction(
|
|||||||
revalidateAdmin();
|
revalidateAdmin();
|
||||||
|
|
||||||
logger.info({ userId }, `Super Admin has successfully reactivated user`);
|
logger.info({ userId }, `Super Admin has successfully reactivated user`);
|
||||||
|
|
||||||
return redirect(`/admin/accounts/${userId}`);
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
schema: ReactivateUserSchema,
|
schema: ReactivateUserSchema,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
"@types/react": "19.1.13",
|
"@types/react": "19.1.13",
|
||||||
"lucide-react": "^0.544.0",
|
"lucide-react": "^0.544.0",
|
||||||
"next": "15.5.3",
|
"next": "15.5.3",
|
||||||
"react-hook-form": "^7.62.0",
|
"react-hook-form": "^7.63.0",
|
||||||
"react-i18next": "^15.7.3",
|
"react-i18next": "^15.7.3",
|
||||||
"sonner": "^2.0.7",
|
"sonner": "^2.0.7",
|
||||||
"zod": "^3.25.74"
|
"zod": "^3.25.74"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
"next": "15.5.3",
|
"next": "15.5.3",
|
||||||
"react": "19.1.1",
|
"react": "19.1.1",
|
||||||
"react-dom": "19.1.1",
|
"react-dom": "19.1.1",
|
||||||
"react-hook-form": "^7.62.0",
|
"react-hook-form": "^7.63.0",
|
||||||
"react-i18next": "^15.7.3",
|
"react-i18next": "^15.7.3",
|
||||||
"zod": "^3.25.74"
|
"zod": "^3.25.74"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"@kit/resend": "workspace:*",
|
"@kit/resend": "workspace:*",
|
||||||
"@kit/shared": "workspace:*",
|
"@kit/shared": "workspace:*",
|
||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@types/node": "^24.5.0",
|
"@types/node": "^24.5.2",
|
||||||
"zod": "^3.25.74"
|
"zod": "^3.25.74"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"@kit/mailers-shared": "workspace:*",
|
"@kit/mailers-shared": "workspace:*",
|
||||||
"@kit/prettier-config": "workspace:*",
|
"@kit/prettier-config": "workspace:*",
|
||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@types/node": "^24.5.0",
|
"@types/node": "^24.5.2",
|
||||||
"zod": "^3.25.74"
|
"zod": "^3.25.74"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
"@kit/eslint-config": "workspace:*",
|
"@kit/eslint-config": "workspace:*",
|
||||||
"@kit/prettier-config": "workspace:*",
|
"@kit/prettier-config": "workspace:*",
|
||||||
"@kit/tsconfig": "workspace:*",
|
"@kit/tsconfig": "workspace:*",
|
||||||
"@modelcontextprotocol/sdk": "1.18.0",
|
"@modelcontextprotocol/sdk": "1.18.1",
|
||||||
"@types/node": "^24.5.0",
|
"@types/node": "^24.5.2",
|
||||||
"postgres": "3.4.7",
|
"postgres": "3.4.7",
|
||||||
"zod": "^3.25.74"
|
"zod": "^3.25.74"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"./config/server": "./src/sentry.client.server.ts"
|
"./config/server": "./src/sentry.client.server.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/nextjs": "^10.11.0",
|
"@sentry/nextjs": "^10.12.0",
|
||||||
"import-in-the-middle": "1.14.2"
|
"import-in-the-middle": "1.14.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
"@types/react-dom": "19.1.9",
|
"@types/react-dom": "19.1.9",
|
||||||
"react": "19.1.1",
|
"react": "19.1.1",
|
||||||
"react-dom": "19.1.1",
|
"react-dom": "19.1.1",
|
||||||
"react-hook-form": "^7.62.0",
|
"react-hook-form": "^7.63.0",
|
||||||
"zod": "^3.25.74"
|
"zod": "^3.25.74"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"@types/react": "19.1.13"
|
"@types/react": "19.1.13"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pino": "^9.9.5"
|
"pino": "^9.11.0"
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
"*": {
|
"*": {
|
||||||
|
|||||||
@@ -36,8 +36,8 @@
|
|||||||
"next": "15.5.3",
|
"next": "15.5.3",
|
||||||
"next-themes": "0.4.6",
|
"next-themes": "0.4.6",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"react-day-picker": "^9.10.0",
|
"react-day-picker": "^9.11.0",
|
||||||
"react-hook-form": "^7.62.0",
|
"react-hook-form": "^7.63.0",
|
||||||
"react-i18next": "^15.7.3",
|
"react-i18next": "^15.7.3",
|
||||||
"sonner": "^2.0.7",
|
"sonner": "^2.0.7",
|
||||||
"tailwindcss": "4.1.13",
|
"tailwindcss": "4.1.13",
|
||||||
|
|||||||
2337
pnpm-lock.yaml
generated
2337
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user