unjs / consola

🐨 Elegant Console Logger for Node.js and Browser
Other
6.12k stars 175 forks source link

The new underlining feature from #191 is a breaking change #203

Closed trevor-vaughan closed 1 year ago

trevor-vaughan commented 1 year ago

Environment

All

Reproduction

logger = require('consola')

myobj = { foo: 'my_content', bar: 'should_not_be_underlined' }
logger.log(myobj)

3.1.0 Output

{ foo: 'my_content', bar: 'should_not_be_underlined' }

3.2.0 Output

{ foo: 'mycontent', bar: 'shouldnotbeunderlined' }

Describe the bug

The console output from 3.2.0 does not match the output from 3.1.0.

Ideally, fancy formatting would be opt-in instead of opt-out at runtime.

Additional context

No response

Logs

No response

trevor-vaughan commented 1 year ago

Ah, I see that I should use consola/basic instead.

trevor-vaughan commented 1 year ago

Ah, no, I need to re-open this. I want the fancy formatting in terms of error messages, etc. But I definitely do not want object dumps to be processed as "fancy".

trevor-vaughan commented 1 year ago

Hmm...this also causes issues with something as simple as My file names are some_thing.jpg and foo_bar.jpg

I would definitely prefer an opt-in to any delimiter-based options on a per-message basis. Otherwise, any dynamic content could cause a mess on output.

pi0 commented 1 year ago

Sorry for the regression. Fixing soon

image
trevor-vaughan commented 1 year ago

@pi0 No worries, appreciate both the awesome tool and rapid response :-D.

FWIW, I do like the concept that was introduced, I just think that it needs to be selectively opt-in.

pi0 commented 1 year ago

No worries. Can you please test with latest version? Is it still problematic for you?

trevor-vaughan commented 1 year ago

@pi0 Good to go! Appreciate the quick turnaround.