Guy Bedford

Results 1051 comments of Guy Bedford

I see that it supports `require(esm)`, and that is via CJS wrapper mutation not an ESM mutation right? In that case it would still be CJS-specific, but which all works...

This would not apply to JSON, Wasm and Addons imported into ES modules though right?

> It will also allow skipping default evaluation entirely for most modules except source text modules What if the ultimate way source text modules are supported does not align with...

My honest opinion here is I don't think there is a future where this hook can work for source text modules, therefore I would prefer an API that takes that...

> If you think evaluate does not make sense, do you have a better suggestion? Do you insist that we should use cjsEvaluate to customize e.g. import addon from a...

Right, but until it's clear there's a path forward for such a construct, perhaps let's leave the design space open for now, to avoid the future breaking change that would...

Since we are operating on `module.exports` today and not `ModuleInstance`.

I think that something like you describe might be closer to the right direction here. Properly plotting what the path looks like for a more general hook. But then what...

> The design does incorporate support for source text modules, for example, this would be possible: This hook has two properties: (1) monkey patching existing instances, and (2) intercepting the...

> I am not sure if you have read the comments, but it's spec-complaint - when imported source text modules arrive in this hook, it's status will always already be...