immobiliare / fastify-sentry

🚧 Sentry errors handler for fastify that just works! Install, add your DSN and you're good to go!
MIT License
88 stars 12 forks source link

Types break when using with typescript #615

Closed shoxsz closed 1 year ago

shoxsz commented 1 year ago

Hello guys, just wanted to let you know about an issue with typescript types for this module, when using moduleResolution: Node16 it causes some errors when trying to import the default exported fastify plugin callback, you can check this out here https://arethetypeswrong.github.io/?p=%40immobiliarelabs%2Ffastify-sentry%406.0.10

dnlup commented 1 year ago

Thank you @shoxsz , I'll take a look at it. Apologies for the late response.

simonecorsi commented 1 year ago

:tada: This issue has been resolved in version 7.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

nnennajohn commented 1 year ago

Hi @simonecorsi ,

I get an error that the dsn property does not exist in the plugin option. You can also see that it is not declared in the published types for 7.0.0.

Was this missed?

Thanks.

Screenshot 2023-08-26 at 6 07 02 PM
dnlup commented 1 year ago

Hi @simonecorsi ,

I get an error that the dsn property does not exist in the plugin option. You can also see that it is not declared in the published types for 7.0.0.

Was this missed?

Thanks.

Screenshot 2023-08-26 at 6 07 02 PM

Hi @nnennajohn , thank you for reporting this. I think I missed it in this latest release. I'll fix it

dnlup commented 1 year ago

So, I definitely missed to extend the Sentry.NodeOptions interface.

Strangely I am getting errors anyway, also using the previous release

Screenshot 2023-08-28 alle 12 08 08

and this is confusing me 🤔

dnlup commented 1 year ago

Ok, it seems I found the problem

simonecorsi commented 1 year ago

:tada: This issue has been resolved in version 7.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

dnlup commented 1 year ago

@nnennajohn Let me know if there are still issues with types, thanks again 😉

nnennajohn commented 1 year ago

Great. Thanks so much. Will update and test it out.