From 8a2d99b5923f88efd91b735c27ef1b94c12e5e57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Nov 2021 23:09:57 -0800 Subject: [PATCH] Bump reselect from 4.0.0 to 4.1.5 in /desktop (#3111) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Bumps [reselect](https://github.com/reduxjs/reselect) from 4.0.0 to 4.1.5.
Release notes

Sourced from reselect's releases.

v4.1.5

This release updates the TS types to correctly infer selector parameters when input selectors have undefined or null as a parameter type or have optional parameters, and exports the CreateSelectorFunction type to fix uses of createStructuredSelector.

(The types fixes feel like playing whack-a-mole, but they keep getting better!

What's Changed

Full Changelog: https://github.com/reduxjs/reselect/compare/v4.1.4...v4.1.5

v4.1.4

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 nested never fields as compile errors, and a fix to createStructuredSelector 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: the Combiner function, and a Result type. This led to extra values being shown in hover previews for selectors. By inferring Result = 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 as never 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: https://github.com/reduxjs/reselect/compare/v4.1.3...v4.1.4

v4.1.3

This release rewrites the TS type inference of input selector parameters for correctness, fixes inference of createStructuredSelector inputs, and fixes an issue with the OutputSelectorFields type not being exported.

Changelog

Input Selector Parameter Inference Improvements

Reselect's types have always been extremely tricky, because it involves passing multiple input selectors with potentially heterogeneous, and then nested function composition of multiple selectors. Additionally, the input selectors can be passed as individual arguments or a single array of input selectors.

The 4.0.0 typedefs dealt with this by hand-writing dozens of overloads, which was absolutely impossible to maintain.

In 4.1, we took advantage of TS's improved abilities to infer array/tuple types to consolidate the typedefs.

One of the issues that happened as a result was that arguments at the same input parameter index were being "unioned" together, rather than "intersectioned". For example, in this complex selector:

... (truncated)

Changelog

Sourced from reselect's changelog.

Change log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

Commits
Maintainer changes

This version was pushed to npm by acemarke, a new releaser for reselect since your current version.


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=reselect&package-manager=npm_and_yarn&previous-version=4.0.0&new-version=4.1.5)](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) ---
Dependabot commands and options
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 merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `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)
Pull Request resolved: https://github.com/facebook/flipper/pull/3111 Reviewed By: jknoxville Differential Revision: D32698523 Pulled By: passy fbshipit-source-id: 0272e28e796e04ed5df604d63307bacaaab35229 --- desktop/flipper-ui-core/package.json | 2 +- desktop/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/desktop/flipper-ui-core/package.json b/desktop/flipper-ui-core/package.json index e29f21a54..7096da55a 100644 --- a/desktop/flipper-ui-core/package.json +++ b/desktop/flipper-ui-core/package.json @@ -63,7 +63,7 @@ "recursive-readdir": "^2.2.2", "redux": "^4.1.2", "redux-persist": "^6.0.0", - "reselect": "^4.0.0", + "reselect": "^4.1.5", "semver": "^7.3.5", "tmp": "^0.2.1", "uuid": "^8.3.2", diff --git a/desktop/yarn.lock b/desktop/yarn.lock index 6c251610c..a1eb159a8 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -11647,10 +11647,10 @@ requireindex@~1.1.0: resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.1.0.tgz#e5404b81557ef75db6e49c5a72004893fe03e162" integrity sha1-5UBLgVV+91225JxacgBIk/4D4WI= -reselect@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7" - integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA== +reselect@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.5.tgz#852c361247198da6756d07d9296c2b51eddb79f6" + integrity sha512-uVdlz8J7OO+ASpBYoz1Zypgx0KasCY20H+N8JD13oUMtPvSHQuscrHop4KbXrbsBcdB9Ds7lVK7eRkBIfO43vQ== resize-observer-polyfill@^1.5.0, resize-observer-polyfill@^1.5.1: version "1.5.1"