Closed ixxie closed 3 years ago
@ixxie thanks for bringing this up and pointing out the new globalThis
support. I've updated the code to check for and use globalThis
first if it's available.
As for es5-ext, it still gets 10,643,967 weekly downloads according to npm, so I wouldn't exactly call it dead. It's one of those types of projects that, once it's done, working, and stable, probably doesn't really require much ongoing change or maintenance. This situation, however, may be an exception to that. Let me know if websocket-node v1.0.34 resolves your issue.
@theturtle32 thanks for the rapid response! This resolves the issue successfully, although now I am running into challenges relating to ESM interoperability (but this is a different scope - I will raise a different issue if appropriate).
I've been trying to isolate an issue which occurs when I try to use @supabase/supabase-js in SvelteKit; it appears
supabase-js
useswebsocket
, which uses es5-ext to try and robustly identify aglobalThis
across browsers in this block of code:Unfortunately, this fails in SvelteKit:
To reproduce this, run the following in an empty folder:
It seems
es5-ext
is a dead project; at least it hasn't had any Github activity in the last year. I noticed the seems to be globalThis support in all major browsers since spring of 2019 (except Edge, which got support in January 2020); perhaps this could resolve the issue?