Skip to content

Refactoring some more file IO to bun - #79

Open
maximehuylebroeck wants to merge 1 commit into
gornostay25:mainfrom
maximehuylebroeck:main
Open

Refactoring some more file IO to bun#79
maximehuylebroeck wants to merge 1 commit into
gornostay25:mainfrom
maximehuylebroeck:main

Conversation

@maximehuylebroeck

Copy link
Copy Markdown

Hi,

Noticed there were some more node file based statements still in the code.
I've refactored these and tested the adapter with the demo example.

@gornostay25
gornostay25 self-requested a review October 27, 2025 12:56

@gornostay25 gornostay25 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for your interest in svelte-adapter-bun!
Please take a look at the previous commit — several users tried running the adapter with Node.js (#76), which caused errors.
Because of that, I reverted back to using the Node.js file handling methods instead of the Bun API read and write.

@maximehuylebroeck

Copy link
Copy Markdown
Author

Hi, thank you for the quick response. This is very interesting to me. What is the point of having a bun adapter if people are still using it with nodejs. That is like requesting the adapter vercel to be compatible with cloudflare. If there is no way of changing your mind in this specific topic. I think I can make it work with both. Although to me this is very counter intuitive. Let me know what you think of this.

@gornostay25

gornostay25 commented Oct 27, 2025

Copy link
Copy Markdown
Owner

@maximehuylebroeck I think it's more like you're working on aarch64 machine and build code for x86, i mean doesnt Bun have custom implementation of fs under hood? so its the same efficiency but different interface

@nmontavon

Copy link
Copy Markdown

It might be a very light translation layer, but I too don't think supporting node makes a lot of sense here. The future might bring more benefits from a native Bun.file implementation.

I think we should always strive to get as close to bun native as is possible! ;)

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.

3 participants