Skip to content
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

chore(examples): update search client to v5 #1265

Draft
wants to merge 2 commits into
base: next
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/github-notification-filters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@algolia/autocomplete-js": "1.17.2",
"@algolia/autocomplete-plugin-tags": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 15 in examples/github-notification-filters/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/github-notification-filters/package.json#L15

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2",
"qs": "6.11.1"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/github-notification-filters/searchClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';

const appId = 'latency';
const apiKey = '147a0e7dbc37d4c4dec9ec31b0f68716';
Expand Down
2 changes: 1 addition & 1 deletion examples/html-templates/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { autocomplete, getAlgoliaResults } from '@algolia/autocomplete-js';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';

import '@algolia/autocomplete-theme-classic';

Expand Down
2 changes: 1 addition & 1 deletion examples/html-templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@algolia/autocomplete-js": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0"
"algoliasearch-v5": "npm:[email protected]"

Check warning on line 14 in examples/html-templates/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/html-templates/package.json#L14

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
},
"devDependencies": {
"@algolia/client-search": "4.16.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/instantsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@algolia/autocomplete-plugin-recent-searches": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"@algolia/client-search": "4.16.0",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 17 in examples/instantsearch/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/instantsearch/package.json#L17

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"instantsearch.js": "4.53.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/instantsearch/src/searchClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';

export const searchClient = algoliasearch(
'latency',
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple-datasets-with-headers/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { autocomplete } from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
import { createLocalStorageRecentSearchesPlugin } from '@algolia/autocomplete-plugin-recent-searches';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import { h, Fragment } from 'preact';

import '@algolia/autocomplete-theme-classic';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsxRuntime classic */
/** @jsx h */
import { AutocompletePlugin, getAlgoliaFacets } from '@algolia/autocomplete-js';
import { SearchClient } from 'algoliasearch/lite';
import type { SearchClient } from 'algoliasearch-v5';
import { h, Fragment } from 'preact';

type CategoryItem = {
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple-datasets-with-headers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@algolia/autocomplete-plugin-query-suggestions": "1.17.2",
"@algolia/autocomplete-plugin-recent-searches": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 16 in examples/multiple-datasets-with-headers/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/multiple-datasets-with-headers/package.json#L16

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/panel-placement/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
GetSources,
} from '@algolia/autocomplete-js';
import { Hit } from '@algolia/client-search';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import { h } from 'preact';

import '@algolia/autocomplete-theme-classic';
Expand Down
2 changes: 1 addition & 1 deletion examples/panel-placement/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@algolia/autocomplete-core": "1.17.2",
"@algolia/autocomplete-js": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 15 in examples/panel-placement/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/panel-placement/package.json#L15

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/playground/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
import { createLocalStorageRecentSearchesPlugin } from '@algolia/autocomplete-plugin-recent-searches';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import { h, Fragment } from 'preact';

import '@algolia/autocomplete-theme-classic';
Expand Down
2 changes: 1 addition & 1 deletion examples/playground/categoriesPlugin.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsxRuntime classic */
/** @jsx h */
import { AutocompletePlugin, getAlgoliaFacets } from '@algolia/autocomplete-js';
import { SearchClient } from 'algoliasearch/lite';
import type { SearchClient } from 'algoliasearch-v5';
import { h, Fragment } from 'preact';

type CategoryRecord = {
Expand Down
2 changes: 1 addition & 1 deletion examples/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@algolia/autocomplete-preset-algolia": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"@algolia/client-search": "4.16.0",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 18 in examples/playground/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/playground/package.json#L18

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2",
"search-insights": "2.13.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/preview-panel-in-modal/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsxRuntime classic */
/** @jsx h */
import { autocomplete, getAlgoliaResults } from '@algolia/autocomplete-js';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import { h, render } from 'preact';

import '@algolia/autocomplete-theme-classic';
Expand Down
2 changes: 1 addition & 1 deletion examples/preview-panel-in-modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@algolia/autocomplete-js": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 14 in examples/preview-panel-in-modal/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/preview-panel-in-modal/package.json#L14

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2",
"qs": "6.11.1"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/query-suggestions-with-categories/app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { autocomplete } from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';

import '@algolia/autocomplete-theme-classic';

Expand Down
2 changes: 1 addition & 1 deletion examples/query-suggestions-with-categories/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@algolia/autocomplete-js": "1.17.2",
"@algolia/autocomplete-plugin-query-suggestions": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",
"preact": "10.13.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/query-suggestions-with-hits/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
AutocompleteInsightsApi,
} from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import { h, Fragment } from 'preact';

import '@algolia/autocomplete-theme-classic';
Expand Down
2 changes: 1 addition & 1 deletion examples/query-suggestions-with-hits/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@algolia/autocomplete-preset-algolia": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"@algolia/client-search": "4.16.0",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 18 in examples/query-suggestions-with-hits/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/query-suggestions-with-hits/package.json#L18

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2",
"search-insights": "2.13.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/query-suggestions-with-inline-categories/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @jsx h */
import { autocomplete } from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import { h } from 'preact';

import '@algolia/autocomplete-theme-classic';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@algolia/autocomplete-js": "1.17.2",
"@algolia/autocomplete-plugin-query-suggestions": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 15 in examples/query-suggestions-with-inline-categories/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/query-suggestions-with-inline-categories/package.json#L15

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { autocomplete } from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
import { createLocalStorageRecentSearchesPlugin } from '@algolia/autocomplete-plugin-recent-searches';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';

import '@algolia/autocomplete-theme-classic';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@algolia/autocomplete-plugin-recent-searches": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"@algolia/client-search": "4.16.0",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",
"preact": "10.13.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/query-suggestions-with-recent-searches/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { autocomplete } from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
import { createLocalStorageRecentSearchesPlugin } from '@algolia/autocomplete-plugin-recent-searches';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import { h, Fragment } from 'preact';

import '@algolia/autocomplete-theme-classic';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@algolia/autocomplete-plugin-query-suggestions": "1.17.2",
"@algolia/autocomplete-plugin-recent-searches": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 16 in examples/query-suggestions-with-recent-searches/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/query-suggestions-with-recent-searches/package.json#L16

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/query-suggestions/app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { autocomplete } from '@algolia/autocomplete-js';
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';

import '@algolia/autocomplete-theme-classic';

Expand Down
2 changes: 1 addition & 1 deletion examples/query-suggestions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@algolia/autocomplete-js": "1.17.2",
"@algolia/autocomplete-plugin-query-suggestions": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 15 in examples/query-suggestions/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/query-suggestions/package.json#L15

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/react-17/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@algolia/autocomplete-core": "1.17.2",
"@algolia/autocomplete-preset-algolia": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 16 in examples/react-17/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/react-17/package.json#L16

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"react": "17.0.2",
"react-dom": "17.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/react-17/src/Autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from '@algolia/autocomplete-core';
import { getAlgoliaResults } from '@algolia/autocomplete-preset-algolia';
import { Hit } from '@algolia/client-search';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import React from 'react';

import { ClearIcon } from './ClearIcon';
Expand Down
2 changes: 1 addition & 1 deletion examples/react-instantsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@algolia/autocomplete-plugin-query-suggestions": "1.17.2",
"@algolia/autocomplete-plugin-recent-searches": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 17 in examples/react-instantsearch/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/react-instantsearch/package.json#L17

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-instantsearch": "7.11.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/react-instantsearch/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import {
Configure,
HierarchicalMenu,
Expand Down
2 changes: 1 addition & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@algolia/autocomplete-js": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 16 in examples/react/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/react/package.json#L16

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/react/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useRef, createElement, Fragment } from 'react';
import { createRoot } from 'react-dom/client';
import { autocomplete, getAlgoliaResults } from '@algolia/autocomplete-js';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';

import type { AutocompleteComponents } from '@algolia/autocomplete-js';
import type { Hit } from '@algolia/client-search';
Expand Down
2 changes: 1 addition & 1 deletion examples/recently-viewed-items/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
AutocompleteComponents,
getAlgoliaResults,
} from '@algolia/autocomplete-js';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import { h, Fragment } from 'preact';

import '@algolia/autocomplete-theme-classic';
Expand Down
2 changes: 1 addition & 1 deletion examples/recently-viewed-items/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@algolia/autocomplete-plugin-recent-searches": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"@algolia/client-search": "4.16.0",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",
"preact": "10.13.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/redirect-url/app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { autocomplete, getAlgoliaResults } from '@algolia/autocomplete-js';
import { createRedirectUrlPlugin } from '@algolia/autocomplete-plugin-redirect-url';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';

import '@algolia/autocomplete-theme-classic';

Expand Down
2 changes: 1 addition & 1 deletion examples/redirect-url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@algolia/autocomplete-js": "1.17.2",
"@algolia/autocomplete-plugin-redirect-url": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 15 in examples/redirect-url/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/redirect-url/package.json#L15

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/reshape/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@algolia/autocomplete-shared": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"@algolia/client-search": "4.16.0",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 19 in examples/reshape/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/reshape/package.json#L19

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2",
"ramda": "0.27.1",
"search-insights": "2.13.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/reshape/searchClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';

const appId = 'latency';
const apiKey = '6be0576ff61c053d5f9a3225e2a90f76';
Expand Down
2 changes: 1 addition & 1 deletion examples/slack-with-emojis-and-commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@algolia/autocomplete-core": "1.17.2",
"@algolia/autocomplete-preset-algolia": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 16 in examples/slack-with-emojis-and-commands/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/slack-with-emojis-and-commands/package.json#L16

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"react": "17.0.2",
"react-dom": "17.0.2",
"textarea-caret": "3.1.0"
Expand Down
6 changes: 3 additions & 3 deletions examples/slack-with-emojis-and-commands/src/Autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from '@algolia/autocomplete-core';
import { getAlgoliaResults } from '@algolia/autocomplete-preset-algolia';
import { Hit } from '@algolia/client-search';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import React, { useEffect, useRef } from 'react';

import { commands } from './commands';
Expand Down Expand Up @@ -151,7 +151,7 @@ export function Autocomplete(
const activeToken = getActiveToken(state.query, cursorPosition);
const { top, height } = getCaretCoordinates(inputRef.current);
const inputProps = autocomplete.getInputProps({
inputElement: (inputRef.current as unknown) as HTMLInputElement,
inputElement: inputRef.current as unknown as HTMLInputElement,
});

useEffect(() => {
Expand Down Expand Up @@ -217,7 +217,7 @@ export function Autocomplete(
<div className="box-compose">
<form
{...autocomplete.getFormProps({
inputElement: (inputRef.current as unknown) as HTMLInputElement,
inputElement: inputRef.current as unknown as HTMLInputElement,
})}
className="box-form"
>
Expand Down
2 changes: 1 addition & 1 deletion examples/starter-algolia/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @jsx h */
import { autocomplete, getAlgoliaResults } from '@algolia/autocomplete-js';
import { Hit } from '@algolia/client-search';
import algoliasearch from 'algoliasearch/lite';
import { liteClient as algoliasearch } from 'algoliasearch-v5/lite';
import { h } from 'preact';

import '@algolia/autocomplete-theme-classic';
Expand Down
2 changes: 1 addition & 1 deletion examples/starter-algolia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@algolia/autocomplete-js": "1.17.2",
"@algolia/autocomplete-theme-classic": "1.17.2",
"algoliasearch": "4.16.0",
"algoliasearch-v5": "npm:[email protected]",

Check warning on line 14 in examples/starter-algolia/package.json

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

examples/starter-algolia/package.json#L14

Package dependencies with variant versions may lead to dependency hijack and confusion attacks.
"preact": "10.13.2"
},
"devDependencies": {
Expand Down
Loading