fix: handle missing route options#236
Conversation
jean-michelet
left a comment
There was a problem hiding this comment.
I am unable to reproduce the bug from the repository you linked in the issue.
You should first write a test that fails in order to prove the existence of the bug, then write the fix that make it pass.
Please check fastify version. It should be 4.0.0-4.22.0 to reproduce the bug. I can't write tests because of it. |
|
I think it is possible to run versioned tests in a child process, but I am not sure that this is something we usually do. |
It could be useful, but I'm not sure too. Usually I'm doing this with docker-compose, but I it requires changes in CI pipeline. |
|
Yeah #228 was breaking for v8 (Fastify v4 line) actually, it should have considered the then-deprecated setting as well instead of just changing to routeOptions |
|
Can we merge this? |
Fixes #232
in fastify < 4.10 req in onRequest hook didn't have
routeOptionsat all - PRin fastify < 4.23
routeOptionsdidn't haveconfigproperty - PRI handled both cases to keep compatibility, but I don't know how add tests for it. Do you have any suggestions?
Checklist
npm run testandnpm run benchmarkand the Code of conduct