Update package versions and improve code handling

Multiple package versions have been updated to their latest versions for better compatibility and stability. In addition, modifications were made to the `getGitHash` function in `route.ts` to handle potential failures more gracefully.
This commit is contained in:
gbuomprisco
2024-07-17 18:43:57 +08:00
parent fb04be4d26
commit 35717c79f7
19 changed files with 530 additions and 655 deletions

View File

@@ -12,7 +12,7 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@playwright/test": "^1.45.1",
"@playwright/test": "^1.45.2",
"@types/node": "^20.14.10",
"node-html-parser": "^6.1.13"
}

View File

@@ -21,14 +21,20 @@ export const GET = async () => {
});
};
function getGitHash() {
async function getGitHash() {
for (const envVar of KNOWN_GIT_ENV_VARS) {
if (process.env[envVar]) {
return process.env[envVar];
}
}
return getHashFromProcess();
try {
return await getHashFromProcess();
} catch (error) {
console.warn(`[WARN] Could not find git hash: ${JSON.stringify(error)}. You may want to provide a fallback.`);
return '';
}
}
async function getHashFromProcess() {

View File

@@ -55,8 +55,8 @@
"@marsidev/react-turnstile": "^0.7.2",
"@radix-ui/react-icons": "^1.3.0",
"@supabase/supabase-js": "^2.44.4",
"@tanstack/react-query": "5.51.1",
"@tanstack/react-query-next-experimental": "^5.51.1",
"@tanstack/react-query": "5.51.3",
"@tanstack/react-query-next-experimental": "^5.51.3",
"@tanstack/react-table": "^8.19.3",
"date-fns": "^3.6.0",
"lucide-react": "^0.408.0",
@@ -66,7 +66,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"react-hook-form": "^7.52.1",
"react-i18next": "^14.1.2",
"react-i18next": "^14.1.3",
"recharts": "^2.12.7",
"sonner": "^1.5.0",
"tailwind-merge": "^2.4.0",
@@ -87,7 +87,7 @@
"eslint": "^8.57.0",
"prettier": "^3.3.3",
"supabase": "^1.183.5",
"tailwindcss": "3.4.4",
"tailwindcss": "3.4.6",
"typescript": "^5.5.3"
},
"eslintConfig": {

View File

@@ -34,11 +34,11 @@
"prettier": "@kit/prettier-config",
"dependencies": {
"@manypkg/cli": "^0.21.4",
"@turbo/gen": "^2.0.6",
"@turbo/gen": "^2.0.7",
"cross-env": "^7.0.3",
"pnpm": "^9.5.0",
"prettier": "^3.3.3",
"turbo": "2.0.6",
"turbo": "2.0.7",
"typescript": "^5.5.3"
},
"pnpm": {

View File

@@ -34,7 +34,7 @@
"next": "14.2.5",
"react": "18.3.1",
"react-hook-form": "^7.52.1",
"react-i18next": "^14.1.2",
"react-i18next": "^14.1.3",
"zod": "^3.23.8"
},
"eslintConfig": {

View File

@@ -35,7 +35,7 @@
"@kit/ui": "workspace:^",
"@radix-ui/react-icons": "^1.3.0",
"@supabase/supabase-js": "^2.44.4",
"@tanstack/react-query": "5.51.1",
"@tanstack/react-query": "5.51.3",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"lucide-react": "^0.408.0",
@@ -44,7 +44,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"react-hook-form": "^7.52.1",
"react-i18next": "^14.1.2",
"react-i18next": "^14.1.3",
"sonner": "^1.5.0",
"zod": "^3.23.8"
},

View File

@@ -22,7 +22,7 @@
"@makerkit/data-loader-supabase-core": "^0.0.8",
"@makerkit/data-loader-supabase-nextjs": "^1.2.3",
"@supabase/supabase-js": "^2.44.4",
"@tanstack/react-query": "5.51.1",
"@tanstack/react-query": "5.51.3",
"@tanstack/react-table": "^8.19.3",
"@types/react": "^18.3.3",
"lucide-react": "^0.408.0",

View File

@@ -29,12 +29,12 @@
"@marsidev/react-turnstile": "^0.7.2",
"@radix-ui/react-icons": "^1.3.0",
"@supabase/supabase-js": "^2.44.4",
"@tanstack/react-query": "5.51.1",
"@tanstack/react-query": "5.51.3",
"@types/react": "^18.3.3",
"lucide-react": "^0.408.0",
"next": "14.2.5",
"react-hook-form": "^7.52.1",
"react-i18next": "^14.1.2",
"react-i18next": "^14.1.3",
"sonner": "^1.5.0",
"zod": "^3.23.8"
},

View File

@@ -21,12 +21,12 @@
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:*",
"@supabase/supabase-js": "^2.44.4",
"@tanstack/react-query": "5.51.1",
"@tanstack/react-query": "5.51.3",
"@types/react": "^18.3.3",
"lucide-react": "^0.408.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-i18next": "^14.1.2"
"react-i18next": "^14.1.3"
},
"prettier": "@kit/prettier-config",
"eslintConfig": {

View File

@@ -33,7 +33,7 @@
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:^",
"@supabase/supabase-js": "^2.44.4",
"@tanstack/react-query": "5.51.1",
"@tanstack/react-query": "5.51.3",
"@tanstack/react-table": "^8.19.3",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
@@ -44,7 +44,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"react-hook-form": "^7.52.1",
"react-i18next": "^14.1.2",
"react-i18next": "^14.1.3",
"sonner": "^1.5.0",
"zod": "^3.23.8"
},

