mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
8c051dbd1a
This internal node hook is used by libraries such as `ts-node` when used as a require hook `node -r ts-node/register`. That combination is often used with test frameworks like `mocha` or `jasmine`. We had a reference to `Module._preloadModules` in our code, but the implementation was missing. While fixing this I also noticed that the `fakeParent` module that we create internally always threw because of the `pathDirname` check on the module id in the constructor of `Mdoule`. So this code path was probably broken for a while. ```txt ✖ ERROR: Error: Empty filepath. at pathDirname (ext:deno_node/01_require.js:245:11) at new Module (ext:deno_node/01_require.js:446:15) at Function.Module._resolveFilename (ext:deno_node/01_require.js:754:28) at Function.resolve (ext:deno_node/01_require.js:1015:19) ``` |
||
---|---|---|
.. | ||
node_modules/foo | ||
add_global_property.js | ||
binary_stdio.js | ||
child_process_unref.js | ||
exec_file_text_error.js | ||
exec_file_text_output.js | ||
infinite_loop.js | ||
process_exit.ts | ||
process_exit2.ts | ||
process_stdin.ts | ||
process_stdin_dummy.txt | ||
rsa_private.pem | ||
rsa_public.pem |