File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 44
55The npm package size has been greatly reduced.
66
7- ## Pretty-printing
8-
9- Errors are not pretty-printed anymore. As a consequence, the ` colors ` option was
10- removed.
7+ ## Custom logic
118
12- The [ ` onError ` option] ( README.md#onerror ) can be used instead to customize how
13- the errors are printed. It receives the original process error . The process
14- error event is now passed as a second argument instead of being set as
9+ The ` log ` option was renamed to [ ` onError ` ] ( README.md#onerror ) . Its arguments
10+ are ` (originalError, event) ` instead of ` (error, level, originalError) ` . The
11+ process error ` event ` is now passed as a second argument instead of being set as
1512` error.name ` .
1613
1714Before:
@@ -38,12 +35,16 @@ logProcessErrors({
3835})
3936```
4037
38+ ## Pretty-printing
39+
40+ Errors are not pretty-printed anymore. As a consequence, the ` colors ` option was
41+ removed. The [ ` onError ` option] ( README.md#onerror ) can be used instead to
42+ customize how the errors are printed.
43+
4144## Filtering
4245
43- The ` levels ` option was removed. As a consequence, the arguments of the
44- [ ` onError ` option] ( README.md#onerror ) (previously named ` log ` ) are now
45- ` (originalError, event) ` instead of ` (error, level, originalError) ` . This option
46- can be used for filtering instead.
46+ The ` levels ` option was removed. The [ ` onError ` option] ( README.md#onerror ) can
47+ be used for filtering.
4748
4849Before:
4950
You can’t perform that action at this time.
0 commit comments