View File

@@ -21,8 +21,8 @@
"@kit/shared": "workspace:^",
"@kit/tailwind-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@tanstack/react-query": "5.51.1",
"react-i18next": "^14.1.2"
"@tanstack/react-query": "5.51.3",
"react-i18next": "^14.1.3"
},
"dependencies": {
"i18next": "^23.12.1",

View File

@@ -1,3 +1,5 @@
import type { InitOptions } from 'i18next';
/**
* Get i18n settings for i18next.
* @param languages
@@ -12,7 +14,7 @@ export function createI18nSettings({
languages: string[];
language: string;
namespaces?: string | string[];
}) {
}): InitOptions {
const lng = language;
const ns = namespaces;
@@ -25,6 +27,9 @@ export function createI18nSettings({
preload: false as const,
lowerCaseLng: true as const,
fallbackNS: ns,
missingInterpolationHandler: (text, value, options) => {
console.debug(`Missing interpolation value for key: ${text}`, value, options);
},
ns,
react: {
useSuspense: true,

View File

@@ -16,7 +16,7 @@
"./config/server": "./src/sentry.client.server.ts"
},
"dependencies": {
"@sentry/nextjs": "^8.17.0"
"@sentry/nextjs": "^8.18.0"
},
"devDependencies": {
"@kit/eslint-config": "workspace:*",

View File

@@ -22,7 +22,7 @@
"@tanstack/react-table": "^8.19.3"
},
"dependencies": {
"pino": "^9.3.0"
"pino": "^9.3.1"
},
"eslintConfig": {
"root": true,

View File

@@ -29,7 +29,7 @@
"@supabase/gotrue-js": "2.64.4",
"@supabase/ssr": "^0.4.0",
"@supabase/supabase-js": "^2.44.4",
"@tanstack/react-query": "5.51.1",
"@tanstack/react-query": "5.51.3",
"@types/react": "^18.3.3",
"next": "14.2.5",
"react": "18.3.1",

View File

@@ -41,7 +41,7 @@
"@kit/tailwind-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@radix-ui/react-icons": "^1.3.0",
"@tanstack/react-query": "5.51.1",
"@tanstack/react-query": "5.51.3",
"@tanstack/react-table": "^8.19.3",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
@@ -53,9 +53,9 @@
"prettier": "^3.3.3",
"react-day-picker": "^8.10.1",
"react-hook-form": "^7.52.1",
"react-i18next": "^14.1.2",
"react-i18next": "^14.1.3",
"sonner": "^1.5.0",
"tailwindcss": "3.4.4",
"tailwindcss": "3.4.6",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.5.3",
"zod": "^3.23.8"

1110
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -16,10 +16,10 @@
"@next/eslint-plugin-next": "^14.2.5",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/eslint": "^8.56.10",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"eslint-config-prettier": "^9.1.0",
"eslint-config-turbo": "^2.0.6",
"eslint-config-turbo": "^2.0.7",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.34.4",
"eslint-plugin-react-hooks": "^4.6.2"

View File

@@ -17,7 +17,7 @@
"autoprefixer": "^10.4.19",
"next": "14.2.5",
"postcss": "8.4.39",
"tailwindcss": "3.4.4",
"tailwindcss": "3.4.6",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {