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

fix: support for bun/deno via node codepath #101

Closed
wants to merge 1 commit into from

Conversation

sgammon
Copy link

@sgammon sgammon commented Feb 14, 2025

This PR adds detection code for Bun and Deno, and uses fs.readFile for these platforms as is already done on Node. The fs module name carries the node: prefix which works on both Bun and Deno.

Fixes and closes #100

This PR adds detection code for Bun and Deno, and uses `fs.readFile` for
these platforms as is already done on Node. The `fs` module name carries
the `node:` prefix which works on both Bun and Deno.

Fixes and closes sqlite#100
@sgammon
Copy link
Author

sgammon commented Feb 14, 2025

Working for me downstream with Bun, using pnpm patch cc / @tomayac

If there is a better upstream repo to contribute this to, please let me know :)

@sgbeal
Copy link
Collaborator

sgbeal commented Feb 14, 2025

This patches Emscripten-generated code, so would be overwritten on every build and could be invalidated by changes in any given Emscripten version. This would need to be fixed in the Emscripten project, not this one.

@tomayac
Copy link
Collaborator

tomayac commented Feb 14, 2025

@sgammon, thanks for this contribution, but as @sgbeal said, this would need fixing in Emscripten. From a quick cursory search, maybe emscripten-core/emscripten#12203 is interesting?

@tomayac tomayac closed this Feb 14, 2025
@sgammon
Copy link
Author

sgammon commented Feb 14, 2025

Thanks guys. I hadn't noticed this was generated code under edit. Cheers

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.

Usage with Bun/Deno
3 participants