-
Notifications
You must be signed in to change notification settings - Fork 173
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
Use json-bigint
for Integer Parsing
#920
base: master
Are you sure you want to change the base?
Use json-bigint
for Integer Parsing
#920
Conversation
@TorstenDittmann, you okay with taking this approach? |
Can you share more about the issue? What situation does it occur? |
templates/node/package.json.twig
Outdated
"tsup": "7.2.0", | ||
"esbuild-plugin-file-path-extensions": "^2.0.0", | ||
"tslib": "2.6.2", | ||
"typescript": "5.4.2" | ||
}, | ||
"dependencies": { | ||
"json-bigint": "^1.0.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.
Do we need a depencdency? is it possible without?
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.
Yup. I don't think there's a built-in logic for managing big-ints.
The values returned on console are different for min/max due to how PHP and JS round off the int/big int. Values should be - |
Does these changes affect how the Console repo parses the number it receives from the backend? I ask, because in Console we are already receiving the correct number from the backend via JSON - but it is only after it parses it into a |
Yeah, the console SDK is generated using the |
What does this PR do?
Fixes the issue where the big integers are incorrect due to precision loss.
Fixes appwrite/console#1473
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
Have you read the Contributing Guidelines on issues?
Yes