@tanstack/router-core
1.171.39 · 22 Oct 2026MIT30.7M / weekRepositoryHomepagenpmAtom feed
1.171.39 is the newest release of 1.x.
In short
5 fixed
Release note
Patch Changes
Detect plain objects by constructor instead of
Object.prototype.toStringdispatches inisPlainObject, which gates everydeepEqualandreplaceEqualDeeprecursion step. Object literals,JSON.parseoutput and null-prototype objects are still plain; objects from another realm no longer are. Records with an ownconstructorkey (for example the search params of?constructor=foo) fall back to a prototype check, so they keep structural sharing while class instances stay opaque.Compare and copy plain objects in
replaceEqualDeepby 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.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
constructoropaque.Null-prototype mode now applies only when constructing a copy; existing incoming objects can be reused with their original prototype.
Allocate the
replaceEqualDeepresult 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.Split
replaceEqualDeepinto 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 ahasOwnPropertylookup, 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.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.