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

fix: don't convert BigInt type to Number before writing to buffer to prevent RangeError #1642

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

paulish
Copy link
Contributor

@paulish paulish commented Jul 3, 2024

Passing big integer values as bigint parameters caused a RangeError with the following message:
RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= -(2n ** 63n) and < 2n ** 63n. Received 9_223_372_036_854_775_808n.

The patch removes this unneeded conversion and instead convert other types to BigInt.

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.42%. Comparing base (3cd7e86) to head (2f63754).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1642   +/-   ##
=======================================
  Coverage   78.42%   78.42%           
=======================================
  Files          93       93           
  Lines        4861     4861           
  Branches      933      934    +1     
=======================================
  Hits         3812     3812           
  Misses        752      752           
  Partials      297      297           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arthurschreiber arthurschreiber merged commit fc4ec02 into tediousjs:master Jul 4, 2024
26 checks passed
@arthurschreiber
Copy link
Collaborator

Thanks! ❤️

Copy link

github-actions bot commented Jul 4, 2024

🎉 This PR is included in version 18.2.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants