Closed pdehaan closed 9 years ago
Unrelated, but not sure if specifying err
as a Boolean instead of an Error instance is a bit non-standard and may be confusing. But I'm not sure if returning a custom err
with nested error: [...]
and warning: [...]
is more obvious.
I'm seeing an issue where if I use the finepack module API and try and do
console.log(JSON.stringify(messages)
then I get an empty array back instead of a formatted object witherror
,warning
,success
, andinfo
keys.Steps to reproduce:
Here's my index.js file:
And I run it via the CLI (and have to specify
--no-color
otherwise the output gets chalk data in the messages):As you can see, when I use
JSON.stringify()
on themessages
, I get back an empty array. As close as I can tell, this is a slight issue in ./lib/Logger.coffee:10 where the constructor method sets@messages
to an array (@messages = []
), where we probably want that to be an object ({}
). Changing that locally in my ./node_modules/ directory seems to have solved the issue for me.