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

Avoid BigInt literals as JSC/Android doesn't support it #6289

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

kneth
Copy link
Contributor

@kneth kneth commented Nov 29, 2023

What, How & Why?

BigInt literals (integers postfixed with n) are not support on JSC/Android.

This closes #6194

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 📝 Update COMPATIBILITY.md
  • 🚦 Tests
  • 📦 Updated internal package version in consuming package.jsons (if updating internal packages)
  • 📱 Check the React Native/other sample apps work if necessary
  • 💥 Breaking label has been applied or is not necessary

Copy link

Coverage Status

coverage: 86.182%. remained the same
when pulling 4fc074f on kneth/bug/bigint-literal
into 0e6a215 on main.

Copy link
Member

@kraenhansen kraenhansen left a comment

Choose a reason for hiding this comment

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

Great find!

@kneth kneth merged commit 21da553 into main Nov 29, 2023
33 checks passed
@kneth kneth deleted the kneth/bug/bigint-literal branch November 29, 2023 12:11
@kraenhansen
Copy link
Member

@kneth perhaps we should add a lint rule to avoid similar regressions in the future?

@kneth
Copy link
Contributor Author

kneth commented Dec 6, 2023

It might be a good idea

@kraenhansen
Copy link
Member

Digging around I couldn't find a standard rule detect this, but it seems the Node driver team had the same problem and created this https://github.com/mongodb/js-bson/tree/main/etc/eslint/no-bigint-usage

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No identifiers allowed directly after numeric literal
2 participants