Lombiq / NodeJs-Extensions

Utilities and extensions for Node.js, used in ASP.NET (Core) MVC and Orchard (Core) CMS development.
BSD 3-Clause "New" or "Revised" License
7 stars 2 forks source link

Remove the `chalk` dependency from scripts\handle-error.js (OSOE-568) #30

Closed 0liver closed 1 year ago

0liver commented 1 year ago

Error handling has to be reliable. The mentioned script should be such a reliable component, so let's remove any external dependencies so it won't break.

To achieve that, extract the output coloring of warnings and errors into an optional "formatter" callback that can be passed by the caller. In the calling script, chalk should be a non-optional dependency again.

Note: The manual output coloring is only necessary when executing NE scripts in the VS Task Runner Explorer. Everywhere else it works out of the box.

Jira issue

0liver commented 1 year ago

We've decided to leave it at the optional chalk dependency.