diff options
author | Marvin Hagemeister <marvin@deno.com> | 2024-05-20 16:42:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 16:42:42 +0200 |
commit | eb97f110db2a48516dd18646d211af08ade9889f (patch) | |
tree | 04bfb0b5e9844b108b26230e3f5ea7276a744f92 /ext/node/polyfills | |
parent | fb3f82b9eafef7da732c0af7e8a86c3b87075e3c (diff) |
fix(node): stub findSourceMap for `ava` (#23899)
This stubs `findSourceMap` in `node:module` by always returning
`undefined` as if it never found a source map. This unblocks the `ava`
test runner.
Fixes https://github.com/denoland/deno/issues/18666
Diffstat (limited to 'ext/node/polyfills')
-rw-r--r-- | ext/node/polyfills/01_require.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js index efde1eb79..b0e4be89b 100644 --- a/ext/node/polyfills/01_require.js +++ b/ext/node/polyfills/01_require.js @@ -1261,6 +1261,15 @@ internals.requireImpl = { nativeModuleExports, }; +/** + * @param {string} path + * @returns {SourceMap | undefined} + */ +export function findSourceMap(_path) { + // TODO(@marvinhagemeister): Stub implementation for now to unblock ava + return undefined; +} + export { builtinModules, createRequire, isBuiltin, Module }; export const _cache = Module._cache; export const _extensions = Module._extensions; |