Commit Graph
3 Commits
Author SHA1 Message Date
Joyee Cheung 41fa7d3c21 module: allow omitting context in synchronous next hooks
This aligns the behavior of synchronous hooks with asynchronous
hooks by allowing omission of the context parameter in the
invocation of next hooks. The contexts are merged along the
chain.

PR-URL: https://github.com/nodejs/node/pull/57056
Fixes: https://github.com/nodejs/node/issues/57030
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-17 10:50:58 -03:00
Jacob Smith eff42956c4 doc: correct customization hook types & clarify descriptions
PR-URL: https://github.com/nodejs/node/pull/56454
Backport-PR-URL: https://github.com/nodejs/node/pull/57130
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-03-31 20:38:20 -03:00
Joyee Cheung b2e44a8079 module: implement module.registerHooks()
PR-URL: https://github.com/nodejs/node/pull/55698
Backport-PR-URL: https://github.com/nodejs/node/pull/57130
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2025-03-31 20:38:09 -03:00