From 96ec4dc9f957aa4c00b6613f74f5c5bb3d5ceda6 Mon Sep 17 00:00:00 2001 From: Fernando Lucchesi Date: Fri, 17 Nov 2023 14:27:48 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Refactor=20instant=20searc?= =?UTF-8?q?h=20packages=20and=20remove=20warnings=20#1114=20(#1978)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 7 +- .../pageTemplates/MagazineIndexPage.tsx | 5 +- .../pageTemplates/NewsRoomPage.tsx | 7 +- .../pageTemplates/newsroom/Hits.tsx | 2 +- .../pageTemplates/newsroom/RefinementList.tsx | 2 +- .../newsroom/UncontrolledSearchBox.tsx | 2 +- web/pageComponents/search/Hits.tsx | 2 +- web/pageComponents/search/Search.tsx | 14 +- web/pageComponents/search/SearchBox.tsx | 2 +- web/pageComponents/search/SearchResults.tsx | 2 +- .../search/TotalResultsStat.tsx | 2 +- .../searchIndexPages/magazineIndex/Hits.tsx | 2 +- .../magazineIndex/MagazineTagFilter.tsx | 2 +- .../shared/search/pagination/Pagination.tsx | 2 +- .../search/pagination/PaginationItem.tsx | 2 +- web/pages/magasin/index.global.tsx | 3 +- web/pages/magazine/index.global.tsx | 4 +- web/pages/news/index.global.tsx | 3 +- web/pages/nyheter/index.global.tsx | 3 +- web/pnpm-lock.yaml | 158 ++++++------------ web/types/algoliaIndexPage.ts | 2 +- 21 files changed, 90 insertions(+), 138 deletions(-) diff --git a/web/package.json b/web/package.json index e4d9ae953..aeb79fd44 100644 --- a/web/package.json +++ b/web/package.json @@ -65,10 +65,8 @@ "react-error-boundary": "^3.1.4", "react-focus-lock": "^2.9.2", "react-hook-form": "7.45.2", - "react-instantsearch-dom": "^6.40.4", - "react-instantsearch-hooks-router-nextjs": "6.47.3", - "react-instantsearch-hooks-server": "^6.47.3", - "react-instantsearch-hooks-web": "^6.47.3", + "react-instantsearch": "^7.3.0", + "react-instantsearch-router-nextjs": "^7.3.0", "react-intl": "^6.0.2", "react-is": "^18.1.0", "react-remove-scroll": "^2.5.5", @@ -102,7 +100,6 @@ "@types/react": "^18.0.9", "@types/react-dom": "^18.0.5", "@types/react-instantsearch": "^6.10.1", - "@types/react-instantsearch-dom": "^6.12.3", "@types/styled-components": "^5.1.26", "@types/testing-library__jest-dom": "^5.14.5", "babel-plugin-styled-components": "^2.1.1", diff --git a/web/pageComponents/pageTemplates/MagazineIndexPage.tsx b/web/pageComponents/pageTemplates/MagazineIndexPage.tsx index 3efec8c94..b0f7d553e 100644 --- a/web/pageComponents/pageTemplates/MagazineIndexPage.tsx +++ b/web/pageComponents/pageTemplates/MagazineIndexPage.tsx @@ -1,5 +1,4 @@ import { BackgroundContainer } from '@components' -import { Configure, InstantSearch } from 'react-instantsearch-hooks-web' import styled from 'styled-components' import { Flags } from '../../common/helpers/datasetHelpers' import { searchClient } from '../../lib/algolia' @@ -18,9 +17,10 @@ import { PaginationContextProvider } from '../shared/search/pagination/Paginatio import Teaser from '../shared/Teaser' import { SharedBanner } from './shared/SharedBanner' import SharedTitle from './shared/SharedTitle' -import { createInstantSearchRouterNext } from 'react-instantsearch-hooks-router-nextjs' import singletonRouter from 'next/router' import type { UiState } from 'instantsearch.js' +import { Configure, InstantSearch } from 'react-instantsearch' +import { createInstantSearchRouterNext } from 'react-instantsearch-router-nextjs' const IngressWrapper = styled.div` max-width: 1186px; /* 1920 - (2 * 367) */ @@ -101,6 +101,7 @@ const MagazineIndexPage = ({ isServerRendered = false, locale, pageData, slug, u }) : searchClient(undefined) } + future={{ preserveSharedStateOnUnmount: false }} indexName={indexName} routing={{ router: createInstantSearchRouterNext({ diff --git a/web/pageComponents/pageTemplates/NewsRoomPage.tsx b/web/pageComponents/pageTemplates/NewsRoomPage.tsx index 1f0ac560c..2fa8fbae8 100644 --- a/web/pageComponents/pageTemplates/NewsRoomPage.tsx +++ b/web/pageComponents/pageTemplates/NewsRoomPage.tsx @@ -1,6 +1,5 @@ import { Heading } from '@components' -import { useEffect, useRef } from 'react' -import { Configure, InstantSearch } from 'react-instantsearch-hooks-web' +import { useRef } from 'react' import { FormattedMessage } from 'react-intl' import styled from 'styled-components' import { Flags } from '../../common/helpers/datasetHelpers' @@ -18,9 +17,10 @@ import Filters from './newsroom/Filters' import Hit from './newsroom/Hit' import { Hits } from './newsroom/Hits' import { Intro, News, UnpaddedText, Wrapper } from './newsroom/StyledComponents' -import { createInstantSearchRouterNext } from 'react-instantsearch-hooks-router-nextjs' +import { createInstantSearchRouterNext } from 'react-instantsearch-router-nextjs' import singletonRouter from 'next/router' import type { UiState } from 'instantsearch.js' +import { Configure, InstantSearch } from 'react-instantsearch' const NewsRoomContent = styled.div` display: grid; @@ -212,6 +212,7 @@ const NewsRoomPage = ({ isServerRendered, locale, pageData, slug, url }: NewsRoo }) : searchClient(undefined) } + future={{ preserveSharedStateOnUnmount: false }} indexName={indexName} routing={routing} > diff --git a/web/pageComponents/pageTemplates/newsroom/Hits.tsx b/web/pageComponents/pageTemplates/newsroom/Hits.tsx index b39917b82..e64ea9905 100644 --- a/web/pageComponents/pageTemplates/newsroom/Hits.tsx +++ b/web/pageComponents/pageTemplates/newsroom/Hits.tsx @@ -1,5 +1,5 @@ import { Hit as AlgoliaHit } from '@algolia/client-search' -import { useHits, UseHitsProps } from 'react-instantsearch-hooks-web' +import { useHits, UseHitsProps } from 'react-instantsearch' import { FormattedMessage } from 'react-intl' import styled from 'styled-components' import { List } from '@components' diff --git a/web/pageComponents/pageTemplates/newsroom/RefinementList.tsx b/web/pageComponents/pageTemplates/newsroom/RefinementList.tsx index 2c28a734b..7a2e3e965 100644 --- a/web/pageComponents/pageTemplates/newsroom/RefinementList.tsx +++ b/web/pageComponents/pageTemplates/newsroom/RefinementList.tsx @@ -1,4 +1,4 @@ -import { useRefinementList, UseRefinementListProps } from 'react-instantsearch-hooks-web' +import { useRefinementList, UseRefinementListProps } from 'react-instantsearch' import { List, Checkbox } from '@components' import styled from 'styled-components' import { FormattedMessage } from 'react-intl' diff --git a/web/pageComponents/pageTemplates/newsroom/UncontrolledSearchBox.tsx b/web/pageComponents/pageTemplates/newsroom/UncontrolledSearchBox.tsx index ad064e7a4..886d7c3b9 100644 --- a/web/pageComponents/pageTemplates/newsroom/UncontrolledSearchBox.tsx +++ b/web/pageComponents/pageTemplates/newsroom/UncontrolledSearchBox.tsx @@ -3,7 +3,7 @@ */ import { useEffect, useRef, useState } from 'react' -import { useSearchBox, UseSearchBoxProps } from 'react-instantsearch-hooks-web' +import { useSearchBox, UseSearchBoxProps } from 'react-instantsearch' import styled from 'styled-components' import VisuallyHidden from '../../shared/VisuallyHidden' import { useIntl } from 'react-intl' diff --git a/web/pageComponents/search/Hits.tsx b/web/pageComponents/search/Hits.tsx index 2363c2154..229b7b68d 100644 --- a/web/pageComponents/search/Hits.tsx +++ b/web/pageComponents/search/Hits.tsx @@ -1,4 +1,4 @@ -import { useHits } from 'react-instantsearch-hooks-web' +import { useHits } from 'react-instantsearch' import { List, Heading } from '@components' import styled from 'styled-components' import { FormattedMessage } from 'react-intl' diff --git a/web/pageComponents/search/Search.tsx b/web/pageComponents/search/Search.tsx index e49d38101..af0244c4a 100644 --- a/web/pageComponents/search/Search.tsx +++ b/web/pageComponents/search/Search.tsx @@ -1,14 +1,13 @@ -import { InstantSearch, Configure, Index } from 'react-instantsearch-hooks-web' +import { InstantSearch, Configure, Index } from 'react-instantsearch' import { searchClient as client } from '../../lib/algolia' import dynamic from 'next/dynamic' import { Flags } from '../../common/helpers/datasetHelpers' import { SearchBox } from './SearchBox' import { getIsoFromLocale } from '../../lib/localization' import { SearchContextProvider } from './SearchContext' -import { createInstantSearchRouterNext } from 'react-instantsearch-hooks-router-nextjs' -import singletonRouter from 'next/router' +import { createInstantSearchRouterNext } from 'react-instantsearch-router-nextjs' +import singletonRouter, { useRouter } from 'next/router' import type { UiState } from 'instantsearch.js' -import { useRouter } from 'next/router' import { useRef } from 'react' import styled from 'styled-components' import { Pagination } from '../shared/search/pagination/Pagination' @@ -158,7 +157,12 @@ const Search = () => { } return ( - + {indices.map((index) => ( diff --git a/web/pageComponents/search/SearchBox.tsx b/web/pageComponents/search/SearchBox.tsx index ed2d3ff02..eaf98f6cf 100644 --- a/web/pageComponents/search/SearchBox.tsx +++ b/web/pageComponents/search/SearchBox.tsx @@ -1,5 +1,5 @@ import { useEffect, useRef, useState, ChangeEvent, ComponentProps, useContext } from 'react' -import { useSearchBox, UseSearchBoxProps } from 'react-instantsearch-hooks-web' +import { useSearchBox, UseSearchBoxProps } from 'react-instantsearch' import ControlledSearchBox from './ControlledSearchBox' import { SearchContext } from './SearchContext' diff --git a/web/pageComponents/search/SearchResults.tsx b/web/pageComponents/search/SearchResults.tsx index a49349c13..b81a8d617 100644 --- a/web/pageComponents/search/SearchResults.tsx +++ b/web/pageComponents/search/SearchResults.tsx @@ -8,7 +8,7 @@ import NewsHit from './NewsHit' import { SearchContext } from './SearchContext' import TopicHit from './TopicHit' import TotalResultsStat from './TotalResultsStat' -import { useSortBy, UseSortByProps, useHits, useInstantSearch } from 'react-instantsearch-hooks-web' +import { useSortBy, UseSortByProps, useHits, useInstantSearch } from 'react-instantsearch' const Results = styled.div` margin-top: var(--space-xLarge); diff --git a/web/pageComponents/search/TotalResultsStat.tsx b/web/pageComponents/search/TotalResultsStat.tsx index 5642dbc5c..7b442d5d6 100644 --- a/web/pageComponents/search/TotalResultsStat.tsx +++ b/web/pageComponents/search/TotalResultsStat.tsx @@ -1,4 +1,4 @@ -import { usePagination, UsePaginationProps } from 'react-instantsearch-hooks-web' +import { usePagination, UsePaginationProps } from 'react-instantsearch' import { FormattedMessage } from 'react-intl' import styled from 'styled-components' diff --git a/web/pageComponents/searchIndexPages/magazineIndex/Hits.tsx b/web/pageComponents/searchIndexPages/magazineIndex/Hits.tsx index 634ea9a7e..6f518e9a1 100644 --- a/web/pageComponents/searchIndexPages/magazineIndex/Hits.tsx +++ b/web/pageComponents/searchIndexPages/magazineIndex/Hits.tsx @@ -1,4 +1,4 @@ -import { useHits, UseHitsProps } from 'react-instantsearch-hooks-web' +import { useHits, UseHitsProps } from 'react-instantsearch' import { FormattedMessage } from 'react-intl' import styled from 'styled-components' import MagazineCard from '../../cards/MagazineCard' diff --git a/web/pageComponents/searchIndexPages/magazineIndex/MagazineTagFilter.tsx b/web/pageComponents/searchIndexPages/magazineIndex/MagazineTagFilter.tsx index 3b9f3fbc4..b2d0bee37 100644 --- a/web/pageComponents/searchIndexPages/magazineIndex/MagazineTagFilter.tsx +++ b/web/pageComponents/searchIndexPages/magazineIndex/MagazineTagFilter.tsx @@ -1,5 +1,5 @@ import { forwardRef } from 'react' -import { useMenu, UseMenuProps, useClearRefinements, useCurrentRefinements } from 'react-instantsearch-hooks-web' +import { useMenu, UseMenuProps, useClearRefinements, useCurrentRefinements } from 'react-instantsearch' import MagazineTagBar from '../../shared/MagazineTagBar' export type RefinementListProps = { tags: string[] } & React.ComponentProps<'div'> & UseMenuProps diff --git a/web/pageComponents/shared/search/pagination/Pagination.tsx b/web/pageComponents/shared/search/pagination/Pagination.tsx index f33a5937f..d06a93c71 100644 --- a/web/pageComponents/shared/search/pagination/Pagination.tsx +++ b/web/pageComponents/shared/search/pagination/Pagination.tsx @@ -1,7 +1,7 @@ import { Icon } from '@equinor/eds-core-react' import { chevron_left, chevron_right, first_page, last_page } from '@equinor/eds-icons' import { useContext, useEffect, useRef } from 'react' -import { usePagination, UsePaginationProps } from 'react-instantsearch-hooks-web' +import { usePagination, UsePaginationProps } from 'react-instantsearch' import styled from 'styled-components' import { usePrefersReducedMotion } from '../../../../common/hooks/usePrefersReducedMotion' import { PaginationContext } from './PaginationContext' diff --git a/web/pageComponents/shared/search/pagination/PaginationItem.tsx b/web/pageComponents/shared/search/pagination/PaginationItem.tsx index 28e2b856e..9001c0285 100644 --- a/web/pageComponents/shared/search/pagination/PaginationItem.tsx +++ b/web/pageComponents/shared/search/pagination/PaginationItem.tsx @@ -1,4 +1,4 @@ -import { usePagination } from 'react-instantsearch-hooks-web' +import { usePagination } from 'react-instantsearch' import { Button } from '@components' import styled from 'styled-components' diff --git a/web/pages/magasin/index.global.tsx b/web/pages/magasin/index.global.tsx index 9b69e1c03..66f165a6c 100644 --- a/web/pages/magasin/index.global.tsx +++ b/web/pages/magasin/index.global.tsx @@ -1,6 +1,5 @@ import { GetServerSideProps } from 'next' -import { InstantSearchSSRProvider } from 'react-instantsearch-hooks-web' -import { getServerState } from 'react-instantsearch-hooks-server' +import { InstantSearchSSRProvider, getServerState } from 'react-instantsearch' import type { AppProps } from 'next/app' import { IntlProvider } from 'react-intl' import Footer from '../../pageComponents/shared/Footer' diff --git a/web/pages/magazine/index.global.tsx b/web/pages/magazine/index.global.tsx index 2c66fd642..eecc2aff3 100644 --- a/web/pages/magazine/index.global.tsx +++ b/web/pages/magazine/index.global.tsx @@ -1,6 +1,6 @@ import { GetServerSideProps } from 'next' -import { InstantSearchSSRProvider } from 'react-instantsearch-hooks-web' -import { getServerState } from 'react-instantsearch-hooks-server' +import { InstantSearchSSRProvider } from 'react-instantsearch' +import { getServerState } from 'react-instantsearch' import type { AppProps } from 'next/app' import { IntlProvider } from 'react-intl' import Footer from '../../pageComponents/shared/Footer' diff --git a/web/pages/news/index.global.tsx b/web/pages/news/index.global.tsx index 3adfe8719..3551adca1 100644 --- a/web/pages/news/index.global.tsx +++ b/web/pages/news/index.global.tsx @@ -1,6 +1,5 @@ import { GetServerSideProps } from 'next' -import { InstantSearchSSRProvider } from 'react-instantsearch-hooks-web' -import { getServerState } from 'react-instantsearch-hooks-server' +import { InstantSearchSSRProvider, getServerState } from 'react-instantsearch' import type { AppProps } from 'next/app' import { IntlProvider } from 'react-intl' import Footer from '../../pageComponents/shared/Footer' diff --git a/web/pages/nyheter/index.global.tsx b/web/pages/nyheter/index.global.tsx index 4109b13e8..f699b965b 100644 --- a/web/pages/nyheter/index.global.tsx +++ b/web/pages/nyheter/index.global.tsx @@ -1,6 +1,5 @@ import { GetServerSideProps } from 'next' -import { InstantSearchSSRProvider } from 'react-instantsearch-hooks-web' -import { getServerState } from 'react-instantsearch-hooks-server' +import { InstantSearchSSRProvider, getServerState } from 'react-instantsearch' import type { AppProps } from 'next/app' import { IntlProvider } from 'react-intl' import Footer from '../../pageComponents/shared/Footer' diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 47c115a80..a5be6f8ff 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -1,9 +1,5 @@ lockfileVersion: '6.0' -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - dependencies: '@chakra-ui/react': specifier: ^2.4.2 @@ -137,18 +133,12 @@ dependencies: react-hook-form: specifier: 7.45.2 version: 7.45.2(react@18.2.0) - react-instantsearch-dom: - specifier: ^6.40.4 - version: 6.40.4(algoliasearch@4.16.0)(react-dom@18.2.0)(react@18.2.0) - react-instantsearch-hooks-router-nextjs: - specifier: 6.47.3 - version: 6.47.3(algoliasearch@4.16.0)(next@13.5.4)(react@18.2.0) - react-instantsearch-hooks-server: - specifier: ^6.47.3 - version: 6.47.3(algoliasearch@4.16.0)(react-dom@18.2.0)(react@18.2.0) - react-instantsearch-hooks-web: - specifier: ^6.47.3 - version: 6.47.3(algoliasearch@4.16.0)(react-dom@18.2.0)(react@18.2.0) + react-instantsearch: + specifier: ^7.3.0 + version: 7.3.0(algoliasearch@4.16.0)(react-dom@18.2.0)(react@18.2.0) + react-instantsearch-router-nextjs: + specifier: ^7.3.0 + version: 7.3.0(algoliasearch@4.16.0)(next@13.5.4)(react@18.2.0) react-intl: specifier: ^6.0.2 version: 6.0.2(react@18.2.0)(typescript@4.8.4) @@ -244,9 +234,6 @@ devDependencies: '@types/react-instantsearch': specifier: ^6.10.1 version: 6.10.1 - '@types/react-instantsearch-dom': - specifier: ^6.12.3 - version: 6.12.3 '@types/styled-components': specifier: ^5.1.26 version: 5.1.26 @@ -382,10 +369,21 @@ packages: '@babel/runtime': 7.22.6 dev: false + /@algolia/ui-components-highlight-vdom@1.2.2: + resolution: {integrity: sha512-/+7jh7cd5rR2yQC7ME4SDcnAMiD1Ofn5Qq+E7afTJx9XSMOHkLR77/o6YcuJ60TfD1S+9lr7yjBLACon8gOuzQ==} + dependencies: + '@algolia/ui-components-shared': 1.2.2 + '@babel/runtime': 7.22.6 + dev: false + /@algolia/ui-components-shared@1.2.1: resolution: {integrity: sha512-a7mYHf/GVQfhAx/HRiMveKkFvHspQv/REdG+C/FIOosiSmNZxX7QebDwJkrGSmDWdXO12D0Qv1xn3AytFcEDlQ==} dev: false + /@algolia/ui-components-shared@1.2.2: + resolution: {integrity: sha512-FYwEG5sbr8p4V8mqP0iUaKgmWfcrMXRXwp7e6iBuB65P/7QyL8pT4I6/iGb85Q5mNH+UtYYSmLZhKjEblllKEQ==} + dev: false + /@ampproject/remapping@2.2.1: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} @@ -6511,10 +6509,6 @@ packages: resolution: {integrity: sha512-IiDAYTONQEKCBssPtoM0XqWF8YIIk2leba4NOf9qVQ/d8l5gLuS3QT87TrX6/u8rMonQAXC9KEDmM4q7sT6MWg==} dev: false - /@types/google.maps@3.53.5: - resolution: {integrity: sha512-HoRq4Te8J6krH7hj+TfdYepqegoKZCj3kkaK5gf+ySFSHLvyqYkDvkrtbcVJXQ6QBphQ0h1TF7p4J6sOh4r/zg==} - dev: false - /@types/graceful-fs@4.1.6: resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==} dependencies: @@ -7179,6 +7173,16 @@ packages: dependencies: '@algolia/events': 4.0.1 algoliasearch: 4.16.0 + dev: true + + /algoliasearch-helper@3.15.0(algoliasearch@4.16.0): + resolution: {integrity: sha512-DGUnK3TGtDQsaUE4ayF/LjSN0DGsuYThB8WBgnnDY0Wq04K6lNVruO3LfqJOgSfDiezp+Iyt8Tj4YKHi+/ivSA==} + peerDependencies: + algoliasearch: '>= 3.1 < 6' + dependencies: + '@algolia/events': 4.0.1 + algoliasearch: 4.16.0 + dev: false /algoliasearch@4.16.0: resolution: {integrity: sha512-HAjKJ6bBblaXqO4dYygF4qx251GuJ6zCZt+qbJ+kU7sOC+yc84pawEjVpJByh+cGP2APFCsao2Giz50cDlKNPA==} @@ -8440,7 +8444,7 @@ packages: dev: false /date-now@1.0.1: - resolution: {integrity: sha512-yiizelQCqYLUEVT4zqYihOW6Ird7Qyc6fD3Pv5xGxk4+Jz0rsB1dMN2KyNV6jgOHYh5K+sPGCSOknQN4Upa3pg==} + resolution: {integrity: sha1-u30IZDjevkGCpIX7PfP7+5nWFTw=} dev: false /debounce@1.0.0: @@ -10258,25 +10262,25 @@ packages: search-insights: 2.6.0 dev: false - /instantsearch.js@4.56.8(algoliasearch@4.16.0): - resolution: {integrity: sha512-40DJ5l70ZzVzWPK3qrHTKlJLaHGq1PRZpzfL6281P2mz8G19WOHQHKAP4Zh6a4lOZaRtJQUiPjQwqCHSurXZ5g==} + /instantsearch.js@4.60.0(algoliasearch@4.16.0): + resolution: {integrity: sha512-u/xeCT1DaxPioJnSm3hV4lNAojlhbjGrpX5fHO6+RJjpDFv/MgYxiIOdaIRowmt5F0v/3QCm+Un5f4jy1/+emA==} peerDependencies: algoliasearch: '>= 3.1 < 6' dependencies: '@algolia/events': 4.0.1 - '@algolia/ui-components-highlight-vdom': 1.2.1 - '@algolia/ui-components-shared': 1.2.1 + '@algolia/ui-components-highlight-vdom': 1.2.2 + '@algolia/ui-components-shared': 1.2.2 '@types/dom-speech-recognition': 0.0.1 - '@types/google.maps': 3.53.5 + '@types/google.maps': 3.53.4 '@types/hogan.js': 3.0.1 '@types/qs': 6.9.7 algoliasearch: 4.16.0 - algoliasearch-helper: 3.14.0(algoliasearch@4.16.0) + algoliasearch-helper: 3.15.0(algoliasearch@4.16.0) hogan.js: 3.0.2 htm: 3.1.1 - preact: 10.16.0 + preact: 10.15.1 qs: 6.9.7 - search-insights: 2.7.0 + search-insights: 2.6.0 dev: false /internal-slot@1.0.5: @@ -12939,10 +12943,6 @@ packages: resolution: {integrity: sha512-qs2ansoQEwzNiV5eAcRT1p1EC/dmEzaATVDJNiB3g2sRDWdA7b7MurXdJjB2+/WQktGWZwxvDrnuRFbWuIr64g==} dev: false - /preact@10.16.0: - resolution: {integrity: sha512-XTSj3dJ4roKIC93pald6rWuB2qQJO9gO2iLLyTe87MrjQN+HklueLsmskbywEWqCHlclgz3/M4YLL2iBr9UmMA==} - dev: false - /prebuild-install@7.1.1: resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} engines: {node: '>=10'} @@ -13375,68 +13375,35 @@ packages: react: 18.2.0 dev: true - /react-instantsearch-core@6.40.4(algoliasearch@4.16.0)(react@18.2.0): - resolution: {integrity: sha512-sEOgRU2MKL8edO85sNHvKlZ5yq9OFw++CDsEqYpHJvbWLE/2J2N49XAUY90kior09I2kBkbgowBbov+Py1AubQ==} + /react-instantsearch-core@7.3.0(algoliasearch@4.16.0)(react@18.2.0): + resolution: {integrity: sha512-v66mG+Io/Mmd5LQaoQXxGD/acHnLIM1Cq/uzlcC0VbFji7JXoJhChRPUcA+z5fGDaidBxdJOPRtQjJpTQ+/h8g==} peerDependencies: algoliasearch: '>= 3.1 < 5' - react: '>= 16.3.0 < 19' - dependencies: - '@babel/runtime': 7.22.6 - algoliasearch: 4.16.0 - algoliasearch-helper: 3.14.0(algoliasearch@4.16.0) - prop-types: 15.8.1 - react: 18.2.0 - react-fast-compare: 3.2.2 - dev: false - - /react-instantsearch-dom@6.40.4(algoliasearch@4.16.0)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-Oy8EKEOg/dfTE8tHc7GZRlzUdbZY4Mxas1x2OtvSNui+YAbIWafIf1g98iOGyVTB2qI5WH91YyUJTLPNfLrs6Q==} - peerDependencies: - algoliasearch: '>= 3.1 < 5' - react: '>= 16.3.0 < 19' - react-dom: '>= 16.3.0 < 19' + react: '>= 16.8.0 < 19' dependencies: '@babel/runtime': 7.22.6 algoliasearch: 4.16.0 - algoliasearch-helper: 3.14.0(algoliasearch@4.16.0) - classnames: 2.3.2 - prop-types: 15.8.1 + algoliasearch-helper: 3.15.0(algoliasearch@4.16.0) + instantsearch.js: 4.60.0(algoliasearch@4.16.0) react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - react-fast-compare: 3.2.2 - react-instantsearch-core: 6.40.4(algoliasearch@4.16.0)(react@18.2.0) + use-sync-external-store: 1.2.0(react@18.2.0) dev: false - /react-instantsearch-hooks-router-nextjs@6.47.3(algoliasearch@4.16.0)(next@13.5.4)(react@18.2.0): - resolution: {integrity: sha512-m2z9E2h65R66FtEYt32Z8XGnH2jcy2u2UlWOEQ/GIn3dwsuu7iQdyDomCMI7Z1kf6SyACVYOgQs77WPUAW7Xmw==} + /react-instantsearch-router-nextjs@7.3.0(algoliasearch@4.16.0)(next@13.5.4)(react@18.2.0): + resolution: {integrity: sha512-YH0ECR0rh2N4mrFVlFzfA0veE0G8dh6USZX5jyWl2BQ3EhVq8Xo+SYYmsvXM0oPj2ydlo5n0Eu8yH/7z8Id+fA==} peerDependencies: next: '>= 9 && < 14' dependencies: - instantsearch.js: 4.56.8(algoliasearch@4.16.0) + instantsearch.js: 4.60.0(algoliasearch@4.16.0) next: 13.5.4(@babel/core@7.21.4)(react-dom@18.2.0)(react@18.2.0) - react-instantsearch-hooks: 6.47.3(algoliasearch@4.16.0)(react@18.2.0) + react-instantsearch-core: 7.3.0(algoliasearch@4.16.0)(react@18.2.0) transitivePeerDependencies: - algoliasearch - react dev: false - /react-instantsearch-hooks-server@6.47.3(algoliasearch@4.16.0)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-dW0iU8GeEhv3E8e12TGKsT+JxOqClCLtVOfEltAiiywjaAnrHdfQZKjzqimVHfE26ncpkz4nJNi5p3YJy0Lgyg==} - peerDependencies: - algoliasearch: '>= 3.1 < 5' - react: '>= 16.8.0 < 19' - react-dom: '>= 16.8.0 < 19' - dependencies: - '@babel/runtime': 7.22.6 - algoliasearch: 4.16.0 - instantsearch.js: 4.56.8(algoliasearch@4.16.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - react-instantsearch-hooks: 6.47.3(algoliasearch@4.16.0)(react@18.2.0) - dev: false - - /react-instantsearch-hooks-web@6.47.3(algoliasearch@4.16.0)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-JTkPm11xwCX9eO4FgeeJ4v4O98wz1L7cAa2LkspgzDD1MPjMLtmiRVzvGxuYnOayQTtfC5+0GOBwuJEN8TDI8A==} + /react-instantsearch@7.3.0(algoliasearch@4.16.0)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-X0ZKDMP7DDKkRqnM99JbpsqASXDBVCUSpEYmPPhDx/PFGUzOu9yAFNCBkpJxfIf2A3nL/Z1QQDXuUYRdBgVCsg==} peerDependencies: algoliasearch: '>= 3.1 < 5' react: '>= 16.8.0 < 19' @@ -13444,24 +13411,10 @@ packages: dependencies: '@babel/runtime': 7.22.6 algoliasearch: 4.16.0 - instantsearch.js: 4.56.8(algoliasearch@4.16.0) + instantsearch.js: 4.60.0(algoliasearch@4.16.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-instantsearch-hooks: 6.47.3(algoliasearch@4.16.0)(react@18.2.0) - dev: false - - /react-instantsearch-hooks@6.47.3(algoliasearch@4.16.0)(react@18.2.0): - resolution: {integrity: sha512-QuGSwZ664MHrzvndXGnsyPhpKHywGqyDgqOVorYpEE24Y063OPv5XtmJaZqn27MIvvByUormTb6dbPgbjqkd8w==} - peerDependencies: - algoliasearch: '>= 3.1 < 5' - react: '>= 16.8.0 < 19' - dependencies: - '@babel/runtime': 7.22.6 - algoliasearch: 4.16.0 - algoliasearch-helper: 3.14.0(algoliasearch@4.16.0) - instantsearch.js: 4.56.8(algoliasearch@4.16.0) - react: 18.2.0 - use-sync-external-store: 1.2.0(react@18.2.0) + react-instantsearch-core: 7.3.0(algoliasearch@4.16.0)(react@18.2.0) dev: false /react-intl@6.0.2(react@18.2.0)(typescript@4.8.4): @@ -14161,11 +14114,6 @@ packages: engines: {node: '>=8.16.0'} dev: false - /search-insights@2.7.0: - resolution: {integrity: sha512-GLbVaGgzYEKMvuJbHRhLi1qoBFnjXZGZ6l4LxOYPCp4lI2jDRB3jPU9/XNhMwv6kvnA9slTreq6pvK+b3o3aqg==} - engines: {node: '>=8.16.0'} - dev: false - /semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true @@ -15807,7 +15755,7 @@ packages: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} /xregexp@2.0.0: - resolution: {integrity: sha512-xl/50/Cf32VsGq/1R8jJE5ajH1yMCQkpmoS10QbFZWl2Oor4H0Me64Pu2yxvsRWK3m6soJbmGfzSR7BYmDcWAA==} + resolution: {integrity: sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=} dev: false /xtend@4.0.2: @@ -15898,3 +15846,7 @@ packages: /zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} dev: true + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/web/types/algoliaIndexPage.ts b/web/types/algoliaIndexPage.ts index 01bd6dfdd..64107302e 100644 --- a/web/types/algoliaIndexPage.ts +++ b/web/types/algoliaIndexPage.ts @@ -1,4 +1,4 @@ -import { InstantSearchServerState } from 'react-instantsearch-hooks-web' +import { InstantSearchServerState } from 'react-instantsearch' import type { MenuData, FooterColumns,