profile
viewpoint

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:


edit (mylesborins)

here is a link to the design doc

https://docs.google.com/document/d/1J0zDFkwxojLXc36t2gcv1gZ-QnoTXSzK1O6mNAMlync/edit#heading=h.xzp5p5pt8hlq

nodejs/modules

Answer questions SMotaal

is there a simpler term for "attenuated"? … discussion gets drowned a bit in "big words".

Specifically 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.

useful!

Related questions

Transition Path Problems For Tooling hot 1
Proposal: Support loading package by own "name" hot 1
JSON modules are being reverted on web hot 1
Out-of-Band Meeting Proposal hot 1
node v13.0-v13.1 errors on require of a module with "exports" defined hot 1
Use consistent error codes for MODULE_NOT_FOUND hot 1
Out-of-Band Meeting Proposal hot 1
Proposal: Support loading package by own "name" hot 1
Github User Rank List