Repository navigation
Update log.js to support async reporter plugins - #71
Conversation
Async reporters can be easily supported by `await`ing the reporter function.
remcohaszing
left a comment
There was a problem hiding this comment.
I see why this is useful. The types need to be updated though.
ESLint 8 also added support for async reporters.
|
I am getting type errors on Not sure I can get this PR passing until main is working... |
|
Can you add a test? (https://github.com/unifiedjs/unified-engine/blob/main/test/reporting.js) This should perhaps also be added to https://github.com/vfile/vfile/blob/03efac7cc3a67fe33bb7a0f1de29e17be322549e/lib/index.js#L46 |
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #71 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 23 23
Lines 2555 2555
=========================================
Hits 2555 2555
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
@wooorm Test added and passing |

Async reporters can be easily supported by
awaiting the reporter function.Initial checklist
Description of changes
Log.js can easily support sync reporter plugins by awaiting the reporter function. Currently the reporter function is called as a sync function.
Example: vfile-reporter-junit
https://github.com/kellyselden/vfile-reporter-junit/blob/master/index.js