SkeLLLa / fastify-metrics

Prometheus metrics exporter for Fastify
https://savelife.in.ua/en/donate-en/
MIT License
96 stars 33 forks source link

use new route attributes #87

Open gugu opened 1 year ago

SkeLLLa commented 1 year ago

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.

SkeLLLa commented 1 year ago

Closes #86

dariacm commented 1 year ago

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

SkeLLLa commented 1 year ago

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.

pvanagtmaal commented 1 year ago

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.