This hook is extremely confusing, even for maintainers.
The replacement needs to address:
Assuming there is 1 loader worker.
Spit-balling ideas:
- expose a message port on
node:module
- return a message port from
register()
Will a message port need to be refreshed?
@giltayar,I would be very interested in your thoughts (or even a design proposal) for this, especially because you recently handled this in testdouble, so the pain is fresh 😅
This hook is extremely confusing, even for maintainers.
The replacement needs to address:
process.argv) as identified by ESM loader v20.3.0 access parent path help#4190 (eg an ESM equivalent ofrequire.main)Assuming there is 1 loader worker.
Spit-balling ideas:
node:moduleregister()Will a message port need to be refreshed?
@giltayar,I would be very interested in your thoughts (or even a design proposal) for this, especially because you recently handled this in testdouble, so the pain is fresh 😅