add _compile to Module prototype (#22565)

### What does this PR do?
Unblocks jazzer.js
### How did you verify your code works?
Added a test running `bun -p "module._compile ===
require('module').prototype._compile"
This commit is contained in:
Dylan Conway
2025-09-11 06:01:57 +00:00
committed by GitHub
parent b3f5dd73da
commit 1f517499ef
2 changed files with 10 additions and 0 deletions

View File

@@ -698,6 +698,8 @@ static JSValue getModulePrototypeObject(VM& vm, JSObject* moduleObject)
setterRequireFunction),
0);
prototype->putDirect(vm, Identifier::fromString(vm, "_compile"_s), globalObject->modulePrototypeUnderscoreCompileFunction());
return prototype;
}