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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using BigInt constructor for compatibility. #216

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

anicolao
Copy link
Contributor

@anicolao anicolao commented Sep 7, 2022

No description provided.

Copy link
Contributor

@rokicki rokicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does enhance the ability to find BitInt stuff in the code. I'm pretty sure typescript "does the right thing" here with respect to literals but even if it doesn't, it's not going to affect performance.

@rokicki rokicki merged commit 518ef14 into cubing:main Sep 7, 2022
@lgarron
Copy link
Member

lgarron commented Sep 9, 2022

Thanks! I'm glad this is such a simple fix.

I will maintain that projects like Vite are broken if they break big int code, given that it's been available in all environments for 2 years: https://caniuse.com/?search=bigint (See vitejs/vite#9062 for more context, where it seems that their lack of big int compat is accidental, not on purpose.)
For that reason, I'm generally against workarounds like this in our codebase. But I think this one is definitely worth it, thanks for looking into it!

@lgarron
Copy link
Member

lgarron commented Sep 9, 2022

Published as part of v0.29.1! 馃槃
https://github.com/cubing/cubing.js/releases/tag/v0.29.1

@anicolao
Copy link
Contributor Author

anicolao commented Sep 9, 2022

Even after reading that thread I don't understand why there are two different environments to configure for vite - the optimizeDeps vs the build ... but in any event I'm glad to have the workaround in 0.29.1! Thanks.

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

3 participants