npm / reselect
reselect
What changed in reselect 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
3 breaking2 new APIs and options3 performance1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initreselect 59 changes
Breaking changes 3
An all-optional selector result is no longer widened to any.
The supported TypeScript version range is now 5.6 and up, matching DefinitelyTyped.
The experimental export was removed; switch to weakMapMemoize or lruMemoize.
New APIs and options 2
Adds a globally configurable development-mode check that warns when a memoized function accumulates over 1000 values for the same args.
Accepts maxSize to bound cache growth using generational swaps; use lruMemoize for LRU-style eviction.
Performance 3
Simplifies cache lookup to eliminate unnecessary allocations, modestly improving performance.
Returns early on a cache hit instead of continuing through bookkeeping, modestly improving performance.
Internals were restructured to improve tree-shaking of build artifacts.
Fixes and other changes 1
Fixed a rare case that could cause weakMapMemoize to leak a WeakRef.