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: Uint8Array check #57

Closed
wants to merge 1 commit into from
Closed

fix: Uint8Array check #57

wants to merge 1 commit into from

Conversation

janek26
Copy link

@janek26 janek26 commented May 15, 2023

This fixes issue #48

Firefox has the same issue as jest, so this will make the lib work in firefox.

@paulmillr
Copy link
Owner

Firefox does not have this issue, otherwise we'd have spotted this a long time ago. Proof:

Screenshot 2023-05-15 at 9 38 12 PM

@janek26
Copy link
Author

janek26 commented May 15, 2023 via email

@paulmillr
Copy link
Owner

I didn't know about the bug. That makes sense.

I would of course prefer a generic solution that would allow the u8a check to be carried in various similar contexts, but the question is: which other contexts are we looking for?

Firefox extensions is a big one that absolutely warrants your fix.

JSDOM is meh, not too important.

Web Workers are important.

Anything else I could be missing?

@janek26
Copy link
Author

janek26 commented May 15, 2023

not sure honestly, probably edge envs like cloudflare and vercel

We just discovered this by accident. Also this does not fix the comparison, but the produced value. So if the value comes from something different than this lib, it will fail again/needs to be casted

@janek26
Copy link
Author

janek26 commented May 15, 2023

as inspiration: https://github.com/panva/jose#supported-runtimes

@janek26
Copy link
Author

janek26 commented May 16, 2023

we'll keep using patch-package for now, up to you what to do with this @paulmillr

@paulmillr
Copy link
Owner

Fixed by myself, thanks

@paulmillr paulmillr closed this Jun 2, 2023
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.

None yet

2 participants