-
Notifications
You must be signed in to change notification settings - Fork 198
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
core.ts does not test whether BigInt exists #750
Comments
What version of Firefox is that built on? MDN says BigInt has been in Firefox since version 68: That's pretty old, from 2019. The Firefox ESR releases have been based on 68 and later since 2019 too: So anything using a Firefox release older than that should upgrade urgently, because at this point there are a lot of important security fixes that they're missing. |
I think they're on esr 60. I currently have bigint aliased to number and that seems to work as a workaround so far but it feels really iffy. |
Cool. I think the right solution here is that Zotero should upgrade to use a version of Firefox that's still supported by Firefox upstream. For Firefox ESR, that's currently Firefox 91: Quite apart from anything to do with ast-types, that's important because Firefox 60 — like any unsupported years-old version of any web browser — has accumulated numerous important security vulnerabilities that have been fixed in current releases. By staying on such an old version, they're putting their users at risk. I'd recommend looking in the Zotero issue tracker to see if they already have an issue for upgrading Firefox. Then upvote that, or bump it if it seems inactive, or file a new issue if there isn't one. Until they do, your workaround sounds like a reasonable one. It's iffy, but not nearly as iffy as using a three-year-old browser version in the first place. |
This is not something I have any influence over. I'll tell them, but don't expect them to move anytime soon. And my worry is that there are libraries that actually use BigInt that could break because I lie to them that BigInt exists when the behavior of BigInt is not according to spec (because it's actually Number). Would anything break in ast-types if I just apply a patch to remove BigInt there? |
https://github.com/benjamn/ast-types/blob/master/def/core.ts#L338 assumes BigInt to exist, but it doesn't in the environment where my code runs (Zotero, which is technically built on firefox ESR), so my code errors out.
The text was updated successfully, but these errors were encountered: