dependabot[bot] opened a new pull request, #43675:
URL: https://github.com/apache/superset/pull/43675

   Bumps [reselect](https://github.com/reduxjs/reselect) from 5.2.0 to 5.3.0.
   <details>
   <summary>Release notes</summary>
   <p><em>Sourced from <a 
href="https://github.com/reduxjs/reselect/releases";>reselect's 
releases</a>.</em></p>
   <blockquote>
   <h2>v5.3.0</h2>
   <p>This <strong>feature release</strong> adds a <code>maxSize</code> option 
to <code>weakMapMemoize</code> to bound cache growth, adds a new 
development-mode check that warns when a selector's cache grows without bound, 
improves memoization performance, removes the experimental 
<code>unstable_autotrackMemoize</code>, and updates our TypeScript support 
matrix and documentation.</p>
   <h2>Changelog</h2>
   <h3><code>maxSize</code> Option for <code>weakMapMemoize</code></h3>
   <p><code>weakMapMemoize</code> has been the default memoizer since v5.0, and 
its main benefit is the infinite cache size.  Prior to v5, selector instances 
had a default cache size of 1, which meant having to create unique selector 
instances per component when sharing selectors that took varying arguments like 
IDs.  <code>weakMapMemoize</code> memoizes based on all arguments, so it 
eliminated the extra setup work and just stores all cached values.</p>
   <p>However, that behavior can also effectively turn into a memory leak 
depending on what state and arguments are passed in and how they're used in the 
UI.</p>
   <p><code>weakMapMemoize</code> now accepts a <code>maxSize</code> option 
that bounds this growth:</p>
   <pre lang="ts"><code>const getVisibleItems = weakMapMemoize(
     (items, from, to) =&gt; items.slice(from, to),
     { maxSize: 100 }
   )
   </code></pre>
   <p>This shares the same <code>maxSize</code> option name as the earlier 
<code>lruMemoize</code>, but has different behavior.  Rather than an LRU 
eviction, this is a &quot;generational&quot; swap (kind of like a double 
buffer).  When the cache hits its max size, it's swapped out with an empty 
version and starts over at 0 entries.  So, there's effectively at most 2 * 
<code>maxSize</code> items in memory at any time.  If <code>maxSize</code> is 
not enabled, there's no additional logic or performance overhead.  If you do 
need LRU-style behavior, use <code>lruMemoize</code> instead.</p>
   <p>Note that bounding a <code>createSelector</code> selector requires 
passing <code>maxSize</code> in <strong>both</strong> 
<code>memoizeOptions</code> and <code>argsMemoizeOptions</code>, since the two 
memoization levels have separate caches. See <a 
href="https://reselect.js.org/api/weakMapMemoize#bounding-cache-size-with-maxsize";>the
 <code>maxSize</code> docs</a> for details.</p>
   <p>Thanks to <a href="https://github.com/veksa";><code>@​veksa</code></a> for 
proposing this in PR <a 
href="https://redirect.github.com/reduxjs/reselect/issues/761";>#761</a> and 
providing memory test infrastructure that helped verify this behavior.</p>
   <h3>New <code>cacheSizeCheck</code> Dev-Mode Check</h3>
   <p>We've also added an additional dev-mode check alongside the existing 
<code>inputStabilityCheck</code> and <code>identityFunctionCheck</code>.  If a 
memoized function has accumulated over 1000 values for the same args, it logs a 
warning with the function name and stack trace. By default this runs once per 
function.  Unlike the other two checks, it can only be configured globally, via 
<code>setGlobalDevModeChecks({ cacheSizeCheck: 'always' | 'once' | 'never' 
})</code></p>
   <h3>Performance Improvements</h3>
   <p>We've revamped our own performance benchmark suite to give better results 
with more precision and less noise.  That's helped verify some additional 
performance improvements.</p>
   <ul>
   <li><code>weakMapMemoize</code> now returns early on a cache hit instead of 
continuing through bookkeeping</li>
   <li><code>lruMemoize</code>'s cache lookup was simplified to eliminate 
unnecessary allocations</li>
   </ul>
   <p>These are small wins on already-fast paths, but did show modest 
improvements.</p>
   <h3>Removal of <code>unstable_autotrackMemoize</code></h3>
   <p>We've removed the experimental <code>unstable_autotrackMemoize</code> 
export. It was added in v5.0 as an experiment in Glimmer-style dependency 
tracking, never left <code>unstable_</code>, and as far as we can tell never 
saw real adoption. If you were using it, switch to <code>weakMapMemoize</code> 
(the default) or <code>lruMemoize</code>.</p>
   <h3>TypeScript Support</h3>
   <p>Our TypeScript support matrix is now <strong>5.6 and up</strong>, 
matching DefinitelyTyped, and CI now tests against TS 6.0.</p>
   <p>We've documented on the selector fields that a full cache reset requires 
clearing both memoization levels: <code>selector.clearCache()</code> plus 
<code>selector.memoizedResultFunc.clearCache()</code>.</p>
   <p>We improved types handling in cases where TS strict mode is off (but 
please migrate to strict behavior as soon as possible!)</p>
   <!-- raw HTML omitted -->
   </blockquote>
   <p>... (truncated)</p>
   </details>
   <details>
   <summary>Commits</summary>
   <ul>
   <li><a 
href="https://github.com/reduxjs/reselect/commit/73e20494780057cd44f2debc143eb7ef6178e19a";><code>73e2049</code></a>
 Release 5.3.0</li>
   <li><a 
href="https://github.com/reduxjs/reselect/commit/20a91ebf74c875167bf814111569de050d7a827f";><code>20a91eb</code></a>
 Merge pull request <a 
href="https://redirect.github.com/reduxjs/reselect/issues/785";>#785</a> from 
reduxjs/docs/weakmap-hotpath-docs</li>
   <li><a 
href="https://github.com/reduxjs/reselect/commit/24bb579186e5fb9d19af4f131fd84ed44537abc8";><code>24bb579</code></a>
 Add docs note on complex selectors and state</li>
   <li><a 
href="https://github.com/reduxjs/reselect/commit/c57b567dbefe673ac451f4d1b7ad65756a3dbf99";><code>c57b567</code></a>
 Merge pull request <a 
href="https://redirect.github.com/reduxjs/reselect/issues/784";>#784</a> from 
reduxjs/feature/remove-autotrack</li>
   <li><a 
href="https://github.com/reduxjs/reselect/commit/0b0b30bf6e0e68ba42b87c8859db457ca4993c42";><code>0b0b30b</code></a>
 Remove experimental autoTrackMemoize</li>
   <li><a 
href="https://github.com/reduxjs/reselect/commit/96d81d36b4c927dac6ecf4b39b936f3ac78002e1";><code>96d81d3</code></a>
 Merge pull request <a 
href="https://redirect.github.com/reduxjs/reselect/issues/760";>#760</a> from 
veksa/fix/569-clearing-selector-cache</li>
   <li><a 
href="https://github.com/reduxjs/reselect/commit/5f51f11081e2673ad073e72bf6a3e230103ac6f6";><code>5f51f11</code></a>
 types: document dual cache on selector fields and add clearCache type test 
(#...</li>
   <li><a 
href="https://github.com/reduxjs/reselect/commit/0a64b331d6d20789cb43cfbc80f7f51e5e20fa4f";><code>0a64b33</code></a>
 docs: clarify how to fully clear a selector's cache (<a 
href="https://redirect.github.com/reduxjs/reselect/issues/569";>#569</a>)</li>
   <li><a 
href="https://github.com/reduxjs/reselect/commit/77a5b6acfbe2bc522b615b7ff5ad7316e2501a8d";><code>77a5b6a</code></a>
 Merge pull request <a 
href="https://redirect.github.com/reduxjs/reselect/issues/783";>#783</a> from 
reduxjs/feature/weakmap-maxsize</li>
   <li><a 
href="https://github.com/reduxjs/reselect/commit/0f785dadaf9b3203a73192b059ed43b52eedfcf0";><code>0f785da</code></a>
 Document weakMap maxSize option</li>
   <li>Additional commits viewable in <a 
href="https://github.com/reduxjs/reselect/compare/v5.2.0...v5.3.0";>compare 
view</a></li>
   </ul>
   </details>
   <br />
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=reselect&package-manager=npm_and_yarn&previous-version=5.2.0&new-version=5.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   <details>
   <summary>Dependabot commands and options</summary>
   <br />
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot show <dependency name> ignore conditions` will show all of 
the ignore conditions of the specified dependency
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   
   
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to