snek
snek
the pattern for cjs, sure. i'd argue there is no pattern for esm yet. i'd like to lean on the more mature advancements in the ecosystem like package manager bin...
the import cache is purposely unexposed. adding a query has been the generally accepted ecosystem practice to re-import something. however, a failure to import something will not fill the cache....
if its just happening with node_modules it could be https://github.com/nodejs/node/issues/26926
I'm really not a fan of the idea of our module cache being anything except insert-only. CJS cache modification is bad already, and CJS modules don't even form graphs. Additionally,...
there are differences between workers and the main thread, mostly surrounding the functions on `process`, like `process.exit()` in a worker doesn't end the process, just the thread. There's a good...
i admittedly don't know much about mocha... is using a separate process not doable either?
These all sound like use cases for V8's LiveEdit debug api (https://chromedevtools.github.io/devtools-protocol/v8/Debugger#method-setScriptSource). You can call into it using https://nodejs.org/api/inspector.html. cc @giltayar @boneskull
@georges-gomes you can subscribe to the `Debugger.scriptParsed` event to track the script id, and then when you need to modify the script you can call `Debugger.setScriptSource`.
we're currently trying to keep the loader API very bare as we're experimenting with various concurrency models and stuff of that nature. after all that is figured out though, it...
i guess this is really more like a `canRequire` api right? since `import()` can handle everything.