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

Using json-bigint instead of native JSON to fix long integer id's. #154

Merged
merged 1 commit into from
May 28, 2024

Conversation

jbisson
Copy link

@jbisson jbisson commented May 21, 2024

This is to address this specific issue: #125

@markstos
Copy link
Collaborator

Thanks. Can you say more about this change works in testing? Is completely backwards compatible? Does it convert these big numbers into strings?

What can users of this module expect when they upgrade to a version with this change?

@jbisson
Copy link
Author

jbisson commented May 22, 2024

It should be backward compatible yes. The difference is that long ID's will be converted to bigInt class (which support long ID) instead of native javascript integer and their toString() when using it will spit out the proper long integer string representative.

Basically, this change replace the JSON.parse() by the JSONbig.parse() function.

@markstos markstos merged commit 3a078cc into node-strava:main May 28, 2024
@markstos
Copy link
Collaborator

I'll try to get this released this week. Did you see the issue affecting more than Segment Effort IDs in the wild?

@jbisson
Copy link
Author

jbisson commented May 28, 2024

I did not see anything else other than Segment Effort ID's at this point of time but anything that would be using long ID's will have the same issue.

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.

2 participants