Closed Aareksio closed 5 months ago
Attention: 7 lines
in your changes are missing coverage. Please review.
Comparison is base (
39c7199
) 50.73% compared to head (7df105c
) 53.66%.:exclamation: Current head 7df105c differs from pull request most recent head aefac26. Consider uploading reports for the commit aefac26 to get more accurate results
Files | Patch % | Lines |
---|---|---|
src/storage/unstorage.ts | 80.00% | 7 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks!
π Linked issue
https://github.com/nuxt/image/pull/1177
β Type of change
π Description
The
prefix
should not be required.unstorage
is not opinionated about what data type shouldgetItem
/getItemRaw
return (https://github.com/unjs/unstorage/issues/142). This making creating generic wrapper a bit complicated. Sinceipx
requires the data to be aBuffer
, I've added a simple parse attempt in order to normalize error for unsupported storages. The common return data types should be covered:ArrayBuffer
,Buffer
,String
andBlob
.I also found some inconsistencies in
unstorage
drivers, namely http driver throws 404 when a file is not found, instead of returningnull
which seems to beunstorage
convention. This breaks the test. I classify this as a bug in unstorage and keep the test disabled. RunTEST_UNSTORAGE_HTTP=true pnpm test
to see the error.π Checklist
Unstorage support is not documented yet