Skip to content

fix __dirname + expose load on Module.prototype

fc64d31
Select commit
Loading
Failed to load commit list.
Open

Add Module.prototype.load for new Module() instances #29256

fix __dirname + expose load on Module.prototype
fc64d31
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 13, 2026 in 29m 52s

Code review found 3 potential issues

Found 5 candidates, confirmed 3. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/regression/issue/29253.test.ts:14-34 Missing test for Module.prototype.load + stale unification comment

Annotations

Check warning on line 34 in test/regression/issue/29253.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Missing test for Module.prototype.load + stale unification comment

The comment block at lines 14-18 claims the fix 'unifies require("module").prototype with that same prototype, so patching one is reflected in the other' — but this unification was reverted in commit 1bf6b8b, so the two prototypes remain separate objects and the comment is factually misleading. Additionally, the first test only verifies typeof Object.getPrototypeOf(m).load === 'function' (the instance prototype, JSCommonJSModulePrototype) but never asserts typeof Module.prototype.load === 'funct