Goal
Implement the exact pinned Home/Bun private-JSC structural comparison family:
JSC__JSValue__deepEqualsJSC__JSValue__strictDeepEqualsJSC__JSValue__jestDeepEqualsJSC__JSValue__jestStrictDeepEqualsJSC__JSValue__jestDeepMatch
This is a child of #134, #140, #163, and #164.
Required semantics
Shared structural engine
- Preserve primitive SameValue/strict comparison rules, pairwise cycle detection, and failure-atomic traversal.
- Compare enumerable string and Symbol properties with exact ordinary Get/proxy/getter observability and ordering-independent key matching.
- Cover dense, sparse, and accessor Arrays; ordinary/null-prototype/class objects; boxed primitives; functions; and cross-realm prototypes.
- Cover Date, RegExp, Error name/message/cause/enumerables, Map, Set, ArrayBuffer, DataView, every numeric TypedArray, detached/shared backing, and float NaN/signed-zero behavior.
- Preserve strict-mode distinctions for prototypes, missing versus explicit undefined, sparse holes, Error causes/types, and bitwise typed-float comparison.
- Reject invalid or foreign-VM inputs deterministically, publish traversal exceptions, and preserve the first pending exception.
Jest modes and subset matching
- Implement asymmetric matcher dispatch and its exception/callability behavior only for Jest-enabled equality.
- Implement recursive subset matching for
jestDeepMatch, including inherited/existing properties, nested object-containing behavior, cycles, and optional replacement of matched properties. - Keep non-Jest equality free of matcher hooks.
Child issues
- #230 — core structural engine and non-Jest equality
- #231 — Jest asymmetric equality and subset matching
Completion evidence
- Add focused matrices for primitives, prototypes, arrays/holes, cycles, maps/sets, buffers/views, dates/regex/errors, getters/proxies, Symbols, asymmetric matchers, subset replacement, sibling realms, foreign VMs, and first-wins exceptions.
- Add all five symbols to both pinned inventories and the linkable private-value fixture.
- Keep public/private export classification at zero unclassified symbols.
- Run focused tests during implementation, then one batched Home/Bun/public ABI audit.
- Update README and compatibility documentation with exact counts and evidence.
- Close only after implementation and documentation commits are on
origin/main.