[Snyk] Upgrade reselect from 4.1.4 to 4.1.5 #673
Merged
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.
Snyk has created this PR to upgrade reselect from 4.1.4 to 4.1.5.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: reselect
This release updates the TS types to correctly infer selector parameters when input selectors have
undefined
ornull
as a parameter type or have optional parameters, and exports theCreateSelectorFunction
type to fix uses ofcreateStructuredSelector
.(The types fixes feel like playing whack-a-mole, but they keep getting better!
What's Changed
Full Changelog: v4.1.4...v4.1.5
This release has (you guessed it) more fixes to the TS types: a change to parameter merging that fixes breakage with selectors and RTK Query's API state, a simplification of the
OutputSelectorFields
type to improve selector variable readability, another update to parameter merging to flag nestednever
fields as compile errors, and a fix tocreateStructuredSelector
parameters to resolve a lib compilation problem.Changelog
More TS Fixes
The parameter merging fixes in 4.1.3 tried to "unwrap/expand" the parameter types to make them more readable, such as showing intersected objects as
{a, b, c}
instead of{a} & {b} & {c}
. This was done with a recursive expansion type. That turned out to break with the complex state types used by RTK Query. We've updated the type expansion to only be a single level instead, which fixes the compilation issue.The
OutputSelectorFields
type previously took two generics: theCombiner
function, and aResult
type. This led to extra values being shown in hover previews for selectors. By inferringResult = ReturnType<Combiner>
, we were able to drop the second generic and cut down on the amount of types shown in previews.A user noted that intersected objects with top-level incompatible fields (like
{a: string} & {a: number}
) resulted in empty objects, but no compile error. We've updated the parameter merging to flag those asnever
and catch the problem at compile time. Deeper nested incompatible fields should already be caught by TS.The previous fix to
createStructuredSelector
missed a step in the spreading process, which has now been fixed.What's Changed
Full Changelog: v4.1.3...v4.1.4
Commit messages
Package name: reselect
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs