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

@@ -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": {