fastify-metrics icon indicating copy to clipboard operation
fastify-metrics copied to clipboard

use new route attributes

Open gugu opened this issue 1 year ago • 5 comments

gugu avatar Sep 12 '23 15:09 gugu

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 avatar Sep 13 '23 08:09 SkeLLLa

Closes #86

SkeLLLa avatar Sep 13 '23 09:09 SkeLLLa

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

dariacm avatar Sep 14 '23 10:09 dariacm

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.

SkeLLLa avatar Sep 18 '23 20:09 SkeLLLa

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.

pvanagtmaal avatar Sep 20 '23 11:09 pvanagtmaal

Fastify v5 released and old methods removed.

SkeLLLa avatar Sep 20 '24 15:09 SkeLLLa