timkindberg / jest-when

Jest support for mock argument-matched return values.
MIT License
734 stars 38 forks source link

Remove logging functionality and drop bunyan dependency. #85

Closed AndrewSouthpaw closed 2 years ago

AndrewSouthpaw commented 2 years ago

Closes #37.

~Generally seems like bunyan has trouble building on people's machines for reasons that I cannot understand, but given the minor role the logger plays it seems overkill to bring in such a fully-featured logger.~

~I subbed it out with diary, which is super fast, tiny, and does the trick. It creates a scoped logger, which is silent by default, unless you choose to listen to it:~

const { enable } = require('diary')

enable('*') // allow everything
enable('jest-when: my-logger') // allow a specific logger

~If we wanted to move forward with these changes, it'd be worth mentioning the functionality in the README.~

But honestly, I think it'd be better to drop the logger entirely. It's not a feature people know about, and I'm not convinced it's worth keeping a logger around anyway. It just adds another dependency, and I'm not sure anyone would use it.

If @timkindberg agrees, I can completely pull out the logger code so this library stays as slim as possible.

[EDIT]

Based off discussion, changing this PR to fully remove logging functionality and dependencies.

timkindberg commented 2 years ago

Let's just remove it

AndrewSouthpaw commented 2 years ago

Updated!

AndrewSouthpaw commented 2 years ago

Thanks for accepting my PR! This is a great library, and does exactly what I needed. đŸ˜„

timkindberg commented 2 years ago

Hey thanks for the kind words and the contribution!