github TanStack/router @tanstack/router-core@1.171.32

latest releases: release-2026-09-16-2153, @tanstack/start-storage-context@1.167.34, @tanstack/vue-start@1.168.53...
3 hours ago

Patch Changes

  • #8363 cecae54 - Detect plain objects by constructor instead of Object.prototype.toString dispatches in isPlainObject, which gates every deepEqual and replaceEqualDeep recursion step. Object literals, JSON.parse output and null-prototype objects are still plain; objects from another realm no longer are. Records with an own constructor key (for example the search params of ?constructor=foo) fall back to a prototype check, so they keep structural sharing while class instances stay opaque.

  • #8364 0103578 - Compare and copy plain objects in replaceEqualDeep by their string keys only, skipping the symbol-key lookup that dominated key enumeration. Objects with non-enumerable own properties, or symbol keys on the incoming value, now pass through untouched instead of being structurally shared.

  • #8411 ce10dcd - Reduce structural-sharing allocations by reusing array key storage and returning incoming objects when their children need no replacements. Preserve signed zero consistently, remove stale symbol properties, and keep sparse arrays with extra keys and built-ins with an own constructor opaque.

    Null-prototype mode now applies only when constructing a copy; existing incoming objects can be reused with their original prototype.

  • #8362 84936cc - Allocate the replaceEqualDeep result only at the first difference, so structural sharing of search, params, state and loader data no longer allocates when the new value is deeply equal to the previous one.

  • #8389 bbd2336 - Split replaceEqualDeep into an equality scan and a copy phase: arrays and objects are scanned by dedicated loops up to the first difference, matching keys prove ownership without a hasOwnProperty lookup, and once a difference is found the result is built without any further equality bookkeeping. Deeply equal search, params, state and loader data are recognised faster and changed values are copied with less work per entry.

Don't miss a new router release

NewReleases is sending notifications on new releases.