nestjs-slack icon indicating copy to clipboard operation
nestjs-slack copied to clipboard

Remove Google Cloud logger dependency?

Open bneigher opened this issue 2 years ago • 3 comments

I'm wondering if having the Google Cloud logger as a dependency is really neccessary? It's adding a few Mb to my lambda bundle which is a bit large for a lightweight slack nestjs wrapper. Is it possible to remove that with the default nestjs logger? I feel like that would make this a bit more nestjs friendly.

bneigher avatar Sep 21 '23 03:09 bneigher

Yes, I think that is doable.

We probably rid ourselves of some of the types used there or copy them over. The dependency can be moved as a peer dependency or potentially dropped in favour of writing it ourselves. Especially considering that we are not using any of the Google Cloud-logger request bits (meaning where we send logs directly to Google Cloud Logger). We're just using the form and types.

Are you up for creating a PR on this?

simenandre avatar Sep 27 '23 06:09 simenandre

I was unable to run the tests unfortunately... node-fetch / esm vs commonjs issues? But here we go!

https://github.com/bjerkio/nestjs-slack/pull/326 @simenandre

bneigher avatar Sep 27 '23 18:09 bneigher

nvmd, fixed tests

bneigher avatar Sep 27 '23 18:09 bneigher