errors: fix ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK
This restores a broken and erroneously removed error, which was accidentially renamed to ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK
(notice the INTST
vs INST
) in 921fb846 (PR #16874) and then had documentation and implementation removed under the old name in 6e1c25c4 (PR #18857), as it appeared unused.
This error code never worked or was documented under the mistyped name
ERR_MISSING_DYNAMIC_INTSTANTIATE_HOOK
, so renaming it back to
ERR_MISSING_DYNAMIC_INSTANTIATE_HOOK
is a semver-patch fix.
Refs: https://github.com/nodejs/node/issues/21440, https://github.com/nodejs/node/pull/21470, https://github.com/nodejs/node/pull/16874, https://github.com/nodejs/node/pull/18857.
This is a part of the fixes hinted by #21470, which includes some tests for error codes usage and documentation and enforces a stricter format.
This is mostly a revert, and specific tests for esm loader actually emitting that error are not included here. Generic tests for error codes are included in a separate PR: #21470.
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