-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure lruMemoize
correctly memoizes when maxSize
is set to a number less than 1
#698
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for reselect-docs canceled.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d6379b1:
|
to be honest, i'm not sure this is something we needed to account for, but ultimately it's a one character change so can't hurt. thanks! |
descope bot
referenced
this pull request
in descope/descope-js
Jun 23, 2024
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [reselect](https://togithub.com/reduxjs/reselect) | dependencies | patch | [`5.1.0` -> `5.1.1`](https://renovatebot.com/diffs/npm/reselect/5.1.0/5.1.1) | --- ### Release Notes <details> <summary>reduxjs/reselect (reselect)</summary> ### [`v5.1.1`](https://togithub.com/reduxjs/reselect/releases/tag/v5.1.1) [Compare Source](https://togithub.com/reduxjs/reselect/compare/v5.1.0...v5.1.1) This **patch release** fixes behavior of `resultEqualityCheck` in `weakMapMemoize`, fixes the case of `lruMemoize` being given a `maxSize` less than 1, and tweaks the internal implementation of `lruMemoize`. (We've also updated our general build tooling.) ##### Changelog ##### Bug fixes Previously, providing the `resultEqualityCheck` option to `weakMapMemoize` resulted in it being called with empty objects as part of the initialization / dev check process. That could be an issue if your comparison function expected different values. We've updated the logic to avoid that, as well as improving a couple other perf aspects. Previously, passing a `maxSize` < 1 to `lruMemoize` would result in it creating a larger cache. That's now fixed. `lruMemoize` now uses a symbol for its `NOT_FOUND` value instead of a string. ##### What's Changed - Ensure `lruMemoize` correctly memoizes when `maxSize` is set to a number less than 1 by [@​aryaemami59](https://togithub.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/698](https://togithub.com/reduxjs/reselect/pull/698) - Fix `resultEqualityCheck` behavior in `weakMapMemoize` by [@​aryaemami59](https://togithub.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/699](https://togithub.com/reduxjs/reselect/pull/699) - Update TypeScript to 5.4 by [@​aryaemami59](https://togithub.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/708](https://togithub.com/reduxjs/reselect/pull/708) - Upgrade to Yarn 4 by [@​aryaemami59](https://togithub.com/aryaemami59) in [https://github.com/reduxjs/reselect/pull/705](https://togithub.com/reduxjs/reselect/pull/705) - Fix: use unique value for NOT_FOUND by [@​romgrk](https://togithub.com/romgrk) in [https://github.com/reduxjs/reselect/pull/709](https://togithub.com/reduxjs/reselect/pull/709) **Full Changelog**: reduxjs/reselect@v5.1.0...v5.1.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> Co-authored-by: descope[bot] <descope[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR:
lruMemoize
that would cause memoization to completely break whenmaxSize
is set to a value that is less than 1.