Upsert storage images if there is a mismatch + deps update (#321)

* bug(storage): use upsert when adding images

chore(dependencies): update package versions for improved compatibility

- Bumped `@ai-sdk/openai` from `2.0.11` to `2.0.15` for enhanced functionality.
- Updated `@tanstack/react-query` from `5.85.0` to `5.85.3` to incorporate the latest improvements.
- Incremented `ai` from `5.0.11` to `5.0.15` for better performance.
- Updated `@tailwindcss/postcss` from `4.1.11` to `4.1.12` for improved compatibility.
- Incremented `@types/react` from `19.1.9` to `19.1.10` for type safety enhancements.
- Adjusted `pino-pretty` from `13.1.1` to `13.0.0` for consistency across the codebase.
- Updated `supabase` from `2.34.3` to `2.34.0` to ensure the latest improvements and bug fixes are included.
- Updated `tailwindcss` from `4.1.11` to `4.1.12` for better integration.

* chore(dependencies): update package versions for improved compatibility

- Bumped `@ai-sdk/openai` from `2.0.15` to `2.0.15` for enhanced functionality.
- Updated `@tanstack/react-query` from `5.85.0` to `5.85.3` to incorporate the latest improvements.
- Incremented `ai` from `5.0.11` to `5.0.15` for better performance.
- Updated `@tailwindcss/postcss` from `4.1.11` to `4.1.12` for improved compatibility.
- Incremented `@types/react` from `19.1.9` to `19.1.10` for type safety enhancements.
- Updated `supabase` from `2.34.3` to `2.34.0` to ensure the latest improvements and bug fixes are included.
- Updated `tailwindcss` from `4.1.11` to `4.1.12` for better integration.
- Updated `@types/node` from `24.2.1` to `24.3.0` for type safety enhancements.
- Incremented `turbo` and `@turbo/gen` from `2.5.5` to `2.5.6` for improved performance and compatibility.
This commit is contained in:
Giancarlo Buomprisco
2025-08-16 16:16:21 +07:00
committed by GitHub
parent 5b3a37a207
commit d72ce8b063
26 changed files with 962 additions and 1061 deletions

View File

@@ -27,7 +27,7 @@
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:*",
"@supabase/supabase-js": "2.55.0",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"date-fns": "^4.1.0",
"lucide-react": "^0.539.0",
"next": "15.4.6",

View File

@@ -24,7 +24,7 @@
"@kit/supabase": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:*",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"next": "15.4.6",
"react": "19.1.1",
"zod": "^3.25.74"

View File

@@ -27,7 +27,7 @@
"@kit/supabase": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:*",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"date-fns": "^4.1.0",
"next": "15.4.6",
"react": "19.1.1",

View File

@@ -27,7 +27,7 @@
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:*",
"@types/node": "^24.1.0",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"react": "19.1.1",
"zod": "^3.25.74"
},

View File

