Open oitan opened 1 month ago
Thank you for this PR, the only one thing that disturbs me is that this feature was introduced in pino-http@v8.5.0, but in current package-json we support pino-http since v6.4.0. So, I believe it could be an error for users with outdated versions, to check that we need to provide pino-http versions as well for the CI tests here and here, and after we can decide if this is a breaking change or not, and based on that we will release this feature in a new major or fix version
I have added v6.4, v7, v8, v9, v10 into pino-http-version
field of the matrix (and disabled other github action jobs, only build-lint-test is active for faster testing purposes). As you can see, all the other ones are failed except for version 10. I don't know what it means, since you said that we support from v6.40.I don't think the code I have changed affected the tests, since generic defaults for Params
are the same as generic defaults for Options
of pinoHttp
field. So I guess those are general breaking change issues between versions. Should I try to run the tests without my changes as well? Will it help to understand the situation?
In the image in the jobs list, the right-most number in braces are the pino-http-version
values.
Thanks, will get back to this soon
have removed my changes to see the gh action result. still seems to be the same.
Thanks, will get back to this soon
@iamolegga just let me know if I can do something else or check something. I am happy to finish this PR or close it if it doesn't work at this particular moment. I understand that you are busy, and I am happy to do all the necessary checks, test hypotesis, etc. Just guide me a little bit please :)
@oitan thanks, just give me a couple of days, I'll check everything on my own and we will merge it
when trying to use express
Request
andResponse
forpinoHttp
options, TypeScript argues that they should be of typeIncomingMessage
andServerResponse
(the default ones). This make generics forpinoHttp
available again inside ofParams
type.Code:
TS Error:
PRs solution allow to which resolves the issue: