@coveo/shopify 1.9.37 → 1.9.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,9 +17,7 @@
17
17
  */
18
18
 
19
19
  // src/headless/commerce.ts
20
- import {
21
- buildCommerceEngine
22
- } from "@coveo/headless/commerce";
20
+ import { buildCommerceEngine } from "@coveo/headless/commerce";
23
21
 
24
22
  // src/constants.ts
25
23
  var COVEO_SHOPIFY_CONFIG_KEY = "coveo_shopify_config";
@@ -91,10 +89,7 @@ import { getAnalyticsNextApiBaseUrl } from "@coveo/headless";
91
89
  import { createRelay } from "@coveo/relay";
92
90
  function init(options) {
93
91
  const relay = createRelay({
94
- url: getAnalyticsNextApiBaseUrl(
95
- options.organizationId,
96
- options.environment
97
- ),
92
+ url: getAnalyticsNextApiBaseUrl(options.organizationId, options.environment),
98
93
  token: options.accessToken,
99
94
  trackingId: options.trackingId
100
95
  });
@@ -1,4 +1,4 @@
1
- import { buildCommerceEngine, } from '@coveo/headless/commerce';
1
+ import { buildCommerceEngine } from '@coveo/headless/commerce';
2
2
  import { COVEO_SHOPIFY_CONFIG_KEY } from '../constants';
3
3
  import { publishCustomShopifyEvent } from '../utilities/shopify';
4
4
  export * from '@coveo/headless/commerce';
@@ -18,4 +18,4 @@ export interface BuildShopifySearchEngineOptions {
18
18
  * @returns The constructed search engine instance.
19
19
  * @throws Error if the required "_shopify_y" cookie is not found, ensuring the code runs within a Shopify store.
20
20
  */
21
- export declare function buildShopifySearchEngine({ searchEngineOptions, }: BuildShopifySearchEngineOptions): import("@coveo/headless").SearchEngine<{}>;
21
+ export declare function buildShopifySearchEngine({ searchEngineOptions }: BuildShopifySearchEngineOptions): import("@coveo/headless").SearchEngine<{}>;
@@ -89,10 +89,7 @@ import { getAnalyticsNextApiBaseUrl } from "@coveo/headless";
89
89
  import { createRelay } from "@coveo/relay";
90
90
  function init(options) {
91
91
  const relay = createRelay({
92
- url: getAnalyticsNextApiBaseUrl(
93
- options.organizationId,
94
- options.environment
95
- ),
92
+ url: getAnalyticsNextApiBaseUrl(options.organizationId, options.environment),
96
93
  token: options.accessToken,
97
94
  trackingId: options.trackingId
98
95
  });
@@ -104,9 +101,7 @@ function init(options) {
104
101
  }
105
102
 
106
103
  // src/headless/search.ts
107
- function buildShopifySearchEngine({
108
- searchEngineOptions
109
- }) {
104
+ function buildShopifySearchEngine({ searchEngineOptions }) {
110
105
  if (!searchEngineOptions.configuration.analytics?.trackingId) {
111
106
  throw new Error(
112
107
  "The configuration for the search engine must include an analytics tracking ID."
@@ -16,7 +16,7 @@ export * from '../utilities';
16
16
  * @returns The constructed search engine instance.
17
17
  * @throws Error if the required "_shopify_y" cookie is not found, ensuring the code runs within a Shopify store.
18
18
  */
19
- export function buildShopifySearchEngine({ searchEngineOptions, }) {
19
+ export function buildShopifySearchEngine({ searchEngineOptions }) {
20
20
  if (!searchEngineOptions.configuration.analytics?.trackingId) {
21
21
  throw new Error('The configuration for the search engine must include an analytics tracking ID.');
22
22
  }
@@ -54,9 +54,7 @@ __export(commerce_exports, {
54
54
  init: () => init,
55
55
  publishCustomShopifyEvent: () => publishCustomShopifyEvent
56
56
  });
57
- import {
58
- buildCommerceEngine
59
- } from "@coveo/headless/commerce";
57
+ import { buildCommerceEngine } from "@coveo/headless/commerce";
60
58
 
61
59
  // src/constants.ts
62
60
  var COVEO_SHOPIFY_CONFIG_KEY = "coveo_shopify_config";
@@ -129,10 +127,7 @@ import { getAnalyticsNextApiBaseUrl } from "@coveo/headless";
129
127
  import { createRelay } from "@coveo/relay";
130
128
  function init(options) {
131
129
  const relay = createRelay({
132
- url: getAnalyticsNextApiBaseUrl(
133
- options.organizationId,
134
- options.environment
135
- ),
130
+ url: getAnalyticsNextApiBaseUrl(options.organizationId, options.environment),
136
131
  token: options.accessToken,
137
132
  trackingId: options.trackingId
138
133
  });
@@ -85,10 +85,7 @@ function publishCustomShopifyEvent(key, customData) {
85
85
  // src/utilities/init.ts
86
86
  function init(options) {
87
87
  const relay = createRelay({
88
- url: getAnalyticsNextApiBaseUrl(
89
- options.organizationId,
90
- options.environment
91
- ),
88
+ url: getAnalyticsNextApiBaseUrl(options.organizationId, options.environment),
92
89
  token: options.accessToken,
93
90
  trackingId: options.trackingId
94
91
  });
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@coveo/shopify",
3
- "version": "1.9.37",
3
+ "version": "1.9.39",
4
+ "description": "Utilities to integrate Shopify with Coveo's commerce engine",
4
5
  "license": "Apache-2.0",
5
6
  "repository": {
6
7
  "type": "git",
@@ -46,13 +47,13 @@
46
47
  }
47
48
  },
48
49
  "dependencies": {
49
- "@coveo/relay": "2.1.1",
50
50
  "uuid": "^14.0.0",
51
- "@coveo/headless": "3.53.0"
51
+ "@coveo/headless": "3.53.2",
52
+ "@coveo/relay": "2.1.2"
52
53
  },
53
54
  "devDependencies": {
54
55
  "@types/node": "24.12.4",
55
- "vitest": "4.1.7"
56
+ "vitest": "4.1.9"
56
57
  },
57
58
  "engines": {
58
59
  "node": "^20.9.0 || ^22.11.0 || ^24.11.0"