Update i18n settings and upgrade dependencies in lockfile

This commit refactors the i18n settings in `i18n.settings.ts` to improve language handling. In addition, it updates the `pnpm-lock.yaml` file to upgrade the lockfile version and several package dependencies. Most notably, it integrates `tailwind-merge` and `@tanstack/react-table` into various packages.
This commit is contained in:
giancarlo
2024-04-20 13:17:38 +08:00
parent 6ff82ec5ef
commit 8281de12a0
34 changed files with 8128 additions and 6138 deletions

View File

@@ -15,5 +15,11 @@
"@playwright/test": "^1.43.1",
"@types/node": "^20.12.7",
"node-html-parser": "^6.1.13"
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
}
}

View File

@@ -1,5 +1,3 @@
'use client';
import { SidebarDivider, SidebarGroup, SidebarItem } from '@kit/ui/sidebar';
import { Trans } from '@kit/ui/trans';
@@ -10,9 +8,11 @@ export function AccountLayoutSidebarNavigation({
}: React.PropsWithChildren<{
account: string;
}>) {
const routes = getTeamAccountSidebarConfig(account).routes;
return (
<>
{getTeamAccountSidebarConfig(account).routes.map((item, index) => {
{routes.map((item, index) => {
if ('divider' in item) {
return <SidebarDivider key={index} />;
}
@@ -55,5 +55,3 @@ export function AccountLayoutSidebarNavigation({
</>
);
}
export default AccountLayoutSidebarNavigation;

View File

@@ -56,10 +56,13 @@ export function getI18nSettings(
return {
supportedLngs: languages,
fallbackLng: defaultLanguage,
fallbackLng: languages[0],
detection: undefined,
lng,
load: 'languageOnly',
preload: false,
lowerCaseLng: true,
fallbackNS: defaultI18nNamespaces,
defaultNS: defaultI18nNamespaces,
ns,
react: {
useSuspense: true,

View File

@@ -69,6 +69,7 @@
"react-i18next": "^14.1.0",
"recharts": "^2.12.5",
"sonner": "^1.4.41",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
},
"devDependencies": {

View File

@@ -44,5 +44,10 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2"
}
}

View File

@@ -66,5 +66,9 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"tailwind-merge": "^2.2.2"
}
}

View File

@@ -22,7 +22,10 @@
"zod": "^3.22.4"
},
"dependencies": {
"@lemonsqueezy/lemonsqueezy.js": "2.2.0"
"@lemonsqueezy/lemonsqueezy.js": "2.2.0",
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2"
},
"devDependencies": {
"@kit/billing": "workspace:^",

View File

@@ -26,7 +26,10 @@
"dependencies": {
"@stripe/react-stripe-js": "^2.7.0",
"@stripe/stripe-js": "^3.3.0",
"stripe": "^15.2.0"
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"stripe": "^15.2.0",
"tailwind-merge": "^2.2.2"
},
"devDependencies": {
"@kit/billing": "workspace:^",

View File

@@ -12,7 +12,6 @@
"exports": {
".": "./src/index.ts"
},
"peerDependencies": {},
"devDependencies": {
"@kit/eslint-config": "workspace:*",
"@kit/prettier-config": "workspace:*",
@@ -32,5 +31,11 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
}
}

View File

@@ -16,7 +16,10 @@
},
"dependencies": {
"@keystatic/core": "0.5.11",
"@keystatic/next": "5.0.0"
"@keystatic/next": "5.0.0",
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2"
},
"peerDependencies": {
"@kit/cms": "workspace:^",

View File

@@ -39,5 +39,11 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
}
}

View File

@@ -47,5 +47,10 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2"
}
}

View File

@@ -13,7 +13,11 @@
".": "./src/index.ts"
},
"dependencies": {
"@react-email/components": "0.0.16"
"@react-email/components": "0.0.16",
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@kit/eslint-config": "workspace:*",

View File

@@ -15,7 +15,9 @@
"./hooks/*": "./src/hooks/*.ts"
},
"dependencies": {
"nanoid": "^5.0.7"
"@tanstack/react-table": "^8.16.0",
"nanoid": "^5.0.7",
"tailwind-merge": "^2.2.2"
},
"devDependencies": {
"@hookform/resolvers": "^3.3.4",

View File

@@ -62,5 +62,8 @@
"src/*"
]
}
},
"dependencies": {
"tailwind-merge": "^2.2.2"
}
}

View File

@@ -68,5 +68,9 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"tailwind-merge": "^2.2.2"
}
}

View File

