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

feat: prevent objects with serializers from being trimmed #75

Merged
merged 3 commits into from
Apr 25, 2023

Conversation

samchungy
Copy link
Contributor

Purpose

Fastify request/response objects are classes with getters, which rely on serializers to call them. The dtrim library was previously destroying the classes before they reach the serializer. This change prevents any objects/classes with a serializer from being trimmed.

Approach

  • Bump dtrim to version which includes a retain option.
  • Bump pino-std-serializers to add errWithCause serializer.

Notes

Adding stdSerializers directly to the serializers were adding non serializers to pino. https://github.com/pinojs/pino-std-serializers/blob/986ef19e19b9d68c2e821d948f066362a4f82311/index.d.ts#L109

Issues

@samchungy samchungy changed the title fix: prevent objects with serializers from being trimmed feat: prevent objects with serializers from being trimmed Apr 25, 2023
@samchungy samchungy merged commit 3d27047 into master Apr 25, 2023
@samchungy samchungy deleted the dtrim-bump branch April 25, 2023 23:37
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.

None yet

3 participants