-
Notifications
You must be signed in to change notification settings - Fork 153
Bug: logging fails if input contains bigint values #1117
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
Comments
Hi @Samuel-Sulo, thank you for reporting this issue. Please allow us some time to review it and get back to you. From a quick search it seems that according to the tc39 proposal that introduced support for I'm not sure how I feel about changing the type to @saragerion, would appreciate your POV on this one before deciding if/how to prioritize it. |
For future implementer, unless there's a better option, we have settled on implementing this as converting the number to a string ( If anyone wants to pick this up, please leave a comment here to discuss the changes before opening a PR. |
Hey @dreamorosi I made a quick fix for this and wrote a couple of tests, and I also suggest renaming I also want to do a small refactor of |
Hi @shdq thanks for looking into this one! This is great to hear, please feel free to open a PR with both changes, since they seem to be relatively connected. Just like other instances, I'm more than in favor of reducing/removing dependencies as long as the functionality remains the same, which in this case means the output is the same. Happy to hear also about the extra test cases. Looking forward to review the PR with both changes, no need to do more "paperwork" on this one. But thanks a lot for being considerate and asking! |
|
Bug (logger): logging fails if input contains bigint values
Since
JSON.stringify
is unable to serialize bigint values, the logging function raises an exception if the input contains a bigint value.Expected Behavior
The logger should handle bigints to prevent
JSON.stringify
from raising an exception.Log Request:
Log Result:
Current Behavior
The logger does not handle bigint values which causes
JSON.stringify
to raise an exception.Log Request:
Raised exception:
Possible Solution
Handling bigint values in the
removeCircularDependencies
method of theLogger
class should fix the issue.Before
After
Environment
Related issues, RFCs
The text was updated successfully, but these errors were encountered: