From 3f48ef6f01677ad828496177c2aba37ac3d5ca7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chalifour?= Date: Thu, 5 Mar 2020 15:54:32 +0100 Subject: [PATCH] fix(deps): fix "too much recursion" error with circular deps --- package.json | 10 +++++----- packages/react-instantsearch-core/package.json | 2 +- .../src/connectors/connectInfiniteHits.js | 2 +- .../src/core/createConnector.tsx | 2 +- .../src/widgets/InstantSearch.tsx | 2 +- yarn.lock | 5 +++++ 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 4d5399a37f..6e6e664c73 100644 --- a/package.json +++ b/package.json @@ -134,23 +134,23 @@ "bundlesize": [ { "path": "packages/react-instantsearch/dist/umd/Core.min.js", - "maxSize": "2.75 kB" + "maxSize": "2.95 kB" }, { "path": "packages/react-instantsearch/dist/umd/Connectors.min.js", - "maxSize": "21.5 kB" + "maxSize": "21.75 kB" }, { "path": "packages/react-instantsearch/dist/umd/Dom.min.js", - "maxSize": "34 kB" + "maxSize": "34.25 kB" }, { "path": "packages/react-instantsearch-core/dist/umd/ReactInstantSearchCore.min.js", - "maxSize": "25 kB" + "maxSize": "25.25 kB" }, { "path": "packages/react-instantsearch-dom/dist/umd/ReactInstantSearchDOM.min.js", - "maxSize": "36.50 kB" + "maxSize": "36.75 kB" }, { "path": "packages/react-instantsearch-dom-maps/dist/umd/ReactInstantSearchDOMMaps.min.js", diff --git a/packages/react-instantsearch-core/package.json b/packages/react-instantsearch-core/package.json index 9e78de1cb9..3b86eb32b3 100644 --- a/packages/react-instantsearch-core/package.json +++ b/packages/react-instantsearch-core/package.json @@ -40,7 +40,7 @@ "dependencies": { "@babel/runtime": "^7.1.2", "algoliasearch-helper": "^3.1.0", - "fast-deep-equal": "^2.0.1", + "react-fast-compare": "^3.0.0", "prop-types": "^15.5.10" }, "peerDependencies": { diff --git a/packages/react-instantsearch-core/src/connectors/connectInfiniteHits.js b/packages/react-instantsearch-core/src/connectors/connectInfiniteHits.js index fc4e0e06bd..3bda058893 100644 --- a/packages/react-instantsearch-core/src/connectors/connectInfiniteHits.js +++ b/packages/react-instantsearch-core/src/connectors/connectInfiniteHits.js @@ -1,4 +1,4 @@ -import isEqual from 'fast-deep-equal'; +import isEqual from 'react-fast-compare'; import createConnector from '../core/createConnector'; import { diff --git a/packages/react-instantsearch-core/src/core/createConnector.tsx b/packages/react-instantsearch-core/src/core/createConnector.tsx index 59e2102c84..1628584940 100644 --- a/packages/react-instantsearch-core/src/core/createConnector.tsx +++ b/packages/react-instantsearch-core/src/core/createConnector.tsx @@ -1,5 +1,5 @@ import React, { Component, ReactType } from 'react'; -import isEqual from 'fast-deep-equal'; +import isEqual from 'react-fast-compare'; import { shallowEqual, getDisplayName, removeEmptyKey } from './utils'; import { InstantSearchConsumer, diff --git a/packages/react-instantsearch-core/src/widgets/InstantSearch.tsx b/packages/react-instantsearch-core/src/widgets/InstantSearch.tsx index e512ba06af..610465398c 100644 --- a/packages/react-instantsearch-core/src/widgets/InstantSearch.tsx +++ b/packages/react-instantsearch-core/src/widgets/InstantSearch.tsx @@ -1,5 +1,5 @@ import React, { Component, Children } from 'react'; -import isEqual from 'fast-deep-equal'; +import isEqual from 'react-fast-compare'; import PropTypes from 'prop-types'; import createInstantSearchManager from '../core/createInstantSearchManager'; import { InstantSearchProvider, InstantSearchContext } from '../core/context'; diff --git a/yarn.lock b/yarn.lock index 65e34574b8..2ed83466f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15864,6 +15864,11 @@ react-fast-compare@^2.0.2: resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9" integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw== +react-fast-compare@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.0.1.tgz#884d339ce1341aad22392e7a88664c71da48600e" + integrity sha512-C5vP0J644ofZGd54P8++O7AvrqMEbrGf8Ue0eAUJLJyw168dAX2aiYyX/zcY/eSNwO0IDjsKUaLE6n83D+TnEg== + react-focus-lock@^1.17.7: version "1.18.3" resolved "https://registry.yarnpkg.com/react-focus-lock/-/react-focus-lock-1.18.3.tgz#19d84afeab935c0b5de196922f71db7c481baba4"