Skip to content

Commit 984d9c5

Browse files
authored
fix(insights): bump embedded search-insights version (#1128)
1 parent 0d0c843 commit 984d9c5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/autocomplete-plugin-algolia-insights/src/__tests__/createAlgoliaInsightsPlugin.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ describe('createAlgoliaInsightsPlugin', () => {
234234
expect(document.body).toMatchInlineSnapshot(`
235235
<body>
236236
<script
237-
src="https://cdn.jsdelivr.net/npm/search-insights@2.4.0/dist/search-insights.min.js"
237+
src="https://cdn.jsdelivr.net/npm/search-insights@2.6.0/dist/search-insights.min.js"
238238
/>
239239
<form>
240240
<input />
@@ -243,7 +243,7 @@ describe('createAlgoliaInsightsPlugin', () => {
243243
`);
244244
expect((window as any).AlgoliaAnalyticsObject).toBe('aa');
245245
expect((window as any).aa).toEqual(expect.any(Function));
246-
expect((window as any).aa.version).toBe('2.4.0');
246+
expect((window as any).aa.version).toBe('2.6.0');
247247
});
248248

249249
it('notifies when the script fails to be added', () => {
@@ -736,7 +736,7 @@ describe('createAlgoliaInsightsPlugin', () => {
736736
test('sends a `clickedObjectIDsAfterSearch` event with additional parameters if client supports it', async () => {
737737
const insightsClient = jest.fn();
738738
// @ts-ignore
739-
insightsClient.version = '2.4.0';
739+
insightsClient.version = '2.6.0';
740740
const insightsPlugin = createAlgoliaInsightsPlugin({ insightsClient });
741741

742742
const { inputElement } = createPlayground(createAutocomplete, {

packages/autocomplete-plugin-algolia-insights/src/createAlgoliaInsightsPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
} from './types';
2323

2424
const VIEW_EVENT_DELAY = 400;
25-
const ALGOLIA_INSIGHTS_VERSION = '2.4.0';
25+
const ALGOLIA_INSIGHTS_VERSION = '2.6.0';
2626
const ALGOLIA_INSIGHTS_SRC = `https://cdn.jsdelivr.net/npm/search-insights@${ALGOLIA_INSIGHTS_VERSION}/dist/search-insights.min.js`;
2727

2828
type SendViewedObjectIDsParams = {

packages/autocomplete-plugin-algolia-insights/src/createSearchInsightsApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function createSearchInsightsApi(searchInsights: InsightsClient) {
5757
'X-Algolia-API-Key': apiKey,
5858
};
5959

60-
searchInsights(method, ...payloads, { headers } as any);
60+
searchInsights(method, ...payloads, { headers });
6161
} else {
6262
searchInsights(method, ...payloads);
6363
}

0 commit comments

Comments
 (0)