mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
fix(ext/node): fix builtin module module (#15904)
This commit is contained in:
parent
5fe660ecd7
commit
d7b27ed63b
4 changed files with 7 additions and 22 deletions
|
@ -1,2 +1,4 @@
|
|||
function
|
||||
function
|
||||
function
|
||||
true
|
||||
|
|
|
@ -2,4 +2,6 @@ import m1 from "node:module";
|
|||
import m2 from "module";
|
||||
|
||||
console.log(typeof m1.Module);
|
||||
console.log(typeof m2.Module);
|
||||
console.log(typeof m2.Module);
|
||||
console.log(typeof m1);
|
||||
console.log(m1 === m1.Module);
|
||||
|
|
|
@ -828,25 +828,7 @@
|
|||
|
||||
Module.Module = Module;
|
||||
|
||||
const m = {
|
||||
_cache: Module._cache,
|
||||
_extensions: Module._extensions,
|
||||
_findPath: Module._findPath,
|
||||
_initPaths: Module._initPaths,
|
||||
_load: Module._load,
|
||||
_nodeModulePaths: Module._nodeModulePaths,
|
||||
_pathCache: Module._pathCache,
|
||||
_preloadModules: Module._preloadModules,
|
||||
_resolveFilename: Module._resolveFilename,
|
||||
_resolveLookupPaths: Module._resolveLookupPaths,
|
||||
builtinModules: Module.builtinModules,
|
||||
createRequire: Module.createRequire,
|
||||
globalPaths: Module.globalPaths,
|
||||
Module,
|
||||
wrap: Module.wrap,
|
||||
};
|
||||
|
||||
node.nativeModuleExports.module = m;
|
||||
node.nativeModuleExports.module = Module;
|
||||
|
||||
function loadNativeModule(_id, request) {
|
||||
if (nativeModulePolyfill.has(request)) {
|
||||
|
@ -890,7 +872,6 @@
|
|||
toRealPath,
|
||||
cjsParseCache,
|
||||
readPackageScope,
|
||||
moduleExports: m,
|
||||
},
|
||||
};
|
||||
})(globalThis);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const m = Deno[Deno.internal].require.moduleExports;
|
||||
const m = Deno[Deno.internal].require.Module;
|
||||
export const _cache = m._cache;
|
||||
export const _extensions = m._extensions;
|
||||
export const _findPath = m._findPath;
|
||||
|
|
Loading…
Reference in a new issue