Skip to content

Commit 25fc7bc

Browse files
authored
chore: update to @cloudinary-util/util v4 (#163)
1 parent 048d3fe commit 25fc7bc

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

.changeset/loud-bobcats-repair.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte-cloudinary": minor
3+
---
4+
5+
feat: better error message is logged when an image fails to load

packages/svelte-cloudinary/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"dependencies": {
5858
"@cloudinary-util/types": "^1.5.10",
5959
"@cloudinary-util/url-loader": "^5.10.4",
60-
"@cloudinary-util/util": "^3.3.2",
60+
"@cloudinary-util/util": "^4.0.0",
6161
"@unpic/svelte": "0.0.53",
6262
"defu": "^6.1.4"
6363
},

packages/svelte-cloudinary/src/components/CldImage.svelte

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,17 @@
7474
return;
7575
}
7676
77-
const success = await pollForProcessingImage({ src });
77+
const result = await pollForProcessingImage({ src });
7878
79-
console.warn(
80-
'[svelte-cloudinary]',
81-
success ? 'successfully loaded' : 'failed to load',
82-
'image',
83-
);
84-
85-
if (success) {
79+
if (result.success) {
8680
// Force image to update
8781
key++;
82+
} else {
83+
console.warn('[svelte-cloudinary] Failed to load image:', {
84+
src: props.src,
85+
error: result.error,
86+
status: result.status,
87+
});
8888
}
8989
}
9090
</script>

pnpm-lock.yaml

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)