fastify-metrics
fastify-metrics copied to clipboard
use new route attributes
Hi. Thanks for contribution.
Could you check what's failing with types, maybe you forgot to add the config
to fastify route options interface?
Also can you please format your commit message according https://www.conventionalcommits.org/en/v1.0.0/ guide. It's needed to make proper changelogs. And since it's kind-of breaking change don't forget to add that to commit message as well.
Closes #86
Thank you for doing this.
I think the type error is because request.routerPath
should be replaced with request.routeOptions.url
(instead of request.routeOptions.config.url
). They adjusted the deprecation warning with this information in https://github.com/fastify/fastify/pull/5032
Hey, @gugu. I've recently merged less breaking PR #88 and released as 10.3.1. Can you check if your case also solved?
If so, for version 10.x.x, we'll keep the change from PR #88 and will follow your approach with version 11.x.x which will be likely target fastify 5, node 18+ and other potentially breaking things.
hi @SkeLLLa, with 10.3.1 I still get the deprecation warnings. Node 18 / fastify 4.23.2. Using #89, which seems like a small change, the error disappears.
Fastify v5 released and old methods removed.