@graphcommerce/algolia-products 9.0.0-canary.100 → 9.0.0-canary.103

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.
package/CHANGELOG.md CHANGED
@@ -1,103 +1,31 @@
1
1
  # @graphcommerce/algolia-products
2
2
 
3
+ ## 9.0.0-canary.103
4
+
3
5
  ## 9.0.0-canary.100
4
6
 
5
7
  ### Patch Changes
6
8
 
7
9
  - [#2417](https://github.com/graphcommerce-org/graphcommerce/pull/2417) [`743e7e2`](https://github.com/graphcommerce-org/graphcommerce/commit/743e7e275c8f0bfe32a5240c08eed92120085cc0) - Prevent errors by returning string instead of array ([@Renzovh](https://github.com/Renzovh))
8
10
 
9
- ## 9.0.0-canary.99
10
-
11
- ## 9.0.0-canary.98
12
-
13
- ## 9.0.0-canary.97
14
-
15
- ## 9.0.0-canary.96
16
-
17
- ## 9.0.0-canary.95
18
-
19
- ## 9.0.0-canary.94
20
-
21
- ## 9.0.0-canary.93
22
-
23
- ## 9.0.0-canary.92
24
-
25
- ## 9.0.0-canary.91
26
-
27
- ## 9.0.0-canary.90
28
-
29
- ## 9.0.0-canary.89
30
-
31
- ## 9.0.0-canary.88
32
-
33
- ## 9.0.0-canary.87
34
-
35
- ## 9.0.0-canary.86
36
-
37
- ## 9.0.0-canary.85
38
-
39
11
  ## 9.0.0-canary.84
40
12
 
41
13
  ### Minor Changes
42
14
 
43
15
  - [#2377](https://github.com/graphcommerce-org/graphcommerce/pull/2377) [`56fcc45`](https://github.com/graphcommerce-org/graphcommerce/commit/56fcc45b60e43574c64fcdd7b02f8062d677e250) - Integrated algolia product queries into graphql-mesh. Provides fast and accurate searches, that can be personalised via magento-algolia and its algolia dashboard ([@Renzovh](https://github.com/Renzovh))
44
16
 
45
- ## 9.0.0-canary.83
46
-
47
- ## 9.0.0-canary.82
48
-
49
- ## 9.0.0-canary.81
50
-
51
- ## 9.0.0-canary.80
52
-
53
- ## 9.0.0-canary.79
54
-
55
- ## 9.0.0-canary.78
56
-
57
- ## 9.0.0-canary.77
58
-
59
- ## 9.0.0-canary.76
60
-
61
- ## 9.0.0-canary.75
62
-
63
- ## 9.0.0-canary.74
64
-
65
- ## 9.0.0-canary.73
66
-
67
- ## 9.0.0-canary.72
68
-
69
- ## 9.0.0-canary.71
70
-
71
- ## 9.0.0-canary.70
72
-
73
- ## 9.0.0-canary.69
74
-
75
- ## 9.0.0-canary.68
76
-
77
17
  ## 9.0.0-canary.67
78
18
 
79
19
  ### Patch Changes
80
20
 
81
21
  - [#2336](https://github.com/graphcommerce-org/graphcommerce/pull/2336) [`95ce63c`](https://github.com/graphcommerce-org/graphcommerce/commit/95ce63cd32463835239ba959734cdaf1aa7f3f7b) - Added algolia search suggestions ([@Renzovh](https://github.com/Renzovh))
82
22
 
83
- ## 9.0.0-canary.66
84
-
85
- ## 9.0.0-canary.65
86
-
87
23
  ## 9.0.0-canary.64
88
24
 
89
25
  ### Patch Changes
90
26
 
91
27
  - [#2334](https://github.com/graphcommerce-org/graphcommerce/pull/2334) [`3140735`](https://github.com/graphcommerce-org/graphcommerce/commit/3140735a8a49f8bebcbfde4e581515884446e05d) - Added support for customer group pricing ([@Renzovh](https://github.com/Renzovh))
92
28
 
93
- ## 9.0.0-canary.63
94
-
95
- ## 9.0.0-canary.62
96
-
97
- ## 9.0.0-canary.61
98
-
99
- ## 9.0.0-canary.60
100
-
101
29
  ## 9.0.0-canary.59
102
30
 
103
31
  ### Minor Changes
@@ -1,4 +1,5 @@
1
- import { ApolloCache, setContext } from '@graphcommerce/graphql'
1
+ import type { ApolloCache } from '@graphcommerce/graphql'
2
+ import { setContext } from '@graphcommerce/graphql'
2
3
  import { CustomerDocument } from '@graphcommerce/magento-customer'
3
4
 
4
5
  declare module '@apollo/client' {
@@ -5,8 +5,8 @@ import type {
5
5
  CategoryResult,
6
6
  MeshContext,
7
7
  } from '@graphcommerce/graphql-mesh'
8
- import { AttributeList } from './getAttributeList'
9
- import { GetStoreConfigReturn } from './getStoreConfig'
8
+ import type { AttributeList } from './getAttributeList'
9
+ import type { GetStoreConfigReturn } from './getStoreConfig'
10
10
 
11
11
  type AlgoliaFacets = { [facetName: string]: AlgoliaFacetOption }
12
12
  type AlgoliaFacetOption = { [facetOption: string]: number }
@@ -109,6 +109,7 @@ export function algoliaPricesToPricesAggregations(pricesList: {
109
109
  return Object.values(pricesBucket)
110
110
  }
111
111
 
112
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
112
113
  function assertAlgoliaFacets(facets: any): facets is AlgoliaFacets {
113
114
  return true
114
115
  }
@@ -11,9 +11,7 @@ import type {
11
11
  ResolversParentTypes,
12
12
  ResolversTypes,
13
13
  } from '@graphcommerce/graphql-mesh'
14
- // eslint-disable-next-line import/no-extraneous-dependencies
15
- import { GraphQLResolveInfo } from 'graphql'
16
- import { GetStoreConfigReturn } from './getStoreConfig'
14
+ import type { GetStoreConfigReturn } from './getStoreConfig'
17
15
 
18
16
  export function assertAdditional(
19
17
  additional: unknown,
@@ -19,7 +19,7 @@ export async function getAttributeList(context: MeshContext): Promise<AttributeL
19
19
  entityType: 'CATALOG_PRODUCT',
20
20
  filters: {},
21
21
  },
22
- selectionSet: `{ items{ code label } }`,
22
+ selectionSet: '{ items{ code label } }',
23
23
  context,
24
24
  }).then((res) => res?.items)) as { label?: string; code: string }[]
25
25
  attributeListCache = filterNonNullableKeys(items, ['label'])
@@ -1,4 +1,4 @@
1
- import { MeshContext, Maybe, StoreConfig } from '@graphcommerce/graphql-mesh'
1
+ import type { MeshContext, Maybe, StoreConfig } from '@graphcommerce/graphql-mesh'
2
2
 
3
3
  export type GetStoreConfigReturn =
4
4
  | Maybe<
@@ -7,8 +7,8 @@ import {
7
7
  isFilterTypeRange,
8
8
  isFilterTypeMatch,
9
9
  } from '@graphcommerce/magento-product'
10
- import { InputMaybe } from '@graphcommerce/next-config'
11
- import { GetStoreConfigReturn } from './getStoreConfig'
10
+ import type { InputMaybe } from '@graphcommerce/next-config'
11
+ import type { GetStoreConfigReturn } from './getStoreConfig'
12
12
  import { nonNullable } from './utils'
13
13
 
14
14
  /**
package/mesh/resolvers.ts CHANGED
@@ -1,11 +1,9 @@
1
- import {
2
- AlgoliasearchResponse,
3
- hasSelectionSetPath,
4
- type Resolvers,
5
- } from '@graphcommerce/graphql-mesh'
1
+ import type { AlgoliasearchResponse, Resolvers } from '@graphcommerce/graphql-mesh'
2
+ import { hasSelectionSetPath } from '@graphcommerce/graphql-mesh'
6
3
  import type { GraphQLError, GraphQLResolveInfo } from 'graphql'
7
4
  import { algoliaFacetsToAggregations, getCategoryList } from './algoliaFacetsToAggregations'
8
- import { algoliaHitToMagentoProduct, ProductsItemsItem } from './algoliaHitToMagentoProduct'
5
+ import type { ProductsItemsItem } from './algoliaHitToMagentoProduct'
6
+ import { algoliaHitToMagentoProduct } from './algoliaHitToMagentoProduct'
9
7
  import { getAlgoliaSettings } from './getAlgoliaSettings'
10
8
  import { getAttributeList } from './getAttributeList'
11
9
  import { getGroupId } from './getGroupId'
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  AlgoliasettingsResponse,
3
3
  MeshContext,
4
4
  ProductAttributeSortInput,
@@ -6,7 +6,7 @@ import {
6
6
  SortField,
7
7
  } from '@graphcommerce/graphql-mesh'
8
8
  import { nonNullable } from '@graphcommerce/magento-customer'
9
- import { AttributeList } from './getAttributeList'
9
+ import type { AttributeList } from './getAttributeList'
10
10
  import { getIndexName } from './getIndexName'
11
11
 
12
12
  export type SortingOptions = Record<string, SortField & { dirs: SortEnum[] }>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/algolia-products",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.0-canary.100",
5
+ "version": "9.0.0-canary.103",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -15,18 +15,18 @@
15
15
  "generate": "tsx scripts/generate-spec.mts"
16
16
  },
17
17
  "peerDependencies": {
18
- "@graphcommerce/google-datalayer": "^9.0.0-canary.100",
19
- "@graphcommerce/graphql": "^9.0.0-canary.100",
20
- "@graphcommerce/graphql-mesh": "^9.0.0-canary.100",
21
- "@graphcommerce/magento-customer": "^9.0.0-canary.100",
22
- "@graphcommerce/magento-product": "^9.0.0-canary.100",
23
- "@graphcommerce/magento-search": "^9.0.0-canary.100",
24
- "@graphcommerce/next-config": "^9.0.0-canary.100",
25
- "@graphcommerce/next-ui": "^9.0.0-canary.100",
18
+ "@graphcommerce/google-datalayer": "^9.0.0-canary.103",
19
+ "@graphcommerce/graphql": "^9.0.0-canary.103",
20
+ "@graphcommerce/graphql-mesh": "^9.0.0-canary.103",
21
+ "@graphcommerce/magento-customer": "^9.0.0-canary.103",
22
+ "@graphcommerce/magento-product": "^9.0.0-canary.103",
23
+ "@graphcommerce/magento-search": "^9.0.0-canary.103",
24
+ "@graphcommerce/next-config": "^9.0.0-canary.103",
25
+ "@graphcommerce/next-ui": "^9.0.0-canary.103",
26
26
  "react": "^18.2.0"
27
27
  },
28
28
  "devDependencies": {
29
- "graphql": "^16.0.0",
30
- "tsx": "^4.16.2"
29
+ "graphql": "^16.9.0",
30
+ "tsx": "^4.19.1"
31
31
  }
32
32
  }
@@ -1,4 +1,4 @@
1
- import { GraphQLProviderProps } from '@graphcommerce/graphql'
1
+ import type { GraphQLProviderProps } from '@graphcommerce/graphql'
2
2
  import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
3
3
  import { customerGroupIdLink } from '../link/customerGroupIdLink'
4
4
 
@@ -3,7 +3,7 @@ import type {
3
3
  productListApplyCategoryDefaults as productListApplyDefaults,
4
4
  categoryDefaultsToProductListFilters as defaultsToProductListFilters,
5
5
  } from '@graphcommerce/magento-product'
6
- import { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
6
+ import type { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
7
7
  import { applyEngineVariables } from '../utils/applyEngineVariable'
8
8
 
9
9
  export const config: PluginConfig = {
@@ -3,7 +3,7 @@ import type {
3
3
  productListApplySearchDefaults as productListApplyDefaults,
4
4
  searchDefaultsToProductListFilters as defaultsToProductListFilters,
5
5
  } from '@graphcommerce/magento-search'
6
- import { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
6
+ import type { FunctionPlugin, PluginConfig } from '@graphcommerce/next-config'
7
7
  import { applyEngineVariables } from '../utils/applyEngineVariable'
8
8
 
9
9
  export const config: PluginConfig = {