-
Notifications
You must be signed in to change notification settings - Fork 593
fix: stringify all bigints in pino-logger #20303
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
base: merge-train/spartan
Are you sure you want to change the base?
Conversation
bae35a3 to
30fedcf
Compare
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
| /** | ||
| * Converts bigint values to strings recursively in a log object to avoid serialization issues. | ||
| */ | ||
| function convertBigintsToStrings(obj: unknown): unknown { |
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.
Can this reuse the other convert function?
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.
yeah definitely an oversight here.. They should be using the same
| /** | ||
| * Converts bigint values to strings recursively in a log object to avoid serialization issues. | ||
| */ | ||
| function convertBigintsToStrings(obj: unknown): unknown { |
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 have to use unknowns here?
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.
because this is used for logging I don't think there's much point typing this. It can be pretty much anything and result also depends on input so using unknown is safer
Fixes A-495