diff options
author | 2023-06-27 08:21:04 -0700 | |
---|---|---|
committer | 2023-06-27 08:21:04 -0700 | |
commit | d220d9ee5ab7d45c5480ad9a278807eb434f4276 (patch) | |
tree | be8610122194a727c8702eabb7d0f1c6895b8535 /src/bun.js/modules/NodeModuleModule.cpp | |
parent | e77f593b76e4ac8343106af9cc1161cfd573d234 (diff) | |
download | bun-d220d9ee5ab7d45c5480ad9a278807eb434f4276.tar.gz bun-d220d9ee5ab7d45c5480ad9a278807eb434f4276.tar.zst bun-d220d9ee5ab7d45c5480ad9a278807eb434f4276.zip |
Update NodeModuleModule.cpp
Diffstat (limited to 'src/bun.js/modules/NodeModuleModule.cpp')
-rw-r--r-- | src/bun.js/modules/NodeModuleModule.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bun.js/modules/NodeModuleModule.cpp b/src/bun.js/modules/NodeModuleModule.cpp index 10853ae32..3019ea95c 100644 --- a/src/bun.js/modules/NodeModuleModule.cpp +++ b/src/bun.js/modules/NodeModuleModule.cpp @@ -135,8 +135,8 @@ void generateNodeModuleModule(JSC::JSGlobalObject *globalObject, ImplementationVisibility::Public, NoIntrinsic, jsFunctionSourceMap, nullptr)); - append(JSC::Identifier::fromString(vm, "_resolveFileName"_s), - JSFunction::create(vm, globalObject, 3, String("_resolveFileName"_s), + append(JSC::Identifier::fromString(vm, "_resolveFilename"_s), + JSFunction::create(vm, globalObject, 3, String("_resolveFilename"_s), jsFunctionResolveFileName, ImplementationVisibility::Public)); @@ -151,6 +151,9 @@ void generateNodeModuleModule(JSC::JSGlobalObject *globalObject, append(JSC::Identifier::fromString(vm, "globalPaths"_s), JSC::constructEmptyArray(globalObject, nullptr, 0)); + append(JSC::Identifier::fromString(vm, "prototype"_s), + JSC::constructEmptyObject(globalObject)); + JSC::JSArray *builtinModules = JSC::JSArray::create( vm, globalObject->arrayStructureForIndexingTypeDuringAllocation( |