process: change default --unhandled-rejections=strict
This is a semver-major change that resolves DEP0018.
This commit also adds a new --unhandled-rejections=warn-unhandled
option, which mimics the previous default behavior. When using
warn-unhandled
, a warning is emitted only if the unhandledRejection
hook fails to handle the event. The behavior of warn
, unchanged in
this commit, is to omit a warning no matter whether the
unhandledRejection
hook is set.
Fixes: https://github.com/nodejs/node/issues/20392 Refs: https://nodejs.org/dist/latest/docs/api/deprecations.html#deprecations_dep0018_unhandled_promise_rejections
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