Ask questionsLoader Hooks
Hooking into the dependency loading steps in Nodejs should be easy, efficient, and reliable across CJS+ESM. Loader hooks would allow for developers to make systematic changes to dependency loading without breaking other systems.
It looks like discussion on this topic has died down, but I'm really interested in loader hooks and would be excited to work on an implementation! There's of prior discussion to parse through, and with this issue I'm hoping to reignite discussion and to create a place for feedback.
Some of that prior discussion:
here is a link to the design doc
Answer questions SMotaal
is there a simpler term for "attenuated"? … discussion gets drowned a bit in "big words".
attenuated here has a distinct concept which I myself only recently was introduced to… from object capabilities (ie SES/Realms weekly meeting) describe this as the process of taking something with a greater degree of authority than necessary for the consumers to function correctly and limiting it to exactly what is needed for security (ie rouge code).
So as @bmeck describes, it functionally is <ins>creating some customized view of (altered maybe a good suggestion imho to make it the alternative of)</ins> the module, but an important aspect for attenuation is that it presumes that the realm/compartment <ins>would not still somehow refer to the original module's namespace</ins>
Note: I think this is important enough in that <ins>it is different from how other altered</ins> modules <ins>might generally still</ins> coexist <ins>in the respective container(s) while</ins> attenuated ones should not.