Implement Node's deep equality algorithm for node:assert - #33068
Open
robobun wants to merge 4 commits into
Open
Claude / Claude Code Review
completed
Jun 29, 2026 in 35m 11s
Code review found 1 potential issue
Found 5 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/js/internal/util/comparisons.ts:742-744 |
Set/Map operations not tamper-proof (Node-compat divergence) |
Annotations
Check warning on line 744 in src/js/internal/util/comparisons.ts
claude / Claude Code Review
Set/Map operations not tamper-proof (Node-compat divergence)
Nit: the Set/Map paths call `.size`, `.has()`, `.get()`, `.values()`, `.entries()` and `for…of` directly on the user's collections, while the rest of this file routes Date/Boolean/Number/Object/Array through module-captured prototypes via `.$call`. Node's reference uses `SetPrototypeHas`/`MapPrototypeGet`/`SetPrototypeGetSize` here, so e.g. `Set.prototype.has = () => true; assert.deepStrictEqual(new Set([1]), new Set([2]))` passes on this branch but throws in Node. `primordials.js` already expor
Loading