[v8.x backport] backport 17338, 18186, 18358, 18546
- Only two commits from https://github.com/nodejs/node/pull/18546 are backported.
- Only the lazy loading util part of https://github.com/nodejs/node/pull/18358 is backported since ERR_INVALID_ARG_VALUE does not exist on v8.x
-
util: implement util.getSystemErrorName()
is semver-minor
src: expose uv.errmap to binding Refs: https://github.com/nodejs/node/pull/17338
util: implement util.getSystemErrorName() Refs: https://github.com/nodejs/node/pull/18186
errors: lazy load util in internal/errors.js Refs: https://github.com/nodejs/node/pull/18358
util: skip type checks in internal getSystemErrorName errors: move error creation helpers to errors.js Refs: https://github.com/nodejs/node/pull/18546