sqlitecloud / sqlitecloud-js

Javascript drivers for SQLiteCloud
https://sqlitecloud.github.io/sqlitecloud-js/
MIT License
16 stars 0 forks source link

tests/why is bun tls socket is undefined? #121

Closed Gioee closed 2 weeks ago

Gioee commented 2 weeks ago

In bun (and I'm pretty sure this happens also with deno) if you raw import our driver as the non compiled version you'll get the socket variable as undefined both in the TlsConnection and the WebsocketConnection classes. This happens because the tls and socket modules we're using in the driver are node specific. When an user uses our driver he's using the compiled version we're shipping to npm, and when you use this version with deno and bun they're going to do their replacement of these modules automatically like they do with all the other dependency their users are using.