-
Notifications
You must be signed in to change notification settings - Fork 124
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
Make handling of long numerals an option that is disabled by default #557
Make handling of long numerals an option that is disabled by default #557
Conversation
30467b0
to
2629b6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this? What are the downsides of always serializing long numerals correctly?
What do you think about calling this serializeLongNumerals
?
This PR needs an update to USERS_GUIDE, too, please.
2629b6b
to
df14ac3
Compare
Also: * Strengthen the tests * update USER_GUIDE.md Signed-off-by: Miki <miki@amazon.com>
df14ac3
to
c6d1642
Compare
It is possible that users have adapted their logic to having imprecise numbers and are not ready to accept BigInts. One could argue that what we release in 2.3.0 was an enhancement but some could also argue that by successfully serializing BigInts (and not throwing) and deserializing long numerals into BigInts, we broke status quo and went against the universally known limitation of
We could surely name it
Done. |
Change LGTM. Since this is breaking what do we want to do about semver? @wbeckler |
looks like we need a 2.3.1 release |
Can someone ELI5 why this is a breaking change? |
Unless I misunderstood something, we released 2.3.0 where the handling of long numerals is enabled by default, and 2.3.1 would disable it by default. |
…557) (#561) Also: * Strengthen the tests * update USER_GUIDE.md (cherry picked from commit 08069bc) Signed-off-by: Miki <miki@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add upgrading NPM to all workflows running older Node.js versions (#545) (#553) Also: * Add compatibility checks for Node.js v18 * Bump `actions/setup-node` to v3 Signed-off-by: Miki <miki@amazon.com> * Add serialization and deserialization of numerals larger than `Number.MAX_SAFE_INTEGER` (#544) (#554) Signed-off-by: Miki <miki@amazon.com> * Version Bump: 2.3.0 (#546) (#555) Signed-off-by: Theo Truong <theotr@amazon.com> * Make handling of long numerals an option that is disabled by default (#557) (#561) Also: * Strengthen the tests * update USER_GUIDE.md (cherry picked from commit 08069bc) Signed-off-by: Miki <miki@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Version Bump: 2.3.1 Signed-off-by: Theo Truong <theotr@amazon.com> --------- Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Theo Truong <theotr@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Miki <miki@amazon.com> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
This change adds a config param named
enableLongNumeralSupport
which isfalse
by default and users who wish to deal with precise long numerals can enable it.This change needs to be added to the docs
Check List
yarn run lint
doesn't show any errorsBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.