bjerkio / nestjs-slack

Lightweight library to use Slack in NestJS applications.
Apache License 2.0
51 stars 18 forks source link

Remove Google Cloud logger dependency? #325

Open bneigher opened 1 year ago

bneigher commented 1 year ago

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.

simenandre commented 1 year ago

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?

bneigher commented 1 year ago

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 commented 1 year ago

nvmd, fixed tests