Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support raw conversion in envs without Buffer #364

Merged
merged 5 commits into from
Dec 18, 2024
Merged

Conversation

itpropro
Copy link
Member

@itpropro itpropro commented Jan 2, 2024

πŸ”— Linked issue

#142

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Replaced Buffer with native implementation to also run on workers and other environments. It's also faster than Buffer, but in the context of unstorage, the improvement is not significant.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@itpropro itpropro requested a review from pi0 January 2, 2024 17:05
@itpropro
Copy link
Member Author

itpropro commented Jan 2, 2024

The netlify tests seem to be very flaky and slow, we should probably disable them (95% of them ran into timeout on my machine) until the driver is fixed or a faster way of testing is found.

@GalacticHypernova
Copy link
Contributor

GalacticHypernova commented Jan 21, 2024

How would this translate to getItemRaw with the web streams? Would it still be possible for the response of the image to be automatically rendered correctly as an image on the browser?

src/_utils.ts Outdated Show resolved Hide resolved
@pi0 pi0 marked this pull request as draft May 1, 2024 10:21
@pi0 pi0 changed the title feat(raw): Replaced Buffer serializer to improve portability feat: support raw conversion in envs without Buffer Dec 18, 2024
src/drivers/http.ts Outdated Show resolved Hide resolved
Copy link

cloudflare-workers-and-pages bot commented Dec 18, 2024

Deploying unstorage with Β Cloudflare Pages Β Cloudflare Pages

Latest commit: c40ce80
Status:Β βœ…Β  Deploy successful!
Preview URL: https://bde626c3.unstorage.pages.dev
Branch Preview URL: https://feat-serializer.unstorage.pages.dev

View logs

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ❀️

@pi0 pi0 marked this pull request as ready for review December 18, 2024 18:48
@pi0 pi0 merged commit a2d4882 into main Dec 18, 2024
3 checks passed
@pi0 pi0 deleted the feat/serializer branch December 18, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants