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

chore: use safe stringify in http transport #2043

Merged
merged 5 commits into from
Jan 25, 2022

Conversation

karlwir
Copy link
Contributor

@karlwir karlwir commented Jan 25, 2022

Hello,

  • Solving the issue when stringifying circular structures in http transport.
  • Test added

Issue:
#1946

@DABH
Copy link
Contributor

DABH commented Jan 25, 2022

@karlwir I think we should use safe-stable-stringify per winstonjs/logform#98 -- what do you think?

@karlwir
Copy link
Contributor Author

karlwir commented Jan 25, 2022

@DABH Agree, my mistake. PR updated.

Copy link
Contributor

@DABH DABH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me and this is consistent with the changes we made in logform, so I'm okay with merging this. Thanks!

@DABH DABH merged commit d18198d into winstonjs:master Jan 25, 2022
@karlwir karlwir deleted the bugfix-httptransport-circular-json branch January 26, 2022 06:46
@chris-packett
Copy link

I love you @karlwir

I needed this fix today 😆

@SamuelGaona
Copy link

SamuelGaona commented Mar 1, 2022

Hi! Im getting

TypeError: stringify.configure is not a function at Format.transform (/node_modules/logform/json.js:27:35)

I'm using winston 3.6.0 and morgan 1.10.0

On Windows it works properly, but on linux breaks.

@wbt
Copy link
Contributor

wbt commented Mar 1, 2022

Thanks for reporting that. The OS difference initially makes me wonder if there might be a filename reference with incorrect casing somewhere.

@SamuelGaona
Copy link

It wasnt happening on winston@3.5.1, tho.

@wbt
Copy link
Contributor

wbt commented Mar 1, 2022

It's definitely possible that the issue was newly introduced, and knowing that is quite helpful. I was just offering another signpost to possibly help with debugging as I don't have the time to do a full debug on it at the moment.

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

5 participants