Refactor causes breaking change
Macavirus opened this issue · 1 comments
Hi,
Some change in the recent days has caused a major regression causing pino-pretty to be unusable.
I'm fairly certain it's related to this change, specifically the addition of the optional chaining operator:
Reproducing:
First, use node 12 using asdf, nvm or another node version manager
echo '{ "level": "DEBUG", "msg": "hola mundo" }' | npx pino-pretty
Result:
npx: installed 38 in 6.709s
Unexpected token '.'
Fix:
I wonder if you would consider changing these back to not use the optional chaining operator. I can make a PR for this if you like. Otherwise it would be great to bump the version as this is a breaking change to (most likely, accidentally) drop node 12 support.
Node v12 is not supported by the latest releases of this module. We don't test against it, so we can't verify it works correctly:
https://github.com/pinojs/pino-pretty/blob/master/.github/workflows/ci.yml