report: modify getReport() to return an Object
It's likely that anyone using process.report.getReport()
will be
processing the return value thereafter (e.g., filtering fields or
redacting secrets). This change eliminates boilerplate by calling
JSON.parse()
on the return value.
Also modified the validateContent()
and validate()
test helpers in
test/common/report.js
to be somewhat more obvious and helpful. Of
note, a report failing validation will now be easier (though still not
easy) to read when prepended to the stack trace.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
NOTE: This is a breaking change against an experimental API; I don't understand if this must wait for a major release?