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:
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user