-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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: invalid float number format by json-bigint #21968
fix: invalid float number format by json-bigint #21968
Conversation
cc: @zhaoyongjie |
Codecov Report
@@ Coverage Diff @@
## master #21968 +/- ##
==========================================
- Coverage 66.96% 66.95% -0.01%
==========================================
Files 1807 1807
Lines 69221 69241 +20
Branches 7402 7407 +5
==========================================
+ Hits 46352 46363 +11
- Misses 20964 20969 +5
- Partials 1905 1909 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Can you add a link to the forked repo and npm package? |
npm package: https://www.npmjs.com/package/json-bigint-native |
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.
LGTM with a remark/question
@@ -145,6 +145,7 @@ | |||
"js-levenshtein": "^1.1.6", | |||
"js-yaml-loader": "^1.2.2", | |||
"json-bigint": "^1.0.0", | |||
"json-bigint-native": "^1.2.0", |
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.
If json-bigint
is no longer maintained, can we remove that dep (on line 147)?
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.
Since the json-bigint-native says that added TypeScript types, the line 43 also need to be removed.
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.
will follow up with this
(cherry picked from commit 3bb9187)
This reverts commit 3bb9187.
(cherry picked from commit 3bb9187)
SUMMARY
This commit fixes the regression from #21937
There's a known issue for floating value formatting on current latest version of
json-bigint
open source.Since the main contributor no longer maintain the new release, this commit replaces the open-source library by
json-bigint-native
which is branched out fromjson-bigint@1.0.0 (latest version)
and fixes the known bugs including float value issue.This commit also adds the extra specs to verify the floating value formatting.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: (returns NaN values)
After:
TESTING INSTRUCTIONS
Create a chart with floating numbers
ADDITIONAL INFORMATION