@@ -13,7 +13,8 @@
"./webhooks": "./src/server/services/webhooks/index.ts"
},
"dependencies": {
"nanoid": "^5.0.7"
"nanoid": "^5.0.7",
"tailwind-merge": "^2.2.2"
},
"devDependencies": {
"@hookform/resolvers": "^3.3.4",

View File

@@ -45,5 +45,11 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
}
}

View File

@@ -17,7 +17,9 @@ export function I18nProvider({
settings: InitOptions;
resolver: Resolver;
}>) {
if (!client) {
// If the client is not initialized or
// the language has changed, reinitialize the client
if (!client || client.language !== settings.lng) {
throw withI18nClient(settings, resolver);
}

View File

@@ -19,7 +19,6 @@ export async function initializeServerI18n(
}
await i18nInstance
.use(initReactI18next)
.use(
resourcesToBackend(async (language, namespace, callback) => {
try {
@@ -36,6 +35,7 @@ export async function initializeServerI18n(
}
}),
)
.use(initReactI18next)
.init(settings);
return i18nInstance;

View File

@@ -13,7 +13,10 @@
".": "./src/index.ts"
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"nodemailer": "^6.9.13",
"tailwind-merge": "^2.2.2",
"vercel-email": "0.0.6"
},
"devDependencies": {

View File

@@ -16,7 +16,11 @@
},
"dependencies": {
"@baselime/node-opentelemetry": "^0.5.8",
"@baselime/react-rum": "^0.2.9"
"@baselime/react-rum": "^0.2.9",
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@kit/eslint-config": "workspace:*",

View File

@@ -42,5 +42,11 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
}
}

View File

@@ -21,7 +21,11 @@
"@opentelemetry/sdk-node": "0.50.0",
"@opentelemetry/semantic-conventions": "^1.23.0",
"@sentry/nextjs": "^7.110.1",
"@sentry/opentelemetry-node": "^7.110.1"
"@sentry/opentelemetry-node": "^7.110.1",
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@kit/eslint-config": "workspace:*",

View File

@@ -44,5 +44,9 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"tailwind-merge": "^2.2.2"
}
}

View File

@@ -14,7 +14,11 @@
"./utils": "./src/utils.ts"
},
"dependencies": {
"pino": "^8.20.0"
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"pino": "^8.20.0",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@kit/eslint-config": "workspace:*",

View File

@@ -57,5 +57,9 @@
"src/*"
]
}
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"tailwind-merge": "^2.2.2"
}
}

View File

@@ -39,7 +39,7 @@
"class-variance-authority": "^0.7.0",
"date-fns": "^3.2.0",
"lucide-react": "^0.368.0",
"next": "^14.1.4",
"next": "^14.2.2",
"next-themes": "^0.3.0",
"react-hook-form": "^7.51.2",
"react-i18next": "^14.1.0",

View File

@@ -175,7 +175,7 @@ export function SidebarItem({
<If condition={collapsed} fallback={Icon}>
<TooltipProvider>
<Tooltip>
<TooltipTrigger>{Icon}</TooltipTrigger>
<TooltipTrigger asChild>{Icon}</TooltipTrigger>
<TooltipContent side={'right'} sideOffset={20}>
{children}
@@ -184,13 +184,7 @@ export function SidebarItem({
</TooltipProvider>
</If>
<span
className={cn({
hidden: collapsed,
})}
>
{children}
</span>
<span className={cn({ hidden: collapsed })}>{children}</span>
</Button>
</Link>
);

14097
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,6 +14,7 @@
},
"dependencies": {
"@next/eslint-plugin-next": "^14.2.2",
"@tanstack/react-table": "^8.16.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/eslint": "^8.56.9",
"@typescript-eslint/eslint-plugin": "^7.7.0",
@@ -22,7 +23,10 @@
"eslint-config-turbo": "^1.13.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0"
"eslint-plugin-react-hooks": "^4.6.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@kit/prettier-config": "workspace:^",

View File

@@ -10,8 +10,12 @@
},
"dependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.14"
"prettier-plugin-tailwindcss": "^0.5.14",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@kit/tsconfig": "workspace:^",

View File

@@ -14,10 +14,14 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"autoprefixer": "^10.4.19",
"next": "14.3.0-canary.7",
"postcss": "8.4.38",
"tailwind-merge": "^2.2.2",
"tailwindcss": "3.4.3",
"tailwindcss-animate": "^1.0.7"
"tailwindcss-animate": "^1.0.7",
"zod": "^3.22.4"
},
"devDependencies": {
"@kit/eslint-config": "workspace:^",

View File

@@ -4,5 +4,11 @@
"version": "0.1.0",
"files": [
"base.json"
]
],
"dependencies": {
"@tanstack/react-table": "^8.16.0",
"next": "14.3.0-canary.7",
"tailwind-merge": "^2.2.2",
"zod": "^3.22.4"
}
}