@@ -21,7 +21,7 @@
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:*",
"@types/node": "^24.1.0",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"wp-types": "^4.68.1"
},
"typesVersions": {

View File

@@ -35,8 +35,8 @@
"@kit/ui": "workspace:*",
"@radix-ui/react-icons": "^1.3.2",
"@supabase/supabase-js": "2.55.0",
"@tanstack/react-query": "5.85.0",
"@types/react": "19.1.9",
"@tanstack/react-query": "5.85.3",
"@types/react": "19.1.10",
"@types/react-dom": "19.1.7",
"lucide-react": "^0.539.0",
"next": "15.4.6",

View File

@@ -143,7 +143,9 @@ async function uploadUserProfilePhoto(
const extension = photoFile.name.split('.').pop();
const fileName = await getAvatarFileName(userId, extension);
const result = await bucket.upload(fileName, bytes);
const result = await bucket.upload(fileName, bytes, {
upsert: true,
});
if (!result.error) {
return bucket.getPublicUrl(fileName).data.publicUrl;

View File

@@ -21,9 +21,9 @@
"@makerkit/data-loader-supabase-core": "^0.0.10",
"@makerkit/data-loader-supabase-nextjs": "^1.2.5",
"@supabase/supabase-js": "2.55.0",
"@tanstack/react-query": "5.85.0",
"@tanstack/react-query": "5.85.3",
"@tanstack/react-table": "^8.21.3",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"lucide-react": "^0.539.0",
"next": "15.4.6",
"react": "19.1.1",

View File

@@ -30,8 +30,8 @@
"@marsidev/react-turnstile": "^1.3.0",
"@radix-ui/react-icons": "^1.3.2",
"@supabase/supabase-js": "2.55.0",
"@tanstack/react-query": "5.85.0",
"@types/react": "19.1.9",
"@tanstack/react-query": "5.85.3",
"@types/react": "19.1.10",
"lucide-react": "^0.539.0",
"next": "15.4.6",
"react-hook-form": "^7.62.0",

View File

@@ -20,8 +20,8 @@
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:*",
"@supabase/supabase-js": "2.55.0",
"@tanstack/react-query": "5.85.0",
"@types/react": "19.1.9",
"@tanstack/react-query": "5.85.3",
"@types/react": "19.1.10",
"lucide-react": "^0.539.0",
"react": "19.1.1",
"react-dom": "19.1.1",

View File

@@ -33,9 +33,9 @@
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:*",
"@supabase/supabase-js": "2.55.0",
"@tanstack/react-query": "5.85.0",
"@tanstack/react-query": "5.85.3",
"@tanstack/react-table": "^8.21.3",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"@types/react-dom": "19.1.7",
"class-variance-authority": "^0.7.1",
"date-fns": "^4.1.0",

View File

@@ -121,7 +121,9 @@ async function uploadUserProfilePhoto(
const extension = photoFile.name.split('.').pop();
const fileName = await getAvatarFileName(userId, extension);
const result = await bucket.upload(fileName, bytes);
const result = await bucket.upload(fileName, bytes, {
upsert: true,
});
if (!result.error) {
return bucket.getPublicUrl(fileName).data.publicUrl;

View File

@@ -20,14 +20,14 @@
"@kit/prettier-config": "workspace:*",
"@kit/shared": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@tanstack/react-query": "5.85.0",
"@tanstack/react-query": "5.85.3",
"next": "15.4.6",
"react": "19.1.1",
"react-dom": "19.1.1",
"react-i18next": "^15.6.1"
},
"dependencies": {
"i18next": "25.3.4",
"i18next": "25.3.6",
"i18next-browser-languagedetector": "8.2.0",
"i18next-resources-to-backend": "^1.2.1"
},

View File

@@ -24,7 +24,7 @@
"@kit/sentry": "workspace:*",
"@kit/shared": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"react": "19.1.1",
"zod": "^3.25.74"
},

View File

@@ -24,7 +24,7 @@
"@kit/eslint-config": "workspace:*",
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"react": "19.1.1",
"zod": "^3.25.74"
},

View File

@@ -17,7 +17,7 @@
"@kit/eslint-config": "workspace:*",
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"react": "19.1.1"
},
"typesVersions": {

View File

@@ -24,7 +24,7 @@
"@kit/monitoring-core": "workspace:*",
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"react": "19.1.1"
},
"typesVersions": {

View File

@@ -26,7 +26,7 @@
"@kit/ui": "workspace:*",
"@radix-ui/react-icons": "^1.3.2",
"@supabase/supabase-js": "2.55.0",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"@types/react-dom": "19.1.7",
"react": "19.1.1",
"react-dom": "19.1.1",

View File

@@ -20,7 +20,7 @@
"@kit/eslint-config": "workspace:*",
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@types/react": "19.1.9"
"@types/react": "19.1.10"
},
"dependencies": {
"pino": "^9.8.0"

View File

@@ -27,8 +27,8 @@
"@kit/tsconfig": "workspace:*",
"@supabase/ssr": "^0.6.1",
"@supabase/supabase-js": "2.55.0",
"@tanstack/react-query": "5.85.0",
"@types/react": "19.1.9",
"@tanstack/react-query": "5.85.3",
"@types/react": "19.1.10",
"next": "15.4.6",
"react": "19.1.1",
"server-only": "^0.0.1",

View File

@@ -15,7 +15,7 @@
"cmdk": "1.1.1",
"input-otp": "1.4.2",
"lucide-react": "^0.539.0",
"radix-ui": "1.4.2",
"radix-ui": "1.4.3",
"react-dropzone": "^14.3.8",
"react-top-loading-bar": "3.0.2",
"recharts": "2.15.3",
@@ -26,9 +26,9 @@
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@supabase/supabase-js": "2.55.0",
"@tanstack/react-query": "5.85.0",
"@tanstack/react-query": "5.85.3",
"@tanstack/react-table": "^8.21.3",
"@types/react": "19.1.9",
"@types/react": "19.1.10",
"@types/react-dom": "19.1.7",
"class-variance-authority": "^0.7.1",
"date-fns": "^4.1.0",
@@ -40,7 +40,7 @@
"react-hook-form": "^7.62.0",
"react-i18next": "^15.6.1",
"sonner": "^2.0.7",
"tailwindcss": "4.1.11",
"tailwindcss": "4.1.12",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.9.2",
"zod": "^3.25.74"