Skip to content

internal/primordials: Node.js parity, generated and engine-backed - #35567

Open
robobun wants to merge 26 commits into
mainfrom
farm/caec3ad2/primordials-link-time-constants
Open

internal/primordials: Node.js parity, generated and engine-backed#35567
robobun wants to merge 26 commits into
mainfrom
farm/caec3ad2/primordials-link-time-constants

primordials: keep Node's explicit Safe* constructors

46ae65d
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 26, 2026 in 22m 22s

Code review found 2 important issues

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

Details

Severity Count
🔴 Important 2
🟡 Nit 3
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/codegen/generate-primordials-probe.js:125-127 Regression: util.inspect() throws on null-prototype Float16Array — primordials.Float16Array was dropped

Annotations

Check failure on line 127 in src/codegen/generate-primordials-probe.js

See this annotation in the file changed.

@claude claude / Claude Code Review

Regression: util.inspect() throws on null-prototype Float16Array — primordials.Float16Array was dropped

Dropping `Float16Array` from the probe's intrinsic-constructors list regresses `util.inspect()`: `src/js/internal/util/inspect.js:1528` does a *computed* `new primordials[fallback](value)` where `fallback` is the [[TypedArrayName]] slot, so `util.inspect(Object.setPrototypeOf(new Float16Array(2), null))` now throws `TypeError: undefined is not a constructor`, and the existing test at `test/js/node/util/node-inspect-tests/parallel/util-inspect.test.js:2056`/`2075` fails. This supersedes